Raspberry Pi 2 Server Essentials
eBook - ePub

Raspberry Pi 2 Server Essentials

Piotr J Kula

Share book
  1. 174 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Raspberry Pi 2 Server Essentials

Piotr J Kula

Book details
Book preview
Table of contents
Citations

About This Book

Transform your Raspberry Pi into a multi-purpose web server that supports your entire multimedia world with this practical and accessible tutorial!

About This Book

  • Host websites, games, and even stream HD videos with the impressive power of Raspberry Pi 2
  • Get to grips with embedded programming by turning your Pi into the cloud server that can be used to power Internet of Things projects
  • Make the Raspberry Pi 2 the center of your latest tech experiments and discover how it can manage and host resources

Who This Book Is For

Seeking inspiration for some new tech projects? Want to get more from your Raspberry Pi? This book has been created especially for you!

What You Will Learn

  • Host your Raspberry Pi as a web server using the minimum power resources
  • Connect your Pi to the Internet and perform network benchmarking
  • Explore the cross-platform features of the Pi as you run Python, Node.JS, ASP.NET, and PHP all in one place
  • Share files over the Internet using your Pi as a file server
  • Turn your Pi into a game server, host and engage into playing
  • Enjoy live HD video streaming and exclusive real-time text overlays

In Detail

There's no end to what you can do with a Raspberry Pi – it makes a huge range of tech projects possible. This book shows you how to transform it into a multipurpose web server, able to store and manage resources that lets you build some truly innovative and impressive computing creations. You'll learn how to use your Raspberry Pi 2 to host a website using a range of different languages, host a game server, store files, and run everything from a media center to a cloud network. If you want to take control of your technological world, start building your own server and find out what's possible with the Raspberry Pi microcomputer.

Begin by getting your Pi set up – follow each step as the book shows you how to prepare a network and configure the additional features that you'll need to build your projects. Once you've done this you'll dig a little deeper and set up your pi as a file server, making sure it's built for speed using a range of different tools, including Python, Node.js and ASP.NET. Following this the book shows you how to extend your server to allow you to host games, and stream live HD video before customizing it even further to create a fully-fledged media center.

It doesn't stop there however – the book then dives into the exciting world of the Internet of Things (IoT). You'll learn how to install Windows IoT onto your Raspberry Pi, the operating system that's driving embedded software projects all around the world. Once you've done this you'll be ready to explore IoT further, as the book shows you how to use your device to host a cloud network that can form the basis of a wider IoT project.

Style and approach

Packed with plenty of practical examples that walk you through a number of Raspberry Pi projects, this book is an accessible journey into embedded computing and Internet of Things.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Raspberry Pi 2 Server Essentials an online PDF/ePUB?
Yes, you can access Raspberry Pi 2 Server Essentials by Piotr J Kula in PDF and/or ePUB format, as well as other popular books in Informatik & Hardware. We have over one million books available in our catalogue for you to explore.

Information

Year
2016
ISBN
9781783985692
Subtopic
Hardware
Edition
1

Raspberry Pi 2 Server Essentials


Table of Contents

