-
1
sudo dpkg-reconfigure tzdata sudo apt-get update sudo apt-get upgrade
-
2Set the date and time. From the command line type (replace parts as necessary):
sudo date --set="15 September 2014 11:13:00"
-
3To install Apache and PHP, execute the following commands:
sudo apt-get install apache2 php5 libapache2-mod-php5
-
4Now restart the service:
sudo service apache2 restart
OR
sudo /etc/init.d/apache2 restart
-
5To install MySQL, install a few packages with the following command:
sudo apt-get install mysql-server mysql-client php5-mysql
-
6We will now install FTP to allow transferring files to and from your Raspberry Pi.
-
7Take ownership of the web root:
sudo chown -R pi /var/www
-
8Next, install vsftpd:
sudo apt-get install vsftpd
-
9Edit your vsftpd.conf file:
sudo nano /etc/vsftpd.conf
-
10Make the following changes:
- anonymous_enable=YES to anonymous_enable=NO
- Uncomment local_enable=YES and write_enable=YES by deleting the #symbol in front of each line
- then go to the bottom of the file and add force_dot_files=YES.
-
11Now save and exit the file by pressing CTRL-O, CTRL-X.
-
12Now restart vsftpd:
sudo service vsftpd restart
-
13Create a shortcut from the Pi user's home folder to /var/www:
ln -s /var/www/ ~/www
-
14You can now FTP using the Pi user and access the /var/www folder via a shortcut that should appear on login.