Upgrading a Django Server from Ubuntu Intrepid to Ubuntu Jaunty

Apr. 27, 2009

5:55 pm

I host Dawsoning at Mosso on an Ubuntu cloud server. If you don't mind doing a little server maintenance, it is, in my opinion, the best way to host your Django project. (And if you do mind server maintenance, check out Web Faction.)

I just managed to successfully upgrade an Ubuntu Intrepid server configured for Django to Ubuntu Feisty. Since you're here, you're probably trying to do something similar, so I hope these instructions help. My initial build more or less followed these instructions. You may want to check and see how closely your build matches mine before proceeding.

Your first task is upgrading the server. (All performed as root.)

  1. sed -e 's/\intrepid/ jaunty/g' -i /etc/apt/sources.list
  2. apt-get update
  3. apt-get dist-upgrade

The next part was tougher to figure out. It turns out that Ubuntu Jaunty ships with Python 2.6 as the default Python version. Python 2.6 has changed the site-packages directory (/usr/lib/python2.5/site-packages) to dist-packages (/usr/lib/python2.6/dist-packages). It's a sensible name change, so I'm not complaining.

I had a lot of stuff in site-packages – including my Django core files – so rather than symlink everything therein, I just deleted the bits already in the dist-packages directory and moved the contents of site-packages over. So:

  1. sudo mv /usr/lib/python2.5/site-packages/* /usr/lib/python2.6/dist-packages

You've probably also symlinked the admin media from your Django install into your project, so be sure to delete and recreate that link. For me, that process looked like this:

  1. sudo rm /home/dawsoning/public_html/static.dawsoning.com/admin
  2. sudo ln -s /usr/lib/python2.6/dist-packages/django/contrib/admin/media /home/dawsoning/public_html/static.dawsoning.com/admin

Happy upgrade!

Comments

May 3, 2009

8:51 am

Thx for your post Matt. Very useful to me!

Nathan.

Nathan Jamin (#)

May 12, 2009

3:15 am

My bf said I know nothing about computers and that I couldn’t help him ... well, he was wrong! I overheard him talking on a phone with another IT friend, used my (developing) google skills and voila! I’ve found your blog. And as it turns out, this is exactly what he was looking for :)
Thank you!

Diety (#)

July 13, 2009

4:24 am

Thanks so much for writing this, I keep coming back to this article every time I have to setup a new slice..

high jumping (#)

August 16, 2009

7:26 am

Thanks for the post!  I always come to this post for help.

how to jump higher (#)

October 5, 2009

12:22 am

i did a search for ubuntu jaunty, and luckily i found this post. thanks!

how to jump higher (#)

October 10, 2009

9:58 am

This helped with my Django issue.

Boston Britesmile (#)

December 22, 2009

5:10 am

Ubuntu Interpid is my best choice since many years. My Django experiences are still not that much, but I hope to learn a lot within next months.

corporate training (#)

December 25, 2009

2:57 am

Awesome! Thanks!

Improve Vertical (#)

January 28, 2010

1:22 pm

Awesome… Very useful post!

Thanks!

How To Increase Vertical (#)

February 5, 2010

10:52 am

All this is over my head (too technical for me).

vertical jump (#)

March 9, 2010

10:15 am

Django Server is a great server app that provides great functionality. Thanks for the nice post.

Burn Xbox Games (#)

Whaddya think?