Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We currently have a server running python2.6 + apache and mod_wsgi that runs with Django 1.3.

I plan to use the following guide to install python 2.7 http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/.

Then use pip to install the packages for 2.7 which I believe using pip install after installing python2.7 will handle this.

After this I think recompiling mod_wsgi with it pointing to the python2.7 path should handle making Apache2 load the correct version of python for the site.

I was just wondering if I have missed something or whether this process is completely wrong and shouldn't be used.

Thanks.

share|improve this question
1  
Why use 2.7? Django 1.5 works with 2.6 too and you don't need to do all this extra work. –  Dennis Kaarsemaker Mar 28 '13 at 0:53
    
The 2.6 version currently in use is an outdated version of 2.6 so my thinking is along the lines of if I should upgrade the python version I might as well jump to 2.7.3 –  Jeff_Hd Mar 28 '13 at 9:34
1  
What's outdated about it? RHEL/Centos provide updated 2.6 packages with bugfixes and security updates. –  Dennis Kaarsemaker Mar 28 '13 at 9:36
    
Well it was manually compiled by the people who set it up originally and is python 2.6.2 - being manually compiled I assume it isn't easy at all to upgrade. I should note the CentOS version is 5.7 –  Jeff_Hd Mar 28 '13 at 9:50
1  
Ah, centos 5. That ships with an ancient python. To be honest, I think it'll be faster to reinstall with centos 6 (comes with python 2.6) than to compile your own python. –  Dennis Kaarsemaker Mar 28 '13 at 10:12
show 3 more comments

1 Answer

up vote 0 down vote accepted

So, for an actual answer to your question: If you use mod_wsgi in embedded mode, you will need to recompile it. But I'd suggest running it in daemon mode, so you don't have to recompile mod_wsgi (or restart apache whenever you app changes, just the wsgi daemon)

share|improve this answer
    
And if you go this route, I recommend uwsgi as daemon/container. I use nginx+uwsgi myself and it works beautifully. –  Dennis Kaarsemaker Mar 28 '13 at 10:48
    
Thanks! I'll look into this. –  Jeff_Hd Mar 28 '13 at 10:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.