Raspberry Pi 2 Server Essentials
Credits
About the Author
About the Reviewers
www.PacktPub.com
eBooks, discount offers, and more
Why subscribe?
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
Downloading the color images of this book
Errata
Piracy
Questions
1. Getting Started with the Raspberry Pi
Hardware requirements
Power supply
USB hub
SD cards
Extra peripherals
Essential peripherals
Useful peripherals
Internet 3G dongles
Audio recording
Other media add-ons
Fun peripherals
Installing Raspbian on the Raspberry Pi
Understanding the design of the Raspberry Pi
Boot process
Other capabilities
Hardware limitations
Network speeds
USB bottlenecks
Time
References
Summary
2. Preparing a Network
Local Area Network (LAN)
The eth0 port
The wlan0 interface
The loopback (LO) interface
A wireless configuration (Wi-Fi)
Recommended wireless adapters
Setting up from a desktop
Setting up from a console
Using wicd-curses
A static network address
Testing and benchmarking your network
Basic tests
Advanced benchmarking tools
A speedtest application
iPerf
Recommended bandwidth
Internet configurations
Home packages
Business packages
Dynamic DNS
Installing a client
The free Dynamic DNS domain workaround
Summary
3. Configuring Extra Features
Updating Raspberry Pi
Updating the firmware
Updating packages
Updating distribution
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 Fast Web Servers and Databases
Apache versus nginx versus Kestrel
Installing nginx
Configuring the nginx virtual hosts
Extra frameworks for nginx
Python API
Executing Python
Node.js
Installing Node.js
What is NPM
The Node.js server
.NET and ASP.MVC
Prerequisites for .NET 5
Installing DNVM, DNU and DNX
Installing DNX
Running the MVC website
MVC and nginx
Other .NET applications
Installing PHP
Installing a database
Installing MySQL
Installing phpMyAdmin
Installing SQLite
Summary
5. Setting Up the Raspberry Pi as a File Server
Connecting the external storage
Preparing the storage medium
Listing the available drives
Formatting a drive
Creating a EXT4 partition
Mounting the drives
Remounting a disk after reboot
Accessing files
The FTP service
Connecting with FileZilla
Connecting with WinSCP
The Samba service
Installing and configuring Samba
Network shares
AFP for Macintosh
Installing and configuring Netatalk
Shares and Time Machine
BitTorrent Sync
Installing BTSync 2
The hardware RAID
Configuration
Massive storage
Redundant storage
Summary
6. Setting Up Game Servers
Updating to Jessie
Selective settings
Game servers
OpenTTD
Installing OpenTTD
Configuring OpenTTD
Playing OpenTTD
Freeciv
Installing Freeciv
Configuring Freeciv
Playing Freeciv
OpenArena
Installing OpenArena
Configuring OpenArena
Playing OpenArena
Minecraft
Installing the Java Hard-Float
Installing the Minecraft server
Configuring Minecraft
Playing Minecraft
Summary
7. Streaming Live HD Video
Installing UV4L
Configuring the UV4L-RaspiCAM
Installing WebRTC
WebRTC streaming
Real time HTTP streaming
Web conferencing
Streaming the X desktop
Text overlay
Object detection and tracking
Removing the overlay watermark
The HUD sample
Using the overlay binary
Inline variables
Compiling the overlay code yourself
Summary
8. Setting Up the Pi as a Media Center Server
Slideshows
Using fbi
Playing videos
OMXPlayer for video playback
Playing audio
Aplay for audio playback
OMXPlayer for audio playback
Using AirPlayer
Using alsamixer
Installing OSMC
Configuring OSMC
Enabling other codecs
Wireless configuration
Media sources
Using add-ons
AirPlay
Enabling CEC and remotes
Performance optimization
Overclocking
Summary
9. Running Your Pi from a Battery's Power Source
Hardware requirements
Charging stations
Battery packs
Voltage regulator
Ohm's Law
Discharge curves
Discharge characteristics
Putting it all together
How long will it last?
Summary
10. Windows IoT Core
Getting started
Flashing IoT
Python for Linux or Windows 7 and 8
The first boot
Remote connections
Visual Studio (VS)
Installing Visual Studio 2015
The Hello World application
Deploying the application
Debugging
Breakpoints
Unhandled exceptions
Samples
Windows 10 IoT WebGUI
Setting up the startup app
Peripherals
Bluetooth
Wireless
Summary
11. Running Your ownCloud
Installation
Requirements
MySQL
nginx and PHP
Permissions
The first configuration
The admin configuration
The server admin
Installing apps
Calendar
Other apps
Daily functionality
The World Wide Access
Summary
12. The Internet of Things – Sensors in the Cloud
What is IoT?
Ohm's law
How much power?
Choosing sensors
Resistors, fuses, and diodes
Transistors
Integrated Circuit Packages
Putting it all together
Accurate data using Arduino
Building a weather station
Real-time embedded devices
The data communication
Real-time events
Analog inputs
Parts required
Storing data on the Cloud
Phant
Summary
Index

Raspberry Pi 2 Server Essentials

Copyright © 2016 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 permis...

Table of contents