Raspberry Pi Webserver



Similar documents
Raspberry Pi Setup Tutorial

Embedded Based Web Server for CMS and Automation System

SETTING UP A LAMP SERVER REMOTELY

Raspberry Pi Android Projects. Raspberry Pi Android Projects. Gökhan Kurt. Create exciting projects by connecting Raspberry Pi to your Android phone

Adafruit's Raspberry Pi Lesson 6. Using SSH

Adafruit's Raspberry Pi Lesson 7. Remote Control with VNC

How to Install Multicraft on a VPS or Dedicated Server (Ubuntu bit)

CDH installation & Application Test Report

OS Installation Guide Red Hat Linux 9.0

Adafruit's Raspberry Pi Lesson 5. Using a Console Cable

Local Caching Servers (LCS): User Manual

ULTEO OPEN VIRTUAL DESKTOP UBUNTU (PRECISE PANGOLIN) SUPPORT

Setting up a Web Server using Raspbian Wheezy on the Raspberry Pi ( Kenneth A Spencer)

User Manual of the Pre-built Ubuntu Virutal Machine

Create a virtual machine at your assigned virtual server. Use the following specs

Using the Raspberry Pi to establish a Virtual Private Network (VPN) Connection to a Home Network

Laboration 3 - Administration

User Manual of the Pre-built Ubuntu 9 Virutal Machine

secucam User Manual Version 1.1.x Darhon Software

INUVIKA OVD INSTALLING INUVIKA OVD ON UBUNTU (TRUSTY TAHR)

Chapter 1 Hardware and Software Introductions of pcduino

HOW TO BUILD A VMWARE APPLIANCE: A CASE STUDY

EZblue BusinessServer The All - In - One Server For Your Home And Business

CPSC 226 Lab Nine Fall 2015

«Disaster Recovery» A DOM Restore Guide for Thecus NAS

Consolidated Monitoring, Analysis and Automated Remediation For Hybrid IT Infrastructures. Goliath Performance Monitor Installation Guide v11.

Setting up a Raspberry Pi as a WiFi access point

Adafruit's Raspberry Pi Lesson 1. Preparing an SD Card for your Raspberry Pi

Smartphone Pentest Framework v0.1. User Guide

Newton Linux User Group Graphing SNMP with Cacti and RRDtool

CPE111 COMPUTER EXPLORATION

Installing an open source version of MateCat

Local Caching Servers (LCS) February 2015

Option nv, Gaston Geenslaan 14, B-3001 Leuven Tel Fax Page 1 of 14

Comodo MyDLP Software Version 2.0. Installation Guide Guide Version Comodo Security Solutions 1255 Broad Street Clifton, NJ 07013

Advantech AE Technical Share Document

simplify monitoring Consolidated Monitoring, Analysis and Automated Remediation For Hybrid IT Infrastructures

Installing Booked scheduler on CentOS 6.5

ThinkServer RD540 and RD640 Operating System Installation Guide

AJ Matrix V5. Installation Manual

Remote Unix Lab Environment (RULE)

Connections and wiring Diagram

Motion Detecting Camera Security System with Notifications and Live Streaming Using Raspberry Pi

EZblue BusinessServer The All - In - One Server For Your Home And Business

INUVIKA OVD INSTALLING INUVIKA OVD ON RHEL 6

READYNAS INSTANT STORAGE. Quick Installation Guide

Operating System Installation Guide

Addonics T E C H N O L O G I E S. NAS Adapter. Model: NASU Key Features

PiFace Control & Display

3CX Phone System Cloud Server. Administration Manual

Trend Micro Incorporated reserves the right to make changes to this document and to the products described herein without notice.

APPLICATION NOTE. How to build pylon applications for ARM

Moving Drupal to the Cloud: A step-by-step guide and reference document for hosting a Drupal web site on Amazon Web Services

Rapid Access Cloud: Se1ng up a Proxy Host

CONNECTING TO DEPARTMENT OF COMPUTER SCIENCE SERVERS BOTH FROM ON AND OFF CAMPUS USING TUNNELING, PuTTY, AND VNC Client Utilities

Apache Configuration

System Area Manager. Remote Management

Week Overview. Installing Linux Linux on your Desktop Virtualization Basic Linux system administration

Cloud Homework instructions for AWS default instance (Red Hat based)

Installing the Operating System or Hypervisor

Ultra Thin Client TC-401 TC-402. Users s Guide

Sistemi ad agenti Principi di programmazione di sistema

