raspberry pi 101

32
RaspberryPi 101 Indonesia Creative Open Source Software Balai Kartini - Jakarta

Upload: tonny-adhi-sabastian

Post on 14-May-2015

1.651 views

Category:

Technology


4 download

DESCRIPTION

RaspberryPi Introduction by PeenTar Team, coordinated by Bob Hardian, Ph.D at Indonesia Creative Open Source Software

TRANSCRIPT

Page 1: Raspberry Pi 101

RaspberryPi 101

Indonesia Creative Open Source SoftwareBalai Kartini - Jakarta

Page 2: Raspberry Pi 101

Who We Are ?

PeenTar Team● Gladhi Guarddin ([email protected])● Abi Rheza ([email protected])● Jan Peter Alexander ([email protected])● Tonny Adhi S ([email protected])● Ramot Stephanus (ramot.stephanus@gmail.

com)● Zulfikar Ian ([email protected])● Maulidan Yulianto

([email protected])

Page 3: Raspberry Pi 101

Join Us

www.peentar.org

Page 4: Raspberry Pi 101

What We Will Learn Today ?

● One Device Endless Possibilities ● Raspberry Pi Quick Start Guide● Raspbian Initial Setup● Building File / Media Server With Raspberry Pi● Building Web Server With Raspberry Pi● Use Your Media Server : Raspbmc● Controlling Your Media Server

Page 5: Raspberry Pi 101

One Device Endless Possibilities

Page 6: Raspberry Pi 101
Page 7: Raspberry Pi 101

A Quick Start Guide

Page 8: Raspberry Pi 101
Page 9: Raspberry Pi 101
Page 10: Raspberry Pi 101

Raspbian Initial Setup

Page 11: Raspberry Pi 101
Page 12: Raspberry Pi 101

Setup Your Repository

Adjust your sources.list file :sudo nano /etc/apt/sources.list

Our Repository

deb http://kambing.ui.ac.id/raspbian/raspbian

wheezy main contrib non-free

deb-src http://kambing.ui.ac.id/raspbian/raspbian

wheezy main contrib non-free

We will use local repository in this workshop

Page 13: Raspberry Pi 101

Setup Your Repository

If needed, the Raspbian public key can be stored into your apt-get keyring using the following command:

sudo wget \ http://archive.raspbian.org/raspbian.public.key \ -O - | sudo apt-key add -

Also If needed, you will also need to setup your network. Mostly the first setup is DHCPsudo nano /etc/network/interfaces

sudo /sbin/route add default gw $GW_IP

Page 14: Raspberry Pi 101

Set Your Hostname

Set to your likingsudo nano /etc/hosts

Page 15: Raspberry Pi 101

Building File Server With Raspberry Pi

Page 16: Raspberry Pi 101

Install the samba software

Update and Upgrade Raspbian:sudo apt-get update | sudo apt-get upgrade

Install samba:sudo apt-get install samba samba-common-bin

Rename your default samba configuration file:sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.old

Page 17: Raspberry Pi 101

Configure Samba Server

Create public foldersudo mkdir /home/shares/public

Change The Permission. Warning : Don't Do This on Secure Setupsudo chmod 777 /home/shares/public

Create new configuration file

sudo nano /etc/samba/smb.conf

Page 18: Raspberry Pi 101

Configure Samba Server

[global]

create mode = 664

workgroup = RASPBERRYPI

security = SHARE

usershare allow guest = yes

Page 19: Raspberry Pi 101

Configure Samba Server

[public]

comment = shared

path = /home/shares/public

guest ok = yes

read only = no

public = yes

writeable = yes

Page 20: Raspberry Pi 101

Configure Samba Server

Restart samba to use the new configuration file.sudo /etc/init.d/samba restart

Done. Let's test it using our Media Center

Page 21: Raspberry Pi 101

Adding USB StorageCheck device drive:dmesg | tail

You should see some lines like this:usb 2-6: New USB device found, idVendor=0718, idProduct=0077

scsi 30:0:0:0: Direct-Access Imation USB Flash Drive 0.00 PQ: 0 ANSI: 2

sd 30:0:0:0: [sdb] 7897088 512-byte hardware sectors (4043 MB)

See the [sdb] above, that means this device appeared as /dev/sdb.

Mounting Disk:sudo mkdir /home/shares/public/disk1

sudo mount /dev/sdxx /home/shares/public/disk1

Where sdxx is where your drive is in the file system's device hierarchy. i.e. /dev/sdb or /dev/sda1

Page 22: Raspberry Pi 101

Configuring the Samba client on a Windows PC

Right Click on Computer Map Network Drive

Page 23: Raspberry Pi 101

Configuring the Samba client on a Windows PC

Page 24: Raspberry Pi 101

Configuring the Samba client on a Linux PC

Open a file manager (e.g. nautilus, thunar) and enter

smb://raspberrypi/

Or :

smb://$SMB_HOST_IP/

Or :

Just Scan Your Network With Your Media Center

Page 25: Raspberry Pi 101

Building Web Server With RPi

Page 26: Raspberry Pi 101

Update and Upgrade Raspbian:sudo apt-get update | sudo apt-get upgrade

Apache2 :aptitude install apache2

MySQL:aptitude install mysql-server mysql-client

-- You will be asked to provide a password for the MySQL root user:

Installing Apache2, MySql

Page 27: Raspberry Pi 101

PHP5:aptitude install php5 libapache2-mod-php5

Getting MySQL Support In PHP5aptitude install php5-mysql

Optional: aptitude install php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap

php5-mcrypt php5-memcache php5-mhash php5-ming php5-ps php5-pspell php5-

recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl php5-json

phpMyAdmin:aptitude install phpmyadmin

-- You will be asked to provide a Username and Password for phpMyAdmin

Installing PHP5 & phpMyAdmin

Page 28: Raspberry Pi 101

Configure Apache to include phpMyAdmin

add the following line in the end of /etc/apache2/apache2.conf

# Include phpMyAdminInclude /etc/phpmyadmin/apache.conf

Access phpMyAdmin under http://localhost/phpmyadmin/

Page 29: Raspberry Pi 101

Let's Deploy It

Raspberry Pi Media Center

Page 30: Raspberry Pi 101

Get And Deploy It

Raspbc Disk Image :http://tinyurl.com/raspbmc

We Will Use Our Local Repository

Deploy It :sudo dd if=raspbmc-final.img of=/dev/sdX bs=256k

Boot and Wait For Initial Setup

Page 31: Raspberry Pi 101

Control Your Media Center

XBMC Remote

Page 32: Raspberry Pi 101

References

http://elinux.org/RPi_Hub

http://www.raspberrypi.org/

http://www.raspberrypi-spy.co.uk/

And Don't Forget To Join Our Project Page Athttp://peentar.org