A First Application
If you followed the directions given in this
article, you probably have a working RPi that you
are now wanting to do something with. For your
first application, how about a simple web server
that can deliver multimedia content (images,
videos, text, music files) on your local area
network. Would you be impressed if I told you this
can be done with just one line of code? Try this:
1. From a shell window, create a subdirectory
off of your home directory; something like
website, for example. Use the following
command: mkdir website.
2. Copy the files index.html and
underconstruction.jpg available at the
article link into this new directory. You can
either use the scp command to copy the
files between machines, or copy the files to a
USB Flash drive, then connect it to your RPi
and copy the files from there.
3. Change to your new directory using the command
4. Execute the following one line command:
python -m SimpleHTTPServer.
5. From a computer on your local network, hit port
8000 on your RPi. If your IP address is
192.168.0.13, for example, in your browser’s
address bar type http://192.168.0.13:8000.
Figure 6. Simple webserver home page.
If all is well, you should see the image in Figure 6.
You now have a functioning web server to play with.
The Raspberry Pi represents a breakthrough in low
cost computing power. It is a nice platform for learning
about computers and Linux, as well as for multimedia
and other computing/math/graphics intensive
applications. I hope the Raspberry Pi Foundation
succeeds in its quest to bring more people into computer
science as it is a great career to have; at least it has been
for me. Next time, I will show you how to turn your RPi
into an Internet radio and music file player. Until then,
have fun with your new piece of Raspberry Pi! NV
See our ad on page 31 for specials on two related books: Programming the Raspberry Pi: Getting Started with Python and
Getting Started with Raspberry Pi. Or, visit our webstore at http://store.nutsvolts.com!
Test Leads, Proto Boards
Special: 15% Off Adapters
March 2013 59