Centos5.5 build nginx + Python + Django + memcached + MySQL + FastCGI Environment

Source: Internet
Author: User
Tags install django

 

DjangoIs an openSource codeThe Web application framework, written in Python, was initially developed to manage some websites dominated by news content under the Lawrence Publishing Group. Python + Django is also the most popular framework for Web developers. Today, we record the entire process of building a development environment. (The system in the environment is centos 5.5)
I. Update the yum Repository(Currently, this yum source is the fastest)
[Root @ filerserver Python] # cd/etc/yum. Repos. d
[Root @ filerserver Python] # Music CentOS-Base.repo CentOS-Base.repo.save
[Root @ filerserver Python] # wget http://centos.ustc.edu.cn/CentOS-Base.repo.5
[Root @ filerserver Python] # Music CentOS-Base.repo.5 CentOS-Base.repo
Ii. install some Development kits and updates
[Root @ filerserver Python] # Yum check-Update
[Root @ filerserver Python] # Yum update
[Root @ filerserver Python] # Yum install NTP iptraf sysstat screen subversion wget Bzip2 nfs-utils vim-common
[Root @ filerserver Python] # Yum install make GCC gcc-C ++ libjpeg-devel libpng-devel zlib-devel TCL-devel FreeType-devel libevent-devel OpenSSL-devel db4-devel curl- devel PCRE-devel ncurses-devel Readline-devel SQLite-devel
3. Install Python
[Root @ filerserver Python] # cd/usr/local/src
[Root @ filerserver Python] # wget http://www.dbasky.net/tool/python/Python-2.5.4.tar.bz2
[Root @ filerserver Python] # tar xjvf Python-2.5.4.tar.bz2
[Root @ filerserver Python] # cd Python-2.5.4/
[Root @ filerserver Python] #./configure -- enable-Unicode = ucs4
[Root @ filerserver Python] # Make
[Root @ filerserver Python] # make install
4. Install the mysql client
[Root @ filerserver Python] # cd/usr/local/src
[Root @ filerserver Python] # wget http://www.dbasky.net/tool/mysql-5.0.45.tar.gz
[Root @ filerserver Python] # tar zxvf mysql-5.0.45.tar.gz
[Root @ filerserver Python] # cd mysql-5.0.45
[Root @ filerserver Python] # cflags = "-O3" cxx = GCC cxxflags = "-O3-felide-constructors \
-Fno-exceptions-fno-rtti "./configure \
-- Prefix =/usr/local/MySQL -- enable-validator \
-- With-charset = utf8 \
-- With-extra-charsets = GBK, gb2312, Latin1 \
-- Without-Debug \
-- With-client-ldflags =-all-static \
-- Enable-thread-safe-client \
-- Without-Server
[Root @ filerserver Python] # Make
[Root @ filerserver Python] # make install
[Root @ filerserver Python] # echo "Path =/usr/local/MySQL/bin: \ $ path">/etc/profile
[Root @ filerserver Python] # echo "Export path">/etc/profile
[Root @ filerserver Python] # echo "/usr/local/MySQL/lib/MySQL">/etc/lD. So. conf. d/MySQL. conf
[Root @ filerserver Python] # ldconfig
5. Install memcached
[Root @ filerserver Python] # cd/usr/local/src
[Root @ filerserver Python] # wget http://www.dbasky.net/tool/python/memcached-1.2.6.tar.gz
[Root @ filerserver Python] # tar xzvf memcached-1.2.6.tar.gz
[Root @ filerserver Python] # memcached-1.2.6/CD/
[Root @ filerserver Python] #./configure -- prefix =/usr/local/memcached -- enable-threads
[Root @ filerserver Python] # Make
[Root @ filerserver Python] # make install
6. Install Python setuptools
[Root @ filerserver Python] # cd/usr/local/src
[Root @ filerserver Python] # wget http://www.dbasky.net/tool/python/setuptools-0.6c9.tar.gz
[Root @ filerserver Python] # tar xzvf setuptools-0.6c9.tar.gz
[Root @ filerserver Python] # cd setuptools-0.6c9
[Root @ filerserver Python] # Python setup. py install
7. Install Django
[Root @ filerserver Python] # cd/usr/local/src
[Root @ filerserver Python] # SVN Co http://code.djangoproject.com/svn/django/trunk Django-trunk # directly re-Django SVN get the latest stable installation package
[Root @ filerserver Python] # cd Django-trunk
[Root @ filerserver Python] # Python setup. py install
8. Install sqlalchemy
[Root @ filerserver Python] # cd/usr/local/src
[Root @ filerserver Python] # SVN Co http://svn.sqlalchemy.org/sqlalchemy/branches/rel_0_4
[Root @ filerserver Python] # cd sqlalchemy-0.4
[Root @ filerserver Python] # Python setup. py install