DVS-100 Installation Guide

Reboot the ExtraHop System and Test Hardware with the Rescue USB Flash Drive

Oracle Solaris Remote Lab User Guide for Release 1.01

Amahi Instruction Manual

Apache and Virtual Hosts Exercises

SI455 Advanced Computer Networking. Lab2: Adding DNS and Servers (v1.0) Due 6 Feb by start of class

Ulteo Open Virtual Desktop Installation

Introduction to Mirametrix EyeTracker

Consolidated Monitoring, Analysis and Automated Remediation For Hybrid IT Infrastructures. Goliath Performance Monitor Installation Guide v11.

SmartFiler Backup Appliance User Guide 2.0

STB- 2. Installation and Operation Manual

Using GIGABYTE Notebook for the First Time

SOA Software API Gateway Appliance 7.1.x Administration Guide

Getting Started With! CGminer/BFGminer!

Fermilab Central Web Service Site Owner User Manual. DocDB: CS-doc-5372

Parallels Plesk Automation

Online Backup Client User Manual

Adafruit's Raspberry Pi Lesson 5. Using a Console Cable

Using Virtual PC 7.0 for Mac with GalleryPro

How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu

A+ Guide to Software: Managing, Maintaining, and Troubleshooting, 5e. Chapter 3 Installing Windows

Universal Mobile Print Server On the Cheap, and Cloud-free. What You Will Need. Configuring your Pi as a Print Server

Adafruit's Raspberry Pi Lesson 3. Network Setup

How to Remotely View Security Cameras Using the Internet

ThinkServer RD550 and RD650 Operating System Installation Guide

How to Use? SKALICLOUD DEMO

DeployStudio Server Quick Install

Kwickserver Firewall. Overwiew. Features. Two distinct internal networks. Portfilter. Documentation Version 1.1. Peter Buzanits

Preparing an IIS Server for EmpowerID installation

Rancid Server Build and Operation Overview (v0.3) (This is being done from memory so expect some errors)

Partek Flow Installation Guide

Cloud.com CloudStack Community Edition 2.1 Beta Installation Guide

JAMF Software Server Installation Guide for Linux. Version 8.6

Installing buzztouch Self Hosted

Motorola Phone Tools. Quick Start

CONNECTING THE RASPBERRY PI TO A NETWORK

Linux Server (Web, FTP, File) on Vmware

Transcription:

62 Int'l Conf. Embedded Systems and Applications ESA'15 Raspberry Pi Webserver Max Runia 1, Kanwalinderjit Gagneja 1 1 Department of Computer Science, Southern Oregon University, Ashland, OR, USA Abstract - We used a Raspberry Pi to configure and set up a webserver with an IP address and port forwarding, which would allow access from another source connected to a network. The webserver will have minimal features; we were focusing more on the development and configuration process with a very fundamental format that makes it easy to understand and simple to teach to someone who has little to no experience setting up and configuring a webserver with a Raspberry Pi. We end up using some basic SQL and a few fundamental Unix/Linux commands and some SSH since the webserver was setup on Linux and involved port forwarding from another computer. Keywords: Raspberry Pi, apache, web server, Linux, code index; 1 Introduction The raspberry pi was invented by Eben Upton. He invented it to help the kids learn the coding in a simpler way. Up to 5 million units of raspberry pi have been sold. This tiny computer is just $35 and is sparking a revolution. There is a large user community of Raspberry Pi, although, it was launched just recently on February, 29th 2012. The Pi enthusiasts are organizing community led events all over the world. Such events are full of learning for the kids to code. We planned to use a Raspberry Pi to configure and set up a webserver with an IP address and port forwarding, which would allow access from another source connected to a network. The webserver will have minimal features; we were focusing more on the development and configuration process with a very fundamental format that makes it easy to understand and simple to teach to someone who has little to no experience setting up and configuring a webserver with a Raspberry Pi. We end up using some basic SQL and a few fundamental Unix/Linux commands and some SSH since the webserver was setup on Linux and involved port forwarding from another computer. Now to elaborate on what a Raspberry Pi is, the Raspberry Pi is a credit-card-sized single-board computer developed in the UK by the Raspberry Pi Foundation with the intention of promoting the teaching of basic computer science in schools [6]. The Raspberry Pi sports a meager 256MB of RAM and a 700MHz ARM-11 processor. The Model B also contains two USB ports, an HDMI out and a 10/100 Ethernet port. For audio it possesses a 3.5mm audio jack, the HDMI output also supports audio transmission. The Raspberry Pi's GPU boasts 1 Gpixel/s, 1.5 Gtexel/s or 24 GFLOPs of general purpose compute power and is OpenGL 2.0 Compliant. Nothing too fancy or complex, just a very simple machine meant for learning and is shown in figure 1. Figure 1: Raspberry Pi There is one daunting question What could you do with such a small computer? The people are using it for various purposes. For example, Picade Arcade Cabinet has put it into practice like a arcade machine, which is very small but fully functional [2]. Another inventor used a weather ballon to put his camera attached with Raspberry Pi to the upper enviornment to record what all is happening underneath. One of the invertors used Raspberry Pi for streaming music, where it is being used as a very low-cost wireless music streaming equipment [5]. Another inovator prepared a Raspberry Pi Keyboard Computer. This innovation presents a complete computer packaged with a keyboard. One of the inovators used Raspberry Pi as a Bitcoin Miner and named it as Pi- Powered Bitcoin Miner. Therefore, this $35 tiny computer allows you to take part in mining of Bitcoin that can give you certain amount of monetary benefit [2]. The Raspberry Pi has a microcontroller. And this microcontroller s functions depend on specific timing. However, the microcontroller is largely designed to work for one purpose only. Therefore there are not operating system overheads or there are no drivers s to slow the system down. So, this microcontroller uses exceptionally detailed clock cycles to perform any task.

