Book Image

Raspberry Pi Networking Cookbook

By : Rick Golden
Book Image

Raspberry Pi Networking Cookbook

By: Rick Golden

Overview of this book

<p>The Raspberry Pi is more than just a platform for teaching students how to program computers! The recipes in this book show you how this inexpensive computer can be used out of the box for a number of practical solutions that utilize existing networks and connectivity.<br /><br />The Raspberry Pi Networking Cookbook is an essential reference full of practical solutions for use both at home and in the office. Beginning with step-by-step instructions for installation and configuration, this book can either be read from cover to cover or treated as an essential reference companion to your Raspberry Pi.<br /><br />Full of practical and engaging content designed to expand and build upon your existing skills as you work through individual recipes, any computer novice can quickly learn how to become a Raspberry Pi expert without any programming knowledge required. The Raspberry Pi Networking Cookbook will allow you to revolutionize how you use technology on a daily basis, ranging from sharing your media across multiple devices to deploying your very own web portal, or even accessing your desktop remotely.</p>
Table of Contents (12 chapters)
Raspberry Pi Networking Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Preface

Back in 2006, Eben Upton and his colleagues at the University of Cambridge's Computer Laboratory noticed a disturbing trend—interviewees for degree course placement did not know enough about what a computer is or how it worked. So, he set out to design an inexpensive computer that would inspire kids to experiment with computers at home—a similar to the hobbyist computers, such as the Apple II, Amiga, and Commodore 64 computers of a generation before. On February 29, 2012, the first batch of 10,000 Raspberry Pis sold out within a few minutes, crashing the websites of the stores selling them. By the end of 2012 more than 500,000 Raspberry Pis have been sold and not just to school children.

The Raspberry Pi credit-card-sized single-board computer costs about $35 and has as much computing power as the early Xbox—more than enough power for playing games, running a home media center, a file server, a website, a small database, or a wireless access point. Its Broadcom System on a chip (SoC) architecture includes a powerful graphics processing unit (GPU), and the single-board design includes a network port, an HDMI connection, two USB ports, an SD card slot, and 512 MB of memory. There is more power and there are more features available on this small, inexpensive computer today than there were on the expensive desktop computers that ran the original Windows operating system.

This book contains recipes that take advantage of the power and features of the Raspberry Pi to create a number of practical solutions that can be realized without programming—solutions that anyone with minimal computer skills can apply in their home or office. This book is not about educating or inspiring children to learn computer programming. This book is for parents, hobbyists, and computer geeks who would like to learn more about the Raspberry Pi's "official" Raspbian Linux operating system and the advanced networking solutions that are available for the Raspberry Pi today.

What this book covers

Chapter 1, Installation and Setup, introduces the Raspberry Pi, explains how to download and install fresh images of popular Raspberry Pi distributions, and describes how to set up for the initial boot.

Chapter 2, Administration, contains a collection of recipes for the Raspberry Pi that cover the basic administration of the Raspberry Pi including how to access the Raspberry Pi remotely using Secure Shell.

Chapter 3, Maintenance, has recipes that are for the basic maintenance of the Raspberry Pi including installing and updating new software and accessing the built-in documentation.

Chapter 4, File Sharing, has recipes that are for sharing files with other computers on the same local network including automounting disks and installing a file server.

Chapter 5, Advanced Networking, has recipes that are for advanced networking solutions including setting up a webserver, a wiki, and a wireless access point.

What you need for this book

For the recipes in this book you will need the following:

  • A Raspberry Pi

  • A 5V power supply (the Raspberry Pi does not usually come with one)

  • A keyboard

  • A mouse

  • A display (a TV or a monitor)

  • A handful of SD cards

  • USB devices ( such as an external disk)

  • A network connection

Some recipes require:

  • An external USB disk

  • A USB wireless network adapter

You may also want to purchase a case and a powered USB hub. They will help you protect your Raspberry Pi. The case protects the Raspberry Pi from the elements, and the powered USB hub protects it from the power drain that results from connecting too many devices.

The recipes in the first three chapters do not require any additional devices other than the Raspberry Pi and a network connection. The recipes in Chapter 4, File Sharing, show how to connect a USB disk to the Raspberry Pi. And in Chapter 5 , Advanced Networking, the final recipe shows how to use a USB wireless network adapter to turn the Raspberry Pi into a wireless access point.

For most of the recipes in this book, you will just need the Raspberry Pi, a power supply, and a network connection. After completing the recipes in Chapter 2, Administration, the Raspberry Pi can be accessed remotely and does not require a display, keyboard, or mouse.

Who this book is for

This book is for those who would like to use the Raspberry Pi for more than just an educational tool or an experimenter's toy.

The book is also intended to turn the beginning Raspberry Pi user into an accomplished Linux administrator. Even an advanced Linux user will find the recipes in this book useful as a reference for creating advanced networking solutions with the Raspberry Pi.

The recipes in this book begin simply leading the reader through the installation and basic administration of the Raspberry Pi. As the book progresses, the solutions become more advanced, building on the knowledge gained from previous recipes. The final chapter contains a number of advanced networking solutions.

Although inexpensive, the Raspberry Pi has enough power for a number of practical solutions both at home and at the office. This book is for those who would like to use the Raspberry Pi in practical solutions, not just as an educational toy.

Conventions

In this book, you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles and an explanation of their meaning.

Code words in text are shown as follows: "This recipe shows how to update the Raspberry Pi using the apt-get command."

Any command-line input or output is written as follows:

$ sudo apt-get install pianobar

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Clicking the Next button moves you to the next screen."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.