Previously written on the requirements of the Django Project development environment, the project is finished, it will be published, then the release of the steps.
There are many deployment patterns for project launches, and I use the Django + UWSGI + Nginx deployment model.
First come to know a few software:
Django: An open source Web application framework, written in Python, uses MVC's software design pattern. Can be installed with PIP.
UWSGI: A Web server that implements protocols such as the WSGI Protocol, UWSGI, HTTP, and so on. The role of Httpuwsgimodule in Nginx is to exchange with the UWSGI server.
that's why Uwsgi need nginx.
Nginx: excellent static content processing capabilities, and then forwarding dynamic content to the UWSGI server, so that you can achieve a good client response.
(1) Installation of Uwsgi: (It is highly recommended to install with PIP because PIP has an isolated environment virtualenv)
Source.. /env/bin/activate
Pip Install Uwsgi
Or: wget http://projects.unbit.it/downloads/uwsgi-1.4.4.tar.gz tar-zxvf uwsgi-1.4.4.tar.gz CD uwsgi-1.4.4 make CP Uwsgi /usr/bin
(2) Installation of Nginx:
General use source code compiled installation Nginx, all need to install pcre\zlib and other external support programs, and then configure the installation Nginx when these external program source path, so that nginx every time the start, it will dynamically load these things. Whether to compile the external program separately, decide for yourself, do not compile the influence is not big.
Install pcre external program Cd/root/install wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz TAR-ZXVF pcre-8.30.tar.gz CD pcre-8.30./configure--prefix=/usr/local/pcre8.30 make && make install
Install OpenSSL external program Cd/root/install wget http://www.openssl.org/source/openssl-1.0.0a.tar.gz TAR-ZXVF openssl-1.0.0a.tar.gz CD openssl-1.0.0a./config--prefix=/usr/local/openssl1.0.0 make && make install
Installing zlib external Programs
1. Cd/root/install
2. wget http://www.zlib.net/zlib-1.2.7.tar.bz2
3. TAR-JXVF zlib-1.2.7.tar.bz2
4. CD zlib-1.2.7
5./configure--prefix=/usr/local/zlib1.2.7
6. Make && make install
Finally install Nginx cd/root/install wget http://nginx.org/download/nginx-1.0.15.tar.gz tar-zxvf nginx-1.0.15.tar.gz CD nginx-1.0.15./configure--prefix=/usr/local/nginx--with-http_sub_module--with-pcre=/root/install/pcre-8.30 make && make Install
7. Check if the installation is successful
Cd/usr/local/nginx/sbin
./nginx-t
The results show:
Nginx:the configuration file/usr/local/nginx/conf/nginx.conf syntax is OK
Nginx:configuration file/usr/local/nginx/conf/nginx.conf Test is successful
8. Start Nginx
Enter the Cd/usr/local/nginx/sbin directory below./nginx start Nginx
9 Check if startup is successful
Curl http://192.168.15.132