Int'l Conf. Embedded Systems and Applications ESA'15 63 2 Process Followed To begin the process of configuring a Raspberry Pi to work as webserver, an Operating System of a Linux Distribution, called Wheezy, specifically created for the Raspberry Pi, was downloaded onto an SD memory card with at least 4 GB of memory, via another computer, and inserted into the Raspberry PI [8]. Details of the completed installation can be viewed by opening the website [1] and logging in with the correct user credentials. A Windows Distribution or a Mac OS X can be installed instead, Linux was a personal preference. The Raspberry PI is then connected to a power source through a micro USB power supply and an Ethernet network outlet and requires a monitor and keyboard to view and give the commands, since it is a Linux based OS we did not require a mouse. With the SD card inserted and the physical connections set up properly, a configuration window appears on first boot, called raspi-config, from there the Raspberry PI can then be setup through command prompts and an options menu, as shown on page 4 in figure 2. You can alter the local time or time zone and enable ssh, as we did, but when you are finished you are going to select the second command prompt "expand_rootfs" and press enter. To put it simply, this will partition the OS of choice onto the entire space of the SD card. Afterwards you will reboot the Raspberry Pi by selecting Finish and pressing enter. Now from here on there are many different methods to finish the configuration and installations of your Raspberry Pi to make it work as a webserver, we will stick to the methods we used to accomplish this, if you are interested in other methods they are easily found all over the internet. The rest can be accomplished through following simple instructions or tutorials online. Since we enabled ssh we were then able to use to finish the setup and installations from a laptop [7]. We used the cmd console to access the pi with ssh and used sudo and Linux bash commands [4] to finish the configurations and install apache webserver and php as shown in fig. 3. These commands can be seen in the code appendix after the Conclusion section of the paper. Other OS s on the Raspberry Pi may possess a GUI you can interact with directly from the Raspberry Pi, being a Linux OS we had to use the command console without any GUI. Once the installation and configuration was finished we needed to obtain a domain name for the server. We went to noip.com [9] which allows us to use their domain name for free; otherwise we would have to purchase a domain name. With the noip domain name or server name is rasppiserver.no-ip.org, the noip domain name is highlighted for reference (fig 4.). As mentioned earlier, we used port forwarding to access the Raspberry PI from another source; another computer, phone, etc. To do this, the source would have to attempt to gain access through the router where the Raspberry Pi is connected. This can be accomplished by typing in the Public IP address 75.142.152.19 and either port 80, 21, 22, or 23 into the URL bar as so: 75.142.152.19:80. This will forward any traffic attempting to access the Public IP address towards the Local/Private IP address 192.168.1.6 of Raspberry PI, thus granting us remote access to the Raspberry Pi and its contents as shown in fig. 5. 2.1 Problems Faced Over the course of the whole set up, we encountered a few problems. Each of which required a little research to solve. Following is a list of problems we encountered and a few screen shots of the solutions we used. Here we were having trouble getting phpmyadmin to show up at rasppiserver.noip.org/phpmyadmin [1]. To solve this problem we needed to make a short cut to phpmyadmin in the apache2.conf file, so that apache knew where to include it from. (Notice the last line added to the apache2.conf file as shown in fig 6.) Another problem we came across was not being able to find a repository for the no-ip update program. First we tried to install it using sudo apt-get install no-ip2 but it was not available for the wheezy distribution. To solve this we had to download a tar file directly from the no-ip server and compile and install it ourselves. We used the command: wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz to download the tar file. We were able to get the Raspberry Pi configured and set up with a Private IP address and port forwarding working. We can access the Raspberry Pi from any computer through port forwarding, using the local IP address of designated router and a specified port [3]. The results conclude that using a Raspberry Pi to configure a webserver is simple enough that mostly anyone could accomplish it in a number of different ways. 2.2 Lessons learnt What we learnt from this work is how to configure a webserver through the use of a Raspberry Pi. We learned how port forwarding works with IP addresses. We gained some basic familiarization with sudo commands in Linux. It can also be acknowledged that webservers can host more than just html or php webpages. They can be used for file storage and organization among many more tasks with a number a uses. As mentioned before, this is not the only way to configure a Raspberry Pi, there are multiple procedures to accomplish the goal of creating a webserver with any design the owner would

