Django installed in CentOS

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.