Skunk Workshop

Projects


How to make a personal server

Requirements

1. Raspberry Pi (any model that has Ethernet)
2. Raspberry Pi power supply
3. Ethernet cable
4. SD card with Raspbian
5. Computer with an SD card reader and Ethernet port
6. USB flash drive (optional)

Step One: Allocate IP

1. Insert your SD card into your computer and mount the boot partition.
2. Open cmdline.txt in a text editor, and add ip=<some-ip-address> to the end (I don't think it matters what IP you use, as long as it isn't already taken on your network - I used one that my computer automatically assigned before I had configured it)
3. Save cmdline.txt and eject the SD card

Step Two: Prepare site

1. Plug the USB flash drive into your computer and put your web site's index.html file onto it
2. Eject it

Step Three: Configure Raspberry Pi

1. Plug your SD card and USB flash drive into your Raspberry Pi
2. Connect your Raspberry Pi to your computer (not a router) with an Ethernet cable
3. Plug in power and wait for the Pi's lights to indecate that it has an Ethernet connection
4. Open your SSH tool (PuTTY or Mac's Terminal for example) and connect to pi@<same-ip-as-in-cmdline.txt>
5. Enter the command sudo mkdir /mnt/MySite
6. Open /etc/fstab in a text editor and add the following line at the bottom:
/dev/sda1 /mnt/MySite defaults 0 2
and save it
7. Open /etc/rc.local in a text editor and add the following lines before exit 0:
cd /mnt/MySite
sudo python -m SimpleHTTPServer 80 &
8. Just to be safe, run sudo raspi-config and select Boot Options, then Console and select <OK> then <Finish> and, when asked to reboot, answer <Yes>

Step Four: Power up

1. You can now close your SSH tool and again wait for the Ethernet indecators to light up. Then open a web browser and enter the address from cmdline.txt into the address bar. You should then see the index.html file that you added to your USB flash drive.





Another example

Some more words about this other thing.
More GitHub
More blog-ish thing posts about this