PiRate Box (Sharing Freely) on the RPi

By 06:00


http://piratebox.cc/

This is a tutorial I wrote for the PirateBox Project to help people get PirateBox working on their RPi2. It assumes you have a fresh install of Rasbian working on your RPi2, with a working internet connection and a supported Wifi card.

Prepare Rasbian
1)  At the terminal enter the command sudo rasps-config to configure the system.

pi@raspberrypi:~$ sudo raspi-config

2)  Choose the following options:-
  1) Expand Filesystem 

  2) (optional) At this point you may also want to choose option 2 Change User Password.
  3) Internationalization Options, choose your settings as UTF-8 
  8) Advance Options, A4 SSH (Enable)
3)  Finish and allow the system to reboot.


Installing Dependencies
1) Next we need to install and prepare dependencies using the following terminal commands:-
  sudo apt-get update 
  sudo apt-get -y install lighttpd 
  sudo /etc/init.d/lighttpd stop 
  sudo update-rc.d lighttpd remove 
  sudo apt-get -y install dnsmasq 
  sudo /etc/init.d/dnsmasq stop 
  sudo update-rc.d dnsmasq remove 
  sudo apt-get -y install hostapd 
  sudo /etc/init.d/hostapd stop 
  sudo update-rc.d hostapd remove  
  sudo apt-get -y install iw 
  sudo rm /bin/sh 
  sudo ln /bin/bash /bin/sh 
  sudo chmod a+rw /bin/sh

Install PirateBox
1) Now we install the Piratebox code and configure.
  wget http://downloads.piratebox.de/piratebox-ws_current.tar.gz 

  tar xzf piratebox-ws_current.tar.gz cd piratebox 
  sudo mkdir -p /opt sudo cp -rv piratebox /opt cd /opt/piratebox 
  sudo sed 's:DROOPY_USE_USER="no":DROOPY_USE_USER="yes":' -i /opt/piratebox/conf/piratebox.conf 
  sudo ln -s /opt/piratebox/init.d/piratebox /etc/init.d/piratebox 
  sudo update-rc.d piratebox defaults 
  sudo /etc/init.d/piratebox start

Fetch the Imageboard
1)  Time to fetch the image-board and configure.
  sudo /opt/piratebox/bin/install_piratebox.sh /opt/piratebox/conf/piratebox.conf imageboard 
2)  Edit the config.pl file with vi, and edit the ADMIN_PASS and SECRET. Remove the # from the start of the line. 
  sudo vi /opt/piratebox/www/board/config.pl
   # System config
   # use constant ADMIN_PASS => ‘CHANGEME’; # Admin password. For fucks's sake, change this.
   # use constant SECRET => ‘CHANGEME’; # Cryptographic secret. CHANGE THIS to something totally random, and long.


Activate Timesave Functionality
   sudo /opt/piratebox/bin/timesave.sh /opt/piratebox/conf/piratebox.conf install

   
Install Minidlna
  sudo apt-get install minidlna 

  sudo cp /etc/minidlna.conf /etc/minidlna.conf.bkp 
  sudo cp /opt/piratebox/src/linux.example.minidlna.conf /etc/minidlna.conf sudo update-rc.d minidlna defaults 
  sudo service minidlna start

Edit Network Configuration
1)  Edit the network configuration.
  sudo nano /etc/network/interfaces
(delete the contents of the file and paste in the following)
  
  auto lo iface lo inet
  loopback iface eth0 inet dhcp 
  iface wlan0 inet manual ### disalbed for PirateBox 
  #allow-hotplug wlan0 
  #wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf 
  #iface default inet dhcp

2)  (save and exit by pressing [Control]+x then press [Enter] to update the config file.

3)  Reboot.  sudo reboot
4)  When you logon to the PirateBox, click on Forum and then click Kareha.pl to activate.

Download the Image

Alternatively you can download the image I created with a torrent client, like UTorrent.

You Might Also Like

0 comments