Questions, comments, and discussion for this site and the Raspberry Pi can be found on Reddit.
This website is a documented exploration focusing on the Raspberry Pi. I am hosting this content off of the Raspberry Pi in my living room. A lot of trial and error went into setting up the the Pi, and this site is designed to be a resource for myself and others who are interested in exploring the technology.
The specific Raspberry Pi that this site is being created on is the 256MB Model B version of the Pi. I'm expecting
the newer 512MB model to come in the mail shortly. I'm interested to see the difference in performance. When
I run the "top" command in the Pi's shell, with MySQL server loaded (the biggest resource hog), I have around 12mb of RAM free
on the system.
I swapped out the SD card from my 256MB Pi and popped it in the new 512MB Pi. I reconfigured the port forwarding on my router to look for the new Pi, and here I am. I immediately reviewed my available resources and saw that the RAM is recognized, so fortunately I don't have to reinstall the OS.
I've found the Raspberry Pi to be an excellent tool for learning and experimenting with multiple languages covering several areas of computing.
Linux - Even without a local monitor attached to the Raspberry Pi, a local (or remote) SSH connection can be established to directly interact with the Pi. Using this cheap technology, one can safely learn to use the Linux environment while modifying user account access and file permissions. The default Raspian Wheezy distribution even comes preloaded with Python for development experimentation. Additionally, one can learn to program using other languages by installing free compilers.
The webserver that you are reading this page from is running on the 2012-10-18 Raspbian Weezy distribution. Installation of the OS is rather easy, and can be completed in a few steps. Several YouTube videos can be found that completely take the user through the process, however I will briefly outline the steps towards getting your Pi up and running.
I'm not fully utilizing the capabilities of my Pi's server installation. I have other dedicated servers I use that have the computing power to manage a full website, but that does not take away from my curiosity of the Pi's capabilities. The setup that I refer to in this section will allow a user to fully access the configuration of a webserver with web scripting and database access.
Again, the Pi is a fully capable computer, and is advertised as an educational tool. While keeping that in mind, one can use the Pi to fully test and learn web application development. The reference I use in this section describes the installation of the Apache web server, PHP5 backend scripting language interpreter, and MySQL database server. This site has the MySQL database server running, but no databases installed on it at this point. The MySQL server is the biggest resource hog of RAM that I have running on my Pi by a long shot.
I have used the commands referenced here to install all of my server software.
The best lesson I've learned so far while using Linux is that, If something isn't working the way you think it should be, it's probably a permissions issue. With that said, permissions are basically a set of rules belonging to every file and directory on your system. They determine who can have access to each file or directory, and also how much access they receive.
This is a learning experience for me, and I'm not a Linux expert; but I know enough to get around and I can figure out how to solve a problem I encounter. The Pi allows a user to experiment with file permissions without actually putting a complete system in danger.
I had to play around with the /var/www directory permissions and also each individual file's permissions to get the files accessible where I wanted them. This server has the /var/www owned by the user and group www-data. I am editting this page right now from Notepad++ on my Windows 7 laptop PC. When I click save on the menubar uptop, it automatically loads the file to my Pi via FTP as user pi. I'm not sure how the SD card is going to handle the repeated updating, since I've read about how a swap partition can destroy the card.
Aside from that, I've also added my user pi to the www-data user group.
Currently I need to determine why I do not have the access for my pi user through FTP the same as I do in SSH.
By installing a VNC daemon, one can access the graphical desktop of their Raspberry Pi from a remote computer. Installation is simple with a command from the shell, and then one can write a Bash script to automatically start the server on boot.
The setup is thoroughly documented on this website, which is the reference I used to get my Pi's VNC Server up and running. Another great resource I used for seeing this setup and client software to access the server can be found here.
When I installed the script to run the server, I had difficulty getting the server to load. I installed the software from my laptop over SSH, and then I created the script to autoload it. Make sure you make the script executable as detailed in the instructions, and also after the first boot loading the server, I was required to establish a password again eventhough I did after manually loading it. I don't think it required me to do it after loading the OS on another SD card, but I believe I may have initialized the boot script to run the server under another user name (root) the first time around. I now make note to not use the root account, and stay with pi.
I chose to setup vsftp to serve as my FTP daemon. This allows file access from Filezilla and Notepad++ for easy file manipulation on the Pi. Initialization was easy, and I used this webpage as a guide to do it. I followed the configuration directions exactly as shown here to establish the server.
I edit this site from Notepad++. It includes the NppFTP plugin, which uploads files to my Pi anytime I save them from the IDE.
I use Filezilla to upload images and other files to my Pi. I noticed that each time I upload a new file to my webserver, I must change the file permissions to make that file accessible from the web browser. I can easily change file permissions from within Filezilla.
I use no-ip.com for DNS routing because I have a dynamic IP from my cable provider. On the client side, I use ddclient to update the ip on no-ip.com whenever I'm assigned one from the ISP. I've been having a little difficulty with this, and am currently using this configuration.
# Configuration file for ddclient generated by debconf
password='(actually type your password in between the single quotes, no parathenses)'
I have a Netgear wireless router that the Pi is wired into. Using the router's internal configuration, I assigned a static IP to the Pi so that I can also use port forwarding to open up my ports for remote access.
I have not editted any Linux configuration files to establish a local static IP. I do not believe that this is necessary since the router identifies the MAC address on my Pi and assigns it's own static IP. I have noticed other router firmware that will not allow local static IP assignments, and this may be when it is necessary in the Pi configuration.
UPDATE:Here is the code for the website as of 8:26pm EST on December 11, 2012.
Updates include AJAX calls to updating system resources in real time and cleaner structure.
Page rendered in 0.1305 seconds