Raspberry Pi Server Essentials
By Piotr J Kula
()
About this ebook
This book is targeted towards all Raspberry Pi enthusiasts who are interested in exploring the potential of Pi as a server. Even if you have no prior experience with the Raspberry Pi, you can pick up this book and develop a wide range of projects.
Related to Raspberry Pi Server Essentials
Related ebooks
Raspberry Pi Essentials Rating: 0 out of 5 stars0 ratingsRaspberry Pi Cookbook for Python Programmers Rating: 0 out of 5 stars0 ratingsRaspberry Pi Super Cluster Rating: 0 out of 5 stars0 ratingsRaspberry Pi 2 Server Essentials Rating: 0 out of 5 stars0 ratingsLearning Raspberry Pi Rating: 0 out of 5 stars0 ratingsRaspberry Pi for Secret Agents Rating: 4 out of 5 stars4/5Raspberry Pi Android Projects Rating: 0 out of 5 stars0 ratingsBuilding a Home Security System with Raspberry Pi Rating: 0 out of 5 stars0 ratingsLearning Raspbian Rating: 5 out of 5 stars5/5Raspberry Pi Computer Architecture Essentials Rating: 0 out of 5 stars0 ratingsGetting Started with Raspberry Pi Zero Rating: 5 out of 5 stars5/5Raspberry Pi Robotics Essentials Rating: 0 out of 5 stars0 ratingsRaspberry Pi Zero Cookbook Rating: 0 out of 5 stars0 ratingsRaspberry Pi Robotic Projects - Third Edition Rating: 0 out of 5 stars0 ratingsRaspberry Pi By Example Rating: 0 out of 5 stars0 ratingsRaspberry Pi :Raspberry Pi Guide On Python & Projects Programming In Easy Steps Rating: 3 out of 5 stars3/5Internet of Things with Arduino Blueprints Rating: 0 out of 5 stars0 ratingsRaspberry Pi Home Automation with Arduino - Second Edition Rating: 0 out of 5 stars0 ratingsRaspberry Pi Blueprints Rating: 0 out of 5 stars0 ratingsRaspberry Pi: The complete guide to Raspberry Pi for beginners, including projects, tips, tricks, and programming Rating: 0 out of 5 stars0 ratingsLearn Arduino Prototyping in 10 days Rating: 0 out of 5 stars0 ratingsRaspberry Pi 3 Projects for Java Programmers Rating: 0 out of 5 stars0 ratingsRaspberry Pi 3 Model B for Beginners: Explore What Raspberry Pi 3 Model B Can Do Rating: 0 out of 5 stars0 ratingsMastering BeagleBone Robotics Rating: 5 out of 5 stars5/5Building Smart Homes with Raspberry Pi Zero Rating: 0 out of 5 stars0 ratingsArduino Electronics Blueprints Rating: 4 out of 5 stars4/5Raspberry Pi: The complete guide to raspberry pi, including raspberry pi projects, tips, troubleshooting, and more! Rating: 0 out of 5 stars0 ratingsBeagleBone Home Automation Blueprints Rating: 0 out of 5 stars0 ratingsRaspberry Pi :The Ultimate Step by Step Raspberry Pi User Guide (The Updated Version ) Rating: 4 out of 5 stars4/5
Games & Activities For You
1001 Chess Exercises for Beginners: The Tactics Workbook that Explains the Basic Concepts, Too Rating: 4 out of 5 stars4/5The Everything Lateral Thinking Puzzles Book: Hundreds of Puzzles to Help You Think Outside the Box Rating: 0 out of 5 stars0 ratings101 Fun Personality Quizzes: Who Are You . . . Really?! Rating: 3 out of 5 stars3/5How to Draw Anything Anytime: A Beginner's Guide to Cute and Easy Doodles (Over 1,000 Illustrations) Rating: 5 out of 5 stars5/5The Monsters Know What They're Doing: Combat Tactics for Dungeon Masters Rating: 4 out of 5 stars4/5The Best F*cking Activity Book Ever: Irreverent (and Slightly Vulgar) Activities for Adults Rating: 2 out of 5 stars2/5Hunt A Killer: The Detective's Puzzle Book: True-Crime Inspired Ciphers, Codes, and Brain Games Rating: 0 out of 5 stars0 ratings30 Interactive Brainteasers to Warm Up your Brain Rating: 0 out of 5 stars0 ratingsEveryone's First Chess Workbook: Fundamental Tactics and Checkmates for Improvers – 738 Practical Exercises Rating: 5 out of 5 stars5/5Star Wars: Book of Lists Rating: 0 out of 5 stars0 ratingsChess: Chess Masterclass Guide to Chess Tactics, Chess Openings & Chess Strategies Rating: 3 out of 5 stars3/5Stuff You Should Know: An Incomplete Compendium of Mostly Interesting Things Rating: 3 out of 5 stars3/5Serial Killer Trivia: Fascinating Facts and Disturbing Details That Will Freak You the F*ck Out Rating: 4 out of 5 stars4/5Murder Most Puzzling: Twenty Mysterious Cases to Solve Rating: 2 out of 5 stars2/5Into the Dungeon: A Choose-Your-Own-Path Book Rating: 4 out of 5 stars4/5Bored Games: 100+ In-Person and Online Games to Keep Everyone Entertained Rating: 5 out of 5 stars5/5Harry Potter - The Complete Quiz Book Rating: 4 out of 5 stars4/5Kokology 2: More of the Game of Self-Discovery Rating: 4 out of 5 stars4/5How To Beat Anyone At Chess: The Best Chess Tips, Moves, and Tactics to Checkmate Rating: 4 out of 5 stars4/5To Kill a Mockingbird: A Novel by Harper Lee (Trivia-On-Books) Rating: 3 out of 5 stars3/5How to Kill an Earworm: And 500+ Other Psychology Facts You Need to Know Rating: 0 out of 5 stars0 ratingsThe Big Book of Nature Activities: A Year-Round Guide to Outdoor Learning Rating: 5 out of 5 stars5/5The Best Bar Trivia Book Ever: All You Need for Pub Quiz Domination Rating: 0 out of 5 stars0 ratingsThe Book of Card Games: The Complete Rules to the Classics, Family Favorites, and Forgotten Games Rating: 0 out of 5 stars0 ratingsMy Best Mathematical and Logic Puzzles Rating: 5 out of 5 stars5/5The Nightingale: A Novel by Kristin Hannah | Conversation Starters Rating: 5 out of 5 stars5/5A Gentleman in Moscow by Amor Towles (Trivia-On-Books) Rating: 2 out of 5 stars2/5
Reviews for Raspberry Pi Server Essentials
0 ratings0 reviews
Book preview
Raspberry Pi Server Essentials - Piotr J Kula
Table of Contents
Raspberry Pi Server Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Getting Started with Raspberry Pi
Hardware requirements
Extra peripherals
Essential peripherals
Wireless USB network adapters
USB hubs
Keyboards and mice
Useful peripherals
Internet 3G dongles
Sound cards
IR receivers
TV and radio receivers
Webcams
Multicard readers
Alamode
HDMI to VGA
Fun peripherals
Joysticks
USB to SATA
CAN bus
Home automation
USB missile launcher
Fingerprint scanners
Installing Raspbian on the Raspberry Pi
Understanding the design of the Raspberry Pi
Boot process
Other capabilities
Hardware limitations
Network speeds
USB bottlenecks
Time
Summary
2. Preparing the Network
Local Area Network (LAN)
The eth0 port
The wlan0 interface
The lo interface
Wireless configuration – Wi-Fi
Recommended wireless adapters
Setting up from the desktop
Setting up from the console
Using wicd-curses
Static network address
Testing and benchmarking your network
Basic tests
Advanced benchmarking tools
Speedtest application
Iperf
Recommended bandwidth
Internet configuration
ISP packages
Home packages
Business packages
Dynamic DNS
Installing the client
Dynamic DNS domain workaround
Summary
3. Configuring Extra Features
Updating the Raspberry Pi
Updating firmware
Updating packages
Outcomes
Hardware watchdog
Enabling the watchdog and daemon
Testing the watchdog
Enabling extra decoders
Buying licenses
MPEG-2
VC-1
Hardware monitoring
Summary
4. Using a Fast PHP Web Server and Database
Working with nginx
Installing nginx
Configuring virtual hosts
Installing PHP
Installing a database
Installing MySQL
Installing SQLite3
Nginx with custom modules
Summary
5. Setting Up a File Server
Preparing the storage medium
Listing the available drives
Formatting a drive
Mounting the drives
Remounting a disk after reboot
Accessing files
FTP service
Connecting with FileZilla
Connecting with WinSCP
Samba service
Installing and configuring Samba
Network shares
AFP for Macintosh
Installing and configuring
Shares and Time Machine
BitTorrent Sync
Installing Sync
Autostart
Hardware RAID
Configuration
Massive storage
Redundant storage
Summary
6. Setting Up the Game Servers
Updating to Jessie
Selective settings
Games servers
OpenTTD
Installing OpenTTD
Configuring OpenTTD
Playing OpenTTD
Freeciv
Installing Freeciv
Configuring Freeciv
Playing Freeciv
OpenArena
Installing OpenArena
Configuring OpenArena
Playing OpenArena
Minecraft
Installing Java Hard-Float
Installing the Minecraft server
Configuring Minecraft
Playing Minecraft
Summary
7. Bitcoins – Pools and Mining
Installing Bitcoind
Bitcoin wallet
Creating a Bitcoin address
Receiving Bitcoins
Sending Bitcoins
The value of Bitcoins
Mining for Bitcoins
Mining with ASICMiner
Installing CGMiner
Summary
8. Streaming Live HD Video
Streaming with GStreamer
Streaming with FFmpeg
Raspivid
Compiling nginx-rtmp
Configuring nginx
Streaming video using the RTMP module
Watching a video
RTMP streams
MPEG streams
Other streams
Summary
9. Setting Up a Media Center
Slideshows
Using fbi
Watching movies
Using OMXPlayer
Playing audio
Using aplay
Using OMXPlayer
Using AirPlayer
Using alsamixer
Installing RaspBMC
Enabling other codecs
Configuring RaspBMC
Wireless
Media sources
Using Add-ons
AirPlay
Enabling CEC
Performance optimization
Change the skin
Overclocking
NFS versus Samba
Summary
Index
Raspberry Pi Server Essentials
Raspberry Pi Server Essentials
Copyright © 2014 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: February 2014
Production Reference: 1030214
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78328-469-6
www.packtpub.com
Cover Image by Piotr J. Kula (<info@piotrkula.com>)
Credits
Author
Piotr J. Kula
Reviewers
Teemu Lätti
Warren Myers
Acquisition Editor
Kunal Parikh
Commissioning Editor
Manasi Pandire
Technical Editors
Shubhangi Dhamgaye
Nachiket Vartak
Copy Editors
Alisha Aranha
Roshni Banerjee
Gladson Monteiro
Adithi Shetty
Project Coordinator
Sageer Parkar
Proofreaders
Maria Gould
Paul Hindle
Indexers
Monica Ajmera Mehta
Tejal Soni
Graphics
Ronak Dhruv
Production Coordinator
Shantanu Zagade
Cover Work
Shantanu Zagade
About the Author
Piotr J. Kula developed an interest in computers when he was six years old. He was introduced to the world of technology by his father who came from an electronics engineering background. Piotr has lived, studied, and gained experience in three countries. Today, he is a Microsoft Certified Professional and works with reputed companies offering complex software solutions. In his spare time, he enjoys working on electrical engineering projects and also enjoys doing some home improvement projects with his wife.
I want to thank my wife Katarzyna Kula for always supporting me during my projects.
About the Reviewers
Teemu Lätti works as a software specialist for Elektrobit (http://elektrobit.com) in Kajaani, Finland. He has over 15 years of experience as a professional Java and C++ developer. He is specialized in embedded software on different platforms, for example, Raspberry Pi, Android, and Windows Phone. He has a wide experience in various software, from device drivers to user interfaces and web development. He hosts a private web page (http://cupla.net) and builds home automation experiments with Raspberry Pi and Arduino.
Warren Myers is a Data Center Automation and Management Engineer with seven years of experience with the HP automation stack. He has an extensive background and interest in technical arenas. He started programming when he was 10, and has always strived to learn new things on a regular basis. He currently works for Avnet Services as a Solutions Architect in the Cloud & Automation Practice. He has also written Debugging and Supporting Software Systems (http://cnx.org/content/col11350), a freely available e-book.
www.PacktPub.com
Support files, eBooks, discount offers and more
You might want to visit www.PacktPub.com for support files and downloads related to your book.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
http://PacktLib.PacktPub.com
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books.
Why Subscribe?
Fully searchable across every book published by Packt
Copy and paste, print and bookmark content
On demand and accessible via web browser
Free Access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.
Preface
The purpose of this book is to get you started with the Raspberry Pi. We will try and cover many different topics to demonstrate the flexibility of the Raspberry Pi. The main goal of the book is to get you started on this project that you were just not so sure about.
What this book covers
Chapter 1, Getting Started with Raspberry Pi, will check the basic equipment that we need to use with this book. We will have to look into the other peripherals that we buy and