raspberry pi 101
DESCRIPTION
RaspberryPi Introduction by PeenTar Team, coordinated by Bob Hardian, Ph.D at Indonesia Creative Open Source SoftwareTRANSCRIPT
RaspberryPi 101
Indonesia Creative Open Source SoftwareBalai Kartini - Jakarta
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
Join Us
www.peentar.org
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
One Device Endless Possibilities
A Quick Start Guide
Raspbian Initial Setup
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
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
Set Your Hostname
Set to your likingsudo nano /etc/hosts
Building File Server With Raspberry Pi
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
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
Configure Samba Server
[global]
create mode = 664
workgroup = RASPBERRYPI
security = SHARE
usershare allow guest = yes
Configure Samba Server
[public]
comment = shared
path = /home/shares/public
guest ok = yes
read only = no
public = yes
writeable = yes
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
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
Configuring the Samba client on a Windows PC
Right Click on Computer Map Network Drive
Configuring the Samba client on a Windows PC
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
Building Web Server With RPi
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
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
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/
Let's Deploy It
Raspberry Pi Media Center
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
Control Your Media Center
XBMC Remote
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