Showing posts with label server administration. Show all posts
Showing posts with label server administration. Show all posts

Thursday, October 15, 2009

Installing python packages

There is a vast library of python code available to tap into. It's all available at the Python Package Index (pypi).

In order to connect the Django app to the PostgreSQL database, I had to install psycopg2, which is Python's PostgreSQL database adapter.

Debian makes this easy for us because python-psycopg2 is maintained as part of Debian's repos. If this was not the case, then I would have to wget the tarball, extract it, and run 'python setup.py install' for the package. In order for that command to work, one has to have the dev package for your version of python installed. In my case, that would be 'python2.5-dev.' This package provides header files for building your own modules from scratch.

There's a lot of jargon in this post which would be familiar to any intermediate Linux user. I will come back at a later date and provide a glossary similar to the bullet points I added to my git post.

Wednesday, October 14, 2009

Server setup

I'm going to attempt to chronicle the events of me learning how to create web apps. As of now, I'm responsible for creating everything from scratch. At this point, I've already sketched a very rough outline of how my first web app is going to turn out; I have chosen to build it on the Django framework, with a PostgreSQL database, running on a Debian server. All of those are new to me. Well, I have had some experience running Ubuntu on my home desktop, and as a simple SSH/file server, so Debian isn't entirely new to me.

So far, I have installed Debian with kernel 2.6.26-2-amd64, and all of the software I need. Hopefully, by today, I should have some equivalent of "Hello, world" that I can access through a browser from some other computer on the LAN, and maybe start populating the database with some sample data.

I'm skimming Dive Into Python, The Definitive Guide to Django, and the PostgreSQL docs as I go along.