Raspberry Pi

From EWIKI
Jump to navigation Jump to search

My Equipment:

  • Raspberry Pi A -- signed by Eden ;-)
  • Raspberry Pi Zero (get it for 5 £)
  • Raspberry Pi B+

Helpful:

  • iPazzPort 2,4G Mini Wireless Handheld Keyboard [1]

Check out https://de.wikipedia.org/wiki/Raspberry_Pi

REMARK: All instructions assume the usage of "2016-11-25-raspbian-jessie-lite" via shell commands -- no GNOME desktop etc is required.

Raspian Installation

Load image from https://www.raspberrypi.org/downloads/raspbian/ and transfer to SD card:

dcfldd bs=4M if=2016-11-25-raspbian-jessie-lite.img of=/dev/sdd

Boot Pi (connected to TV and keyboard) and login as pi/raspberry.

Initial Steps:

  1. Change the default password for pi:
    password pi
  2. Start
    sudo raspi-config
    1. choose expand_rootfs
    2. choose ssh to enable ssh
    3. chose hostname to change default password

Exit raspi-config to reboot the PI!

Set Up LANG

sudo locale-gen en_US.UTF-8

Solve DNS Problems

sudo nano /etc/network/interfaces 

then add the server IP of the openDNS

dns-nameservers 208.67.222.222 208.67.220.220 192.168.2.1

Add New Admin User

sudo adduser USERNAME 
sudo usermod -aG sudo USERNAME

Node.js Installation

sudo apt-get update && sudo apt-get upgrade
sudo apt-get install git-core build-essential python libssl-dev nano

Search for latest version on: http://nodejs.org/dist/latest-v7.x/ e.g. node-v7.2.1-linux-armv6.tar.gz

cd /opt
sudo wget http://nodejs.org/dist/[version]/node-[target].tar.gz
sudo tar xfvz node-[target].tar.gz
sudo rm node-[target].tar.gz
sudo mv node-[target]/ node/

If you picked no pre-compiled version:

cd node
sudo ./configure
sudo make
sudo make install

Add path to profile:

nano ~/.profile
export PATH=$PATH:/opt/node/bin

Arduino USB Connection

Solve Error: Permission denied, cannot open /dev/ttyACM0 by:

sudo usermod -a -G dialout [user]

"INO"

Python2 is already available on Raspian, but "pip" is missing:

sudo apt-get install python-pip 

Install "Arduino IDE" and "INO" to build and upload Arduino programs [2]:

sudo apt-get install arduino
sudo pip install ino

Usage:

ino build
ino upload

SVN client

apt-get install subversion

MediaWiki

sudo apt-get update
sudo apt-get install mediawiki
sudo apt-get install php-apc imagemagick
sudo a2enmod ssl
sudo a2ensite default-ssl

Enable Alias:

sudo vi /etc/apache2/conf-available/mediawiki.conf 
sudo a2enconf mediawiki
sudo service apache2 reload

Create a DB:

$ mysql -u root -p
mysql> CREATE DATABASE `wiki`;
mysql> create user 'wikiuser'@'localhost' identified by 'secret';
mysql> grant all on wiki.* to 'wikiuser'@'localhost';  
mysql> GRANT ALL PRIVILEGES ON wiki.* to 'wikiuser'@'localhost' identified by 'secret'  WITH GRANT OPTION;
mysql> flush privileges;

Open the wiki web page and finish the insallation using the wizard. After all copy and paste the config to:

sudo vi /var/lib/mediawiki/LocalSettings.php