1.python yum install gcc gcc-c++.x86_64 compat-gcc-34-c++.x86_64 openssl-devel.x86_64 zlib*.x86_64 install python 2.7 wget http://www./ftp/python/2.7/Python-2.7.tar.bz2 tar -xvjf Python-2.7.tar.bz2 cd Python* ./configure --prefix=/opt/python27 make make install vi ~/.bash_profile replace PATH=$PATH:$HOME/bin with PATH=$PATH:$HOME/bin:/opt/python27/bin reload .bash_profile source ~/.bash_profile echo "/opt/python27/lib" > /etc/ld.so.conf.d/python27.conf ldconfig install setuptool 2.setuptools cd ~ wget http://pypi./packages/2.7/s/setuptools/setuptools-0.6c11-py2.7.egg sh setuptools-0.6c11-py2.7.egg install gevent 3.django easy_install pip pip install django 4.mod_wsgi yum -y install apache ./configure --with-apxs=/usr/local/apache/bin/apxs \ --with-python=/usr/local/bin/python python安装路径默认 ./configure --with-apxs=/usr/local/apache/bin/apxs \ 这是源码路径如果 直接装httpd(redhat)这个路径不需要配置 如果python默认 |
|
来自: python_diango > 《学习资料》