LAMP is an acronym that stands for LinuxApacheMySQLPHP and are components required to run a Dynamic HTML webpage.
This instructable will demonstrate how you can turn your Raspberry Pi into a personal web server. The steps to install all of the components are relatively straight forward. After your personal web server is complete, you can use it to host a custom HTML or PHP resume, or a personal landing page which is what I chose to do.
Step 1: Materials
– SD memory card (4GB or larger)
– Power adapter compatible with the MicroB connector on the Raspberry pi
– Ethernet patch cable
– HDMI compatible monitor and HDMI cable
– USB Keyboard (no mouse is necessary, you can navigate the entire interface via keyboard. Arrow keys, Enter, ESC, etc.)
Step 2: Preparation
The Raspberry Pi always needs to boot off of an SD card loaded with an operating system (OS) disk image.
You may buy an SD card that has already been made bootable complete with the Raspberry Pi OS or you may buy a blank card and
There are many OS versions offered for the Raspberry Pi, however, in this example, I have chosen to use Raspbian “Wheezy”.
Download the OS disk image and write it to your memory card. To write the image I used Win32 Disk Imager. Once the image is written to the card, plug the card into the Raspberry Pi’s SD card reader and power on the device. (Be sure you have all the proper I/O devices plugged in, i.e., keyboard, Ethernet cable, HDMI monitor.)
Step 3: Initial Configuration
Keep in mind, if you mess up anything along the way, just reformat your card, reload the disk image and start again. No harm no foul.
Upon powering the Raspberry Pi with the SD card plugged in, you will see the system automatically listing information about the operating system and peripherals. You do not need to know what it all means for this project, but I absolutely wouldn’t discourage you from reading it and learning a little bit about your Raspberry Pi for your own benefit!
After the boot information is complete, you will be prompted with the raspi-config window. Here you should make the following changes:
– Expand root partition so all space on the SD card is usable.
– Set timezone.
– Enable SSH server (found in the Advanced Options)
– Disable boot to desktop, we want to configure this program using only the terminal environment.
– Update your Raspberry Pi (found in the Advanced Options)
– Reboot your Raspberry Pi at this time.
Use the following code to reboot your Raspberry Pi:
* I also do not recommend overclocking your Pi for this project, the default setting works perfectly and overclocking will reduce the overall lifetime of the hardware. In addition, to get to this window any time after the initial configuration, use the following command: sudo raspi-config
Step 4: SSH set up
Now you will be able to ssh into your Pi so you can work on it from another computer if you would like. Once the Raspberry Pi reboots, it will prompt you for login information. Where it says “raspberrypi login: ” type the default username which is pi and hit enter. Where it says “password: ” type the default password which is raspberry
*when typing the password, no characters will be displayed. Don’t get freaked out and think your keyboard stopped working. Just type out the password as you normally would and hit enter when you are done. I promise it is receiving your input!
At this point, find the IP address of your raspberry pi with the following command:
In the second line of the output you will see “inet addr: ” followed by a number to the effect of 192.168.1.1 (yours will be slightly different, but you get the idea). Write this number down and bring up your SSH client. For this example I am using an application called Putty as my SSH client. Type the IP address that you wrote down from the ifconfig step into the text field that says “Host Name (or IP address)”
For more detail: Turning your Raspberry Pi into a personal web server