64 Int'l Conf. Embedded Systems and Applications ESA'15 prefer. Also, this is not the only way to set up a webserver in general, just a very fundamental method we used for this project; there exist many more complicated methods with varying methods and different results. 3 Conclusions We were to setup a web server in very small budget. So we planned to use a Raspberry Pi to configure and set up a webserver with an IP address and port forwarding, which would allow access from another source connected to a network. In this case the given webserver has minimal features. The main focus is more on the development and configuration process with a very fundamental format that makes it easy to understand and simple to teach to someone who has little to no experience setting up and configuring a webserver with a Raspberry Pi. We used very basic SQL commands, some Linux fundamental commands, and some SSH. Code Appendix Here is a list of the commands that we used from the laptop through the command console after accessing the Raspberry Pi with ssh. 154 cd /etc/network 155 ls 156 sudo nano interfaces 157 more interfaces (edit interfaces file to make local ip static ip: 192.168.1.6) 160 sudo apt-get install apache2 php5 libapache2-mod-php5 162 sudo service apache2 restart (install apache and php) 164 sudo apt-get install mysql-server mysql-client php5- mysql (install mysql) 171 sudo chown -R pi /var/www (make user: pi the owner of /var/www -the root directory where all files go for the website hosted on our server) 172 sudo apt-get install vsftpd 173 sudo nano /etc/vsftpd.conf 174 sudo service vsftpd restart (install and edit the ftp program) 177 sudo apt-get install libapache2-mod-auth-mysql php5- mysql phpmyadmin (install phpmyadmin) 181 sudo nano /etc/apache2/apache2.conf 182 sudo service apache2 restart (edit the apache config file so that phpmyadmin can be accessed) 193 mkdir /home/pi/noip 194 cd ~/noip 196 wget http://www.no-ip.com/client/linux/noip-duclinux.tar.gz 197 tar vzxf noip-duc-linux.tar.gz 198 cd noip-2.1.9-1 199 sudo make 200 sudo make install (install the noip update program) 202 sudo /usr/local/bin/noip2 (start the no-ip update program) 4 References [1] rasppiserver.no-ip.org/phpmyadmin Last visited Feb. 2015. [2] http://www.scribd.com/doc/255957808/raspberry-pifor-beginners-revised. Last visited March 26 th 2015 [3] Hacking Raspberry Pi Timothy L. Warner, 2013. [4] http://www.openvisionnetworks.com/dev/learn%20ras pberry%20pi%20with%20linux.pdf last visited March 26 th 2015. [5] http://www.instructables.com/id/raspberry-pi-projects/ Last visited April 3rd 2015. [6] https://dev.windows.com/enus/featured/raspberrypi2support Last visited March 3rd 2015. [7] http://elinux.org/rpi_hub Last visited March 3rd 2015.

Int'l Conf. Embedded Systems and Applications ESA'15 65 [8] Learn Raspberry Pi with Linux, Peter Membery and David [9] noip.org Hows Figure2: Raspi-config window, information about the tool Figure 3: installing apache webserver and PHP

66 Int'l Conf. Embedded Systems and Applications ESA'15 Figure 4:NO-IP free member portal Figure 5: Virtual server working

Int'l Conf. Embedded Systems and Applications ESA'15 67 Figure 6: Modifications to apache.conf