9. Install mysqldb
[Root @ filerserver Python] # cd/usr/local/src
[Root @ filerserver Python] # wget http://www.dbasky.net/tool/python/MySQL-python-1.2.2.tar.gz
[Root @ filerserver Python] # tar xzvf MySQL-python-1.2.2.tar.gz
[Root @ filerserver Python] # cd MySQL-python-1.2.2
[Root @ filerserver Python] # Python setup. py install
10. Install twisted
[Root @ filerserver Python] # cd/usr/local/src
[Root @ filerserver Python] # wget http://www.dbasky.net/tool/python/Twisted-8.2.0.tar.bz2
[Root @ filerserver Python] # tar xjvf Twisted-8.2.0.tar.bz2
[Root @ filerserver Python] # cd twisted-8.2.0/
[Root @ filerserver Python] # Python setup. py install
11. Install Python-memcached
[Root @ filerserver Python] # cd/usr/local/src
[Root @ filerserver Python] # wget http://www.dbasky.net/tool/python/python-memcached-1.44.tar.gz
[Root @ filerserver Python] # tar xzvf python-memcached-1.44.tar.gz
[Root @ filerserver Python] # cd python-memcached-1.44
[Root @ filerserver Python] # Python setup. py install
12. Install PIL
[Root @ filerserver Python] # cd/usr/local/src
[Root @ filerserver Python] # wget http://www.dbasky.net/tool/python/Imaging-1.1.6.tar.gz
[Root @ filerserver Python] # tar xzvf Imaging-1.1.6.tar.gz
[Root @ filerserver Python] # CD image-1.1.6
[Root @ filerserver Python] # Python setup. py install
Thirteen: Install flup
[Root @ filerserver Python] # cd/usr/local/src
[Root @ filerserver Python] # wget http://www.dbasky.net/tool/python/flup-1.0.1.tar.gz
[Root @ filerserver Python] # tar xzvf flup-1.0.1.tar.gz
[Root @ filerserver Python] # cd flup-1.0.1
[Root @ filerserver Python] # Python setup. py install
14. Install simplejson
[Root @ filerserver Python] # cd/usr/local/src
[Root @ filerserver Python] # wget http://www.dbasky.net/tool/python/simplejson-2.0.9.tar.gz
[Root @ filerserver Python] # tar xzvf simplejson-2.0.9.tar.gz
[Root @ filerserver Python] # cd simplejson-2.0.9
[Root @ filerserver Python] # Python setup. py install
15th: Install nginx
[Root @ filerserver Python] # cd/usr/local/src
[Root @ filerserver Python] # wget http://www.dbasky.net/tool/python/nginx-0.7.51.tar.gz
[Root @ filerserver Python] # tar xzvf nginx-0.7.51.tar.gz
[Root @ filerserver Python] # cd nginx-0.7.51
[Root @ filerserver Python] #./configure -- prefix =/usr/local/nginx \
-- With-md5 =/usr/lib \
-- With-sha1 =/usr/lib \
With-http_ssl_module \
With-http_stub_status_module \
Without-mail_pop3_module \
Without-mail_imap_module \
Without-mail_smtp_module \
With-http_realip_module
[Root @ filerserver Python] # Make
[Root @ filerserver Python] # make install

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.