raspi

Embed Size (px)

Citation preview

  • 7/29/2019 raspi

    1/6

    Raspberry Pi Setup

    ------------------------------------------------------------------------

    Install OS

    -----------------------

    Downlod image (Wheezy Raspbian)

    Copy img to SD card:

    dd if=debian.img of=/dev/disk1 bs=1m

    Boot:

    Ethernet cable pi -> mac

    Mac enabling internet sharingPI is now on IP 192.168.2.2

    Mac is 192.168.2.1

    ssh [email protected] (pass: raspberry)

    Initial Config

    -----------------

    sudo raspi-config

    -> Expand root fs

    restart

    sudo raspi-config

    -> Enable High Overlock Mode

    -> Set new password

    -> Set Timezone

    -> Change memory split (Gpu=16mb)

    -> Change boot behaviour (no GUI)

    Reboot!

    Update Cache, install Vim

    -----------------------

    Login again. remember to use new password.

    sudo apt-get updatesudo apt-get install vim (to get proper keyboard movements)

  • 7/29/2019 raspi

    2/6

    WiFi Config

    ------------------

    plug in edimax dongle

    sudo vi /etc/networking/interfaces

    Default:

    auto lo

    iface lo inet loopback

    iface eth0 inet dhcp

    allow-hotplug wlan0

    iface wlan0 inet manual

    wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

    iface default inet dhcp

    Change to:

    auto lo

    iface lo inet loopback

    iface eth0 inet dhcp

    allow-hotplug wlan0

    iface wlan0 inet dhcp

    wpa-ssid "ICanSeeArthursSeat"

    wpa-psk "Sc0tl4nd"

    iface default inet dhcp

    Then restart the pi: sudo reboot

    Now your ssh session will drop. Start a new one.

  • 7/29/2019 raspi

    3/6

    Use ifconfig to determine if you have connected and have an IP address.

    Now, we set it up as a static address, sudo vi /etc/networking/interfaces and

    set all to:

    auto lo

    iface lo inet loopback

    iface eth0 inet dhcp

    allow-hotplug wlan0

    iface wlan0 inet static

    address 192.168.1.10netmask 255.255.255.0

    gateway 192.168.1.254

    network 192.168.1.0

    broastcast 192.168.1.255

    wpa-ssid "ICanSeeArthursSeat"

    wpa-psk "Sc0tl4nd"

    iface default inet dhcp

    now remove the ethernet cable

    sudo reboot.

    wait for it to come up and ssh to 192.168.1.10

    try pinging google.com

    sudo vi /etc/resolve.conf

    Set:

    nameserver 192.168.1.254

    nameserver 8.8.8.8

    Update All Software---------------------------

  • 7/29/2019 raspi

    4/6

    sudo apt-get upgrade

    Press Y to accept changes

    It will take ages to install and configure packages

    Mount USB Drive

    -----------------------

    Mount the drive:

    sudo mkdir /mnt/lacie

    sudo chmod 0777 /mnt/lacie

    sudo mount /dev/sda1 /mnt/lacie

    Check it works:ls /mnt/lacie

    Add to fstab (so it mounts on boot:

    sudo blkid

    -> copy the UUID for the drive you want

    sudo vi /etc/fstab

    Insert for fat drive:

    UUID=copied_uuid /mnt/lacievfat rw,auto,users,umask=000 0 0

    Insert for ext4 drive:

    UUID=copied_uuid /mnt/large ext4 2 1

    sudo umount /dev/sda1

    sudo mount -a

    Check it works:

    ls /mnt/lacie

    touch /mnt/lacie/hello

    rm /mnt/lacie/hello

    Samba Install

    ------------------

    sudo apt-get install samba samba-common-binsudo vi /etc/samba/smb.conf

    comment out everything from [homes] onward (add semi-colon at start of

    line)add the following at the end:

  • 7/29/2019 raspi

    5/6

    [lacie]comment = Lacie Share

    path = /mnt/laciewriteable = yesonly guest = yes

    create mask = 0777directory mask = 0777browseable = yespublic = yes

    OR:[lacie]

    path = /mnt/laciewriteable = yes

    [public]

    path = /home/piwriteable = yes

    sudo smbpasswd -a pi

    -> Enter password for pi

    Test you can read / write and overwrite on other systems

    Transmission Daemon---------------------------------

    sudo apt-get install transmission-daemon

    sudo service transmission-daemon stop

    sudo vi /etc/transmission-daemon/settings.json

    Change:

    "download-dir": "/mnt/lacie/Downloads",

    "rpc-enabled": true,

    "rpc-password":

    "{7bb32ea2489b7be2fdedb1895e025d324a411b3e7jsGFE/h",

    (enter unencrypted pass, it will encrypt on start)

  • 7/29/2019 raspi

    6/6

    NFS Server Setup

    -----------------------------

    sudo apt-get install nfs-kernel-server nfs-common rpcbind

    sudo vi /etc/exports

    Add line:

    /mnt/lacie *(rw,insecure,no_subtree_check)

    sudo update-rc.d rpcbind enable && update-rc.d nfs-common enable

    sudo service rpcbind start

    sudo service nfs-kernel-server restart

    To mount on a mac: http://kampmeier.com/chris/blog/?p=43

    http://kampmeier.com/chris/blog/?p=43http://kampmeier.com/chris/blog/?p=43