Raspberry Pi

After speaking to Rob today about potentially setting up a server on a Raspberry Pi, he decided to lend me one to play around with. I thought that this would be a good idea to do in preparation for reading week when I won’t be on campus and won’t have access to the dakar server. By using a Raspberry Pi that has Apache installed, I will be able to work on my code and view it online by creating my own server space .

The Raspberry Pi is a low cost, credit-card sized computer that plugs into a computer monitor or TV, and uses a standard keyboard and mouse. It is a capable little device that enables people of all ages to explore computing, and to learn how to program in languages like Scratch and Python. It’s capable of doing everything you’d expect a desktop computer to do, from browsing the internet and playing high-definition video, to making spreadsheets, word-processing, and playing games.

To start me off, Rob let me borrow a Raspberry Pi (Model B), a blank SD card and a mini usb power cable. The first thing that I needed to do was download and install the Raspbian operating system onto the SD card, so I took a trip to the Raspberry Pi Downloads page.

Untitled3

Screenshot of The Raspberry Pi Website

Once the operating system had been installed onto the SD card, I gathered everything that I would need to set up the Raspberry Pi. As the Pi can output to HDMI, I used my TV as a screen. I connected the Pi to the internet via an Ethernet cable and I used my wireless mouse and keyboard from my desktop PC.

The next step required me to head off to the Documentation section of the Raspberry Pi site. On there I found a tutorial on how to install all of the relevant things to turn the Raspberry Pi into a server.

The Raspberry Pi is most commonly controlled via a command line (unless you use xstart to boot it in desktop mode). The first command I used was “sudo apt-get install apache2 -y”. This installed apache. To confirm that this had worked, I went to http://http://10.240.49.240/ which is the IP address of the Raspberry Pi.

Untitled4

Screenshot of my server page

The next step was to install PHP, by typing “sudo apt-get install php5 libapache2-mod-php5 -y”. This made it so that I could upload php files to the Raspberry Pi. After doing this, I decided to have a go at uploading files to the Raspberry Pi. Having already installed the client side of FileZilla, I connected to the Pi. However, upon trying to upload a file, I was denied access to the server space. I looked into the issue online and found the command “sudo chmod 777 -R /var/www” which changed the restrictions of the file location. I was then able to upload files without a problem.

References

Braben, D. Lang, J. Lomas, P. Mycroft, A. Mullins, R. and Upton, E., 2008. What is a Raspberry Pi? [online]. Available from: http://www.raspberrypi.org/help/what-is-a-raspberry-pi/ [3/1/2015].

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s