Skip to content

Instantly share code, notes, and snippets.

@patriciogonzalezvivo
Last active March 25, 2018 09:28
Show Gist options
  • Star 9 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save patriciogonzalezvivo/7387620 to your computer and use it in GitHub Desktop.
Save patriciogonzalezvivo/7387620 to your computer and use it in GitHub Desktop.
RaspberryPi post-installation

THE BASIC

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install avahi-daemon 

Apache Server

sudo apt-get install apache2 php5 php5-json

Node Server

wget http://node-arm.herokuapp.com/node_latest_armhf.deb
sudo dpkg -i node_latest_armhf.deb

Sysadmin

sudo apt-get install nmap iptraf tcpdump dstat ngrep mtr nc lftp irssi iotop

IDE station

sudo apt-get install git-core tmux mc htop vim zsh lsof
mkdir -p ~/.vim/autoload ~/.vim/bundle && \
curl -LSso ~/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim
cd ~/.vim/bundle
git clone https://github.com/tikhomirov/vim-glsl
git clone https://github.com/scrooloose/nerdtree.git
curl -L http://install.ohmyz.sh | sh

Edit default ~/.vimrc setup to:

execute pathogen#infect()
syntax on
filetype plugin indent on
set nu
set tabstop=4     " a tab is four spaces
set backspace=indent,eol,start " allow backspacing over everything in insert mode
set autoindent    " always set autoindenting on
set copyindent    " copy the previous indentation on autoindenting
set shiftwidth=4  " number of spaces to use for autoindenting
set shiftround    " use multiple of shiftwidth when indenting with '<' and '>'
set incsearch     " show search matches as you type
set expandtab
set shiftwidth=4
set softtabstop=4

On ~/.zshrc edit:

...
ZSH_THEME=gallois
...
plugins=(git tmux vim)

Remote working

On Mac OSX:

brew install sshfs

  • Make a dir and mount the remote filesystem over ssh:
sudo mkdir /Volumens/Rpi
sudo sshfs pi@xx.xxx.xxx.xxx:/home/pi /Volumens/Rpi

DistCC on RPI

From http://openframeworks.cc/setup/raspberrypi/Raspberry-Pi-DISTCC-guide.html

sudo apt-get install distcc
mkdir $HOME/.distcc/
nano $HOME/.distcc/hosts	// Add the server IP
nano ~/.bashrc

Copy on it:

alias rmake='make -j 8 CXX=/usr/lib/distcc/arm-linux-gnueabihf-g++ CC=/usr/lib/distcc/arm-linux-gnueabihf-gcc'

OpenFrameworks

From http://openframeworks.cc/setup/raspberrypi/Raspberry-Pi-Getting-Started.html

sudo raspi-config # CPU on 192MB of RAM for compiling the OF libs (then 64 is fine)
sudo reboot
sudo apt-get update
sudo apt-get upgrade
cd
curl -O http://www.openframeworks.cc/versions/v0.8.4/of_v0.8.4_linuxarmv6l_release.tar.gz
mkdir openFrameworks
tar vxfz of_v0.8.4_linuxarmv6l_release.tar.gz -C openFrameworks --strip-components 1
cd /home/pi/openFrameworks/scripts/linux/debian_armv6l
sudo ./install_dependencies.sh
rmake Release -C /home/pi/openFrameworks/libs/openFrameworksCompiled/project

WiringPi

cd
git clone git://git.drogon.net/wiringPi
cd wiringPi
./build

FFMPEG

sudo aptitude remove ffmpeg
cd /usr/src
sudo mkdir ffmpeg
sudo chown `whoami`:users ffmpeg
git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg
cd ffmpeg
./configure
make
sudo make install

TFT multiTouch Screen

From http://learn.adafruit.com/adafruit-pitft-28-inch-resistive-touchscreen-display-raspberry-pi/software-installation

cd ~
wget http://adafru.it/pitftsh
mv pitftsh pitft.sh
chmod +x pitft.sh
sudo ./pitft.sh -t 28r -r 
sudo nano /etc/modprobe.d/adafruit.conf

Change 23 for 27:

options rpi_power_switch gpio_pin=27 mode=0

Then reboot

sudo reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment