Daniel Malisani's picture

Hi, I need mount a file server on a slow PC, but I want to run a django program in the same machine. Can I add django server on turnkeylinux fileserver?

How I do it?


Jeremy Davis's picture

Long answer: There are a number of options...

1) As TKL appliances are Ubuntu 8.04 Server under the hood yes you can install Django just as you would on Ubuntu 8.04.

apt-get update
apt-get install python-django

I'm not familiar with Django so you may need to install some other stuff too. The apt/deb package management system is fantastic though so if there is anything else required it'll let you know.

From what I can find, the current version included in the 8.04/Hardy repos is 0.91.1 (in the universe repo - you will need to uncomment it in your sources.list). Having said that, there may be some security concerns - being in the universe repo means that it isn't maintained by Canonical but community members. Also v.0.91 is pretty old and may not have all the features you are after. Of all available options, this may well be the most robust and secure option (except for #5 below).

2) Another option may be to use a PPA (Personal Package Archive) - I found one here with v1.0. Again you will need to edit your sources.list, but this time add that PPA (or another if you find a better one). Then same steps as above. This path again relies on others to provide updates and requires a level of trust (of the PPA owners/maintainers). Personally I have used lots of PPAs (although not that one) and have found them generally pretty good.

3) A third option is to install the latest version from the Django website. I found a tutorial here but no doubt there are plenty of others about online. This method has the advantage of providing you with the very latest version but the downside is that you will get no security updates! You will need to keep a close eye on the site for new versions and go through these steps again every time a new version is released.

4) Looking at the TKL Django Appliance changelog it appears that TKL use Django from the Debian repository (version 1.0.2). That is an option too, although to set it up so it will auto (security) update Django and not break other stuff requires 'repo pinning' (which is what TKL Devs do with the TKL Django appliance). There are some pitfalls to avoid in the setup but once configured it will work well. You will need to do some research to sort this out.

5) Having mentioned the TKL Django appliance, that may well be your best option: Use the TKL Django appliance and install Samba on top of that with your file sharing setup. The Samba Webmin module makes it pretty easy.

apt-get update
apt-get install samba webmin-samba

Hope that's of some use to you!

Add new comment