views:

240

answers:

3

I am about to embark a major django project. If I install the latest stable release... is the a suggested setup ie. this OS, this RDBMS, this version of python etc?? I'm normally a CentOS man but their repos don't play too well with the django requirements...

+1  A: 

httpd, mod_wsgi, PostgreSQL, and EPEL. CentOS is just fine.

Ignacio Vazquez-Abrams
While your assertion that CentOS (and RHEL) is mostly fine for a Django deployment is true, there are still a couple of problems. I regularly hit Python 2.4 incompatibilities in 3rd party Django apps. Furthermore, the upcoming Django 1.2 will be the last version to support Python 2.4.
piquadrat
I'd like to say that the answer to that is "CentOS 6", but it's taking a while longer to get EL6 out than I'd hoped.
Ignacio Vazquez-Abrams
RHEL and Python 2.6 was a painful exercise for me. It might be because we had too much SELinux security to allow us to build Python 2.6.
S.Lott
+1  A: 

We use Fedora 11, MySQL, Apache, mod_wsgi, Python 2.6. Works great.

S.Lott
I've never used Fedora before. Can you confirm that the are respected repos out there that have all these modules etc?? I don't want to mess around with source builds.
Simon
I can't recall doing any source builds of anything in Fedora. Python rarely requires any source build of anything. `mod_wsgi` is the only thing that could possibly require a build - here's the RPM link: https://admin.fedoraproject.org/pkgdb/packages/name/mod_wsgi
S.Lott
Not to detract from this answer, but in my previous experience with Fedora, I had to do all sorts of non-standard stuff to get the latest versions of all the Python libraries working, whereas Ubuntu worked out of the box and didn't have stale versions. It sounds like Fedora has made strides but I'm an Ubuntu convert.
Adam Nelson
@Adam Nelson: All I did was click on the software installer. What version of Fedora are you referring to? I'm using version 11.
S.Lott
It was about 18 months ago and I was doing a server installation by command line. At that time Ubuntu was much easier in terms of current packages for Python and apt-get working where yum would not. I presume Fedora has made a leap since then but with Ubuntu's business model, I think it's the beginning of the end for RHEL, which will have a knock on effect for Fedora.
Adam Nelson
@Adam Nelson: RHEL has a large, entrenched installed base. We have RHEL servers that take a lot of work for Python upgrades. I have no sympathy, as our security folks (a) define the SELinux settings and then have to (b) compile and install Python for me. It's a good situation because they erect (and support) the roadblocks. But, not good for a n00b.
S.Lott
Sounds like a waste of effort - compiling custom Python just to deal with SELinux. I guess it's good for job security though :-)For sure RHEL will be running for years. I just don't see it being the distro of choice for any brand new installations. With RHEL in that situation, the Fedora world becomes tenuous.
Adam Nelson
RHEL lags behind Fedora. Fedora is more flexible -- but not supported by Red Hat. RHEL comes with a pre-built, properly configured, very nice Python 2.4. I think that our mistake was trying to work as `root`, which creates binaries that run afoul of SELinux security provisions. This is *no* reflection on RHEL, but our inability to make proper use of SELinux.
S.Lott
+2  A: 

Ubuntu is far and away a better platform nowadays. I'm a refugee from RHEL and Fedora. Get Ubuntu 9.10, and if you'd like, spawn it on Amazon ec2 for total flexibility (i.e. launch it in about 90 seconds, play around, do what you want, delete it, and only pay a buck). Otherwise, just use Ubuntu on the desktop.

Ubuntu has Python 2.6 by default so you don't have to go out and find weird upgrade paths. Also Ubuntu has ready-to-go installations for django 1.1.1 (the latest and greatest) that integrate with Apache, etc...

In other words, with zero usage of PIP, easy_install or source installations, you can get running with Django on Ubuntu/Apache.

Once you're comfortable, PIP is the tool you should use for all non-stock python library installations as it's more up to date.

MySQL is easier than Postgres but it doesn't really matter either way.

=== edit ==== I forgot to add that I use mod_wsgi. I forgot all about it since the Ubuntu Apache installation was so easy that I hardly had to even think about it.

Adam Nelson
Adam. Sounds perfect. I shall spin up an instance at my VPS linode.com...
Simon