There is one thing that needs to be mentioned. Whenever you want to do something following some links on the internet the results are not always as expected. So there needs to be a lot tweaking. Things are not always going according to plan….
I’m going to use raspberry pi 2 B .
1) A software image needs to be installed, so for this I choose Win32DiskImager. As a software image I will use raspbian-jessie-lite.
After this I used a HDMI cable to connect it to a TV screen, a keyboard and a wireless antenna. You can use as well a Ethernet to connect it to your access point. I’m not implying that this is the easiest way but sometimes the “fastest route” is the one you know best. Also this is just for the initial initial config steps. You can pimp you deployment as much as you want afterwards.
So you need to edit the following file followed by a reboot
root@raspberrypi:~# cat /etc/wpa_supplicant/wpa_supplicant.conf
ssid=”name of the access point”
2) Ok so this is done. Now we need to do a software update. This is going to take a little bit of time so go and enjoy a coffee or whatever……
3) This is where the actual deployment part starts. The steps above where the prerequisites so to speak. For this I will use the following references:
I proceeded to install the libraries and this is that happened:
So I added libjped-dev as well, but still didn’t work
Removed libjpeg8-dev and instead added libjpeg62-turbo-dev and it all went fine.
4) Getting closer……
root@raspberrypi:~# cd /home
root@raspberrypi:/home# mkdir workspace
root@raspberrypi:/home# cd workspace/
root@raspberrypi:/home/workspace# apt-get install python-pip
root@raspberrypi:/home/workspace# sudo pip install virtualenv
root@raspberrypi:/home/workspace# virtualenv env
New python executable in /home/workspace/env/bin/python
Installing setuptools, pip, wheel…done.
root@raspberrypi:/home/workspace# source env/bin/activate
(env) root@raspberrypi:/home/workspace# pip install djangocms-installer
Then stumbled into the following error.
(env) root@raspberrypi:/home/workspace# sudo apt-get install python2.7-dev
Now all you need to do is start the server…..
(env) root@raspberrypi:/home/workspace/project# ls -ltr
-rwxr-xr-x 1 root root 250 Sep 24 21:57 manage.py
drwxr-xr-x 2 root root 4096 Sep 24 21:57 static
drwxr-xr-x 2 root root 4096 Sep 24 21:57 media
drwxr-xr-x 4 root root 4096 Sep 24 21:57 project
-rw-r–r– 1 root root 228352 Sep 24 22:12 project.db
-rw-r–r– 1 root root 417 Sep 24 22:12 requirements.txt
(env) root@raspberrypi:/home/workspace/project# python manage.py runserver 192.168.0.102:80
Performing system checks…
System check identified no issues (0 silenced).
September 25, 2016 – 04:41:37
Django version 1.8.14, using settings ‘project.settings’
Starting development server at http://192.168.0.102:80/
Quit the server with CONTROL-C.
Et voila! We have successfully installed django on raspbery pi.
Hope you enjoyed this!