Starting up
You’ve plugged everything in, waited for it to load and typed in the user / password. Now what?
The first thing you should type:
sudo bash
It’ll give you full privileges for the rest of the session and help stop you having to type “sudo” at the beginning of everything.
The second thing you should do is type this:
apt-get update
It’ll update all the packages on your installation to the most recent versions.
That should bring your device up to date and ready to use.
Installing some stuff
There is going to be a few things you’ll want to install, a nice text editor and maybe a web server? Experienced linux users can skip this bit and install what ever they want, but here are some tips for beginners on what extra packages to install.
To install these, just type the command under the name and hit enter:
git (version control software)
apt-get install git-core
Apache (Turn your device into a web server)
apt-get install apache2
MySQL (A database)
apt-get install mysql-server mysql-client
NOTE: During this process you’ll be asked to enter a password for the database root user
Django
This bit is a bit more advanced. I couldn’t find any guides on installing django on a raspberry pi so I’ve written a short one here.
A few of these packages might not be needed, but it was the route I followed successfully without any trouble so feel free to let me know what I can remove from this guide.
This guide assumes you’ve installed all of the above packages first.
apt-get install python-pip python-dev build-essential
This will get pip for installing python packages.
pip install django
This step will take a long time to complete.
mkdir djangprojects
cd djangoprojects
python /usr/local/lib/python2.6/dist-packages/django/bin/django-admin.py startproject myproject
This will create the django project “myproject” - change that to what ever you like if you want.
To make sure it is working lets try use django in a python app:
python
This will take you into the python terminal. You will notice »» to the left, that is normal. Type these two lines and hit enter:
import django
print django.get_version()
You should see the print out:
1.4
Awesome, it works!
Hit ctrl + D to exit the python environment.
At this point you may want to read through the official django tutorial to get to grips with using django (because it is awesome).
http://phalt.tumblr.com/day/2012/05/31
Recent Comments