Introduction[This guide has been fully updated in 2019 to reflect the changes to MySQL in Raspbian “Stretch” v9.x and the FTP issues have been fixed] You wouldn’t think a little PC like the Raspberry Pi 3 could handle the job of being a Web Server, but it does, and performs flawlessly too. Today I will show you how to source genuine Raspberry Pi 3 hardware, then setup a fully fledged LAMP Server (Linux, Apache, MySQL, PHP) along with instructions to install WordPress. You’ll also know how to access your web server via FTP, SSH and PHPMyAdmin. We will be using the latest version of Raspbian “Stretch” v9.x.
HardwareMy first experience buying a Raspberry Pi 2B didn’t go very well, I unwittingly purchased a fake knockoff from China via eBay that didn’t even work, needless to say I was very disappointed. Since then I have learned you have to be very careful where you buy any Raspberry Pi hardware. There are several official Raspberry Pi hardware suppliers that I’ll list below, but first let’s go through the list of parts you will need for this project.
- Raspberry Pi 3 motherboard/SBC
- A suitable case for your Pi (I like metal cases)
- 8GB (or more) MicroSD card class 10
- Raspberry Pi Micro USB power supply
- LAN Network cable
- Raspberry Pi 3 Official & Authorized Resellers
- Element14 (main website)
- Farnell/Element14 World Wide Authorized Resellers
- RS Components (choose your country)
- Sources for Suitable MicroSD Cards
- Predefined eBay.com search for Sandisk Ultra 8GB MicroSD cards
- Predefined eBay.com search for Sandisk 32GB MicroSD cards
- Search for Sandisk 32GB MicroSD cards on Google Shopping
- Raspberry Pi 3 Cases
- Predefined eBay.com search for Raspberry Pi 3 Metal Cases
- Search for Raspberry PI 3 Metal Case on Google Shopping
Download & Burn Raspbian Image
Download RaspbianRaspbian is the official operating system for the Raspberry Pi, and based on the excellent Debian Linux distribution. Raspain comes in to flavors: full Raspbian with the Pixel desktop, or Raspbian Lite with no desktop, which is the one we want. So go ahead and visit the Raspbian Downloads page, download the Lite version .zip file (if you have a BitTorrent client, choose the .torrent as it’s faster).
Burn Raspbian to SD CardOnce you have finished downloading the Raspbian Zip file, follow the instructions below to burn the IMG file to your MicroSD card.
- Unzip the .img file and take note of the file location
- Visit etcher.io and download the Etcher Image Burner for Windows, MAC or Linux and install
- Insert your MicroSD card into your PC’s card reader, take note of the drive letter assigned to it
- Run Etcher and select the .img file you unzipped earlier
- Make sure Etcher has selected the correct drive letter, if not then change it to your SD card’s drive letter (Important!)
- Once you’re sure the right .img file and drive letter is selected, click the Flash! button
- Once Etcher has finished, remove the MicroSD card and insert into your Raspberry Pi with the terminal contacts facing up as shown below
- Now connect up a USB keyboard (mouse not required), HDMI, LAN network cable and have the power supply plugged into the power socket and unit but don’t turn it on just yet