That's a nicely sized server if you ask me |
As a Mac user, interfacing with linux devices is relatively easy for me. Apple's Terminal application (Applications/Utilities/Terminal) is able to communicate via ssh with the Raspberry Pi and allows me to program it through the command line in what is referred to as a "headless" mode. In other words, I can program the Pi without access to an external monitor, keyboard, or mouse. For those of you who are interested, I installed the Raspbian OS on my Raspberry Pi's SD card so that I could run headless from the first boot.
In order to get my Raspberry Pi set up as a FTP Server, I first installed Apache and PHP 5 through the command line. I then installed phpFileManager onto the Raspberry Pi, and viola! I now have the ability to upload and save files to the SD card on my Raspberry Pi through any web browser, whether on my phone, laptop or computer.
Code/commands for creating your own FTP server after the break!
To start, connect an ethernet cord from your router to your Raspberry Pi's Ethernet port, and connect a micro-USB cable from the Pi to your computer. Run the following commands after SSHing into your Raspberry Pi through Terminal on your mac/linux computer or through PuTTY on a Windows computer.
- sudo apt-get update
- sudo apt-get install apache2 -y
- hostname -I
- sudo apt-get install php5 libapache2-mod-php5 -y
- sudo wget http://node-arm.herokuapp.com/node_latest_armhf.deb
- sudo dpkg -i node_latest_armhf.deb
- cd /var/www
- sudo rm index.html
- sudo wget http://prdownloads.sourceforge.net/phpfm/phpFileManager-0.9.8.zip?download
- sudo mv phpFileManager-0.9.8.zip?download phpFileManager-0.9.8.zip
- sudo unzip phpFileManager-0.9.8.zip
- sudo rm phpFileManager-0.9.8.zip
- cd
- sudo service apache2 restart
And that should be it! You should be able to access your server by typing your Pi's IP address into the address bar of your web browser. You can also install and experiment with any other PHP-based FTP server software using the same commands and replacing http://prdownloads.sourceforge.net/phpfm/phpFileManager-0.9.8.zip?download with the source to your desired software. Let me know how it goes!
No comments:
Post a Comment