Manual installing Pi Box - STwilight/Pi-Box GitHub Wiki
Installation of Pi-Box contains several steps:
- Updating packages
- Installing python
- Installing git
- Installing wiringpi-Python
- Installing pip
- Installing websocket server
- Fetching sources
Updating packages
For fetching info about last packages versions use command sudo apt-get update
.
After that you'll need to run sudo apt-get upgrade -y
command for updating already installed packages.
Installing python
For scripts executing we need Python interpreter and developer's libraries.
They can be installed by running command sudo apt-get install python python-dev -y
.
Installing git
For fetching project sources we need git to be installed.
It can be done by using command sudo apt-get install git -y
.
Installing wiringpi-Python
After all we can begin an installation of wiringPi-Python library.
For that we must execute next commands:
sudo wget -O wiringpi-python.zip https://github.com/WiringPi/WiringPi-Python/archive/91b71d701f7b1b56d7e25a7d21a351e104abfb8f.zip
sudo unzip wiringpi-python.zip
sudo mv WiringPi-Python-91b71d701f7b1b56d7e25a7d21a351e104abfb8f wiringpi-python
cd wiringpi-python
sudo git clone git://git.drogon.net/wiringPi WiringPi
cd WiringPi
sudo ./build
sudo apt-get install python-setuptools swig -y
cd ..
sudo swig2.0 -python wiringpi.i
sudo python setup.py install
cd ..
Installing pip
For ability of Python modules installation we need Python packet manager (PIP).
It can be added to our system with help of next command: sudo apt-get install python-pip -y
.
Installing websocket server
To serve requests from clients we need websocket server, that can be installed, using simple command:
sudo pip install git+https://github.com/dpallot/simple-websocket-server.git
Fetching sources
Now project files can be downloaded via git using command:
sudo git clone https://github.com/STwilight/Pi-Box /home/pi-box
.