Saturday, January 4, 2014

Raspberry Pi web server

Raspberry Pi Web Server

You need some hardware following.
  1. Raspberry Pi Model B 512MB version (recommended)
  2. 16GB SD Card
  3. Power adapter for Raspberry Pi (output : 5V 1A or greater highly recommended)
  4. TV (Full HD recommended)
  5. HDMI cable
  6. Computer with a SD card reader
  7. Wifi router
  8. Ethernet cable

 Install Raspbian to SD card


Connect your hardware
  • HDMI cable from raspberry pi to TV
  • Ethernet cable from raspberry pi to wifi router
  • Insert SD card with Raspbian installed

  • Connect power supply and turn on
  • Config Raspbian select "Expand Filesystem"
  • If you want to make Raspberry pi faster select "Over Clock" and select speed you want
  • Finish configuration and reboot system
Watch video "Raspbian first boot"


Install software

  • Update Raspbian
sudo apt-get update
sudo apt-get upgrade

  • Install apache2
sudo apt-get install apache2
  • Install php5
sudo apt-get install php5 php5-gd php5-curl php5-cli php5-cgi php5-dev libapache2-mod-php5
  • Install MySQL
sudo apt-get install mysql-server mysql-client php5-mysql
  • Install PhpMyAdmin
sudo apt-get install phpmyadmin
  • Restart service
sudo service apache2 restart
  • Take ownership of the web root
sudo chown -R pi /var/www
  • Install FTP server
sudo apt-get install vsftpd
  • Edit your vsftpd.conf file
sudo nano /etc/vsftpd.conf
- Change "anonymous_enable=YES" to "anonymous_enable=NO"
- Uncomment "local_enable=YES"
- Uncomment "write_enable=YES"
- Uncomment "local_umask=022"
- Then go to the bottom of the file and add
     force_dot_files=YES
     chmod_enable=YES
     file_open_mode=0755
  • Create a shortcut from the Pi user's home folder to /var/www
ln -s /var/www/ ~/www
  • Restart ftp server
sudo service vsftpd restart
  • Finish you have Raspberry pi as a web server
Watch video "install software"


Watch video "web server test"