1. Compiling python
bogon:kuoxin$./configure--prefix=/share/python3--enable-shared
bogon:kuoxin$ Make
bogon:kuoxin$ make install
2. Compiling Wsgi bogon:kuoxin$./configure--with-python=/share/python3/bin/python3
If the following error is reported: Share/python3/bin/python3:error while loading shared libraries:libpython3.3m.so.1.0:cannot open shared The object file:no such file or directory indicates that the system does not know which directory xxx.so is placed in, and it is time to include the xxx.so directory in the/etc/ld.so.conf. In general, there are a lot of so will be stored in the directory under the/usr/local/lib, go to this directory to find, sure enough to find that they need. so file. So, add/share/python3/lib/this line in/etc/ld.so.conf, save, then run:/sbin/ldconfig–v update the configuration.bogon:kuoxin$ MakeIf an error occurs, you need to modify the makefile file.bogon:kuoxin$ VI MakefileModify the following:ldflags =-l/share/python3/lib-l/share/python3/lib/python3.3/config Ldlibs =-lpython3.3m-lpthread-ld L-LUTIL-LM bogon:kuoxin$ make install
3. Configure httpd.conf file LoadModule wsgi_module modules/mod_wsgi.so wsgiscriptalias/ '/share/ Htdocs/django/proj/wsgi/django.wsgi ' if there are other sites such as PHP sharing httpd, you can add virtual path Alias/rockmongo "/ share/htdocs/rockmongo/" <directory"/share/htdocs/rockmongo/"> Order allow,deny allow from All </Directory>
Django installed in CentOS