I figured I may as well share it here on the off chance it helps someone out.
***************************************************************
PREPARE THE SD CARD
- slotted sd card into laptop's card reader
- used win32diskimager to write the debian squeeze img to sd card
- opened boot partition and renamed boot_enable_ssh.rc to boot.rc (as I run my rpi headless and only access via ssh)
- rebooted laptop into gparted live
- used gparted to modify sd card partitions to make full use of 16gb
GET THE RASPBERRY PI ON THE NETWORK / INTERNET
- rebooted laptop back into windows; launched dhcp server on laptop
- configured internet sharing of wifi connection
- plugged rpi network directly into laptop network
- slotted sd card into rpi and booted
- ping -t 192.168.1.100 (the first ip of my dhcp range)
- once it was replying, connected to rpi via ssh using putty
- log into rpi
INITIAL SETUP OF OS ON RPI
note: everything below which is prefixed with a ]$ is a command completed via the putty ssh terminal window
- configure timezone
Code: Select all
$ sudo dpkg-reconfigure tzdata
Code: Select all
$ sudo apt-get update
Code: Select all
$ sudo apt-get upgrade
Code: Select all
$ sudo apt-get install ca-certificates
Code: Select all
$ sudo wget http://goo.gl/1BOfJ -O /usr/bin/rpi-update && chmod +x /usr/bin/rpi-update
Code: Select all
$ sudo apt-get install git-core
Code: Select all
$ sudo rpi-update
Code: Select all
$ sudo shutdown -r now
- setup rpi's ssh to automate future logins via authorized key
Code: Select all
$ mkdir .ssh
Code: Select all
$ chmod 700 .ssh/
Code: Select all
$ nano .ssh/authorized_keys
Code: Select all
$ chmod 600 .ssh/authorized_keys
note: I decided to use cherokee over apache because it is slimmer and far more simple to administer
I basically use the same steps from here: http://www.howtoforge.com/installing-ch ... an-squeeze
But I found that this guide didn't mention creating the www-data group
- install mysql, during this process you will be prompted to set a mysql root password
Code: Select all
$ sudo apt-get install mysql-server mysql-client
Code: Select all
$ sudo addgroup www-data
Code: Select all
$ sudo apt-get install cherokee
- install php5
Code: Select all
$ sudo apt-get install php5-cgi
Code: Select all
$ sudo nano /etc/php5/cgi/php.ini
- restart cherokee so it will pick up php
Code: Select all
$ /etc/init.d/cherokee restart
Code: Select all
$ sudo cherokee-admin -b
- go to vServers, pick the default vhost and go to the Behavior tab; click the Rule Management button
- click the "New" button next to Behavior to add a new rule
- an overlay window pops up; select "Languages" from the left column, then choose "PHP" and click the "Add" button
- click the "Create" button in the Configuration Assistant window:
- to finalize the setup, click the box that says NON FINAL and it should change to FINAL
- in the upper right corner there should now be a "Save" link - click it to save the new configuration
- click the "Graceful restart" button
- back in the rpi ssh window, hit ctrl+C to shut down the cherokee admin web page
- grant my pi user permissions of the www directory
Code: Select all
$ sudo chown -R pi www/
Code: Select all
$ nano /var/www/info.php
- ctrl+X and save
- in the web browser on my laptop I punch in http://192.168.1.100/info.php which should display a whole stack of info about the system
- do a little dance, your RPi is now a little web server