首页 > 代码库 > python服务器安装配置过程记录

python服务器安装配置过程记录

*新服务器安装步骤

1. 下载python2.7.6 wget http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz2. 解压缩 tar -xf Python2.7.63. 安装 1. cd Python2.7.6; ./configure ; make; make install4. 替换系统自带python mv /usr/local/bin/python /usr/local/bin/python_bak; ln -s /usr/local/bin/python2.7 /usr/local/bin/python

2. 安装django1.5.4

0. wget https://www.djangoproject.com/m/releases/1.5/Django-1.5.4.tar.gz1.解压缩 tar zxvf Django-1.5.4.tar.gz2.安装 cd Django-1.5.4/ ; python setup.py install3.测试 python; import django; django.VERSION3. 安装mongoDB
0.wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-2.4.8.tgz1.解压缩 tar zxvf mongodb-linux-x86_64-2.4.8.tgz 2.安装 mkdir -p /opt/soft/mongo ; cp -R -n mongodb-linux-x86_64-2.4.8/ /opt/soft/mongo; ln -s /opt/soft/mongo/mongodb-linux-x86_64-2.4.8/bin/mongo  /usr/local/bin/3.配置 :sudo chown $USER /data/db	vim ~/.bash_profile	add :		export PATH=$PATH:/opt/mongodb-linux-i686-2.4.5/bin	source ~/.bash_profile

4. 安装nginx

1. 在安装nginx前,需要确保系统安装了g++、gcc、openssl-devel、pcre-devel和zlib-devel软件。安装必须软件	yum install gcc-c++; 	yum -y install zlib zlib-devel openssl openssl--devel pcre pcre-devel 2. 下载安装 ngxin --ver : 1.5.6	wget http://nginx.org/download/nginx-1.5.6.tar.gz	tar zxvf nginx-1.5.6.tar.gz	./configure ; make ; make install ; 3. 安装好之后的位置:	/usr/local/nginx/sbin/nginx	/usr/local/nginx/conf/nginx.conf	/usr/local/nginx/logs4. source :	export PATH=$PATH:/opt/mongodb-linux-i686-2.4.5/bin:/usr/local/nginx/sbin

5.安装easy_install

wget https://pypi.python.org/packages/source/d/distribute/distribute-0.6.49.tar.gztar xf distribute-0.6.49.tar.gzcd distribute-0.6.49python setup.py installeasy_install --version

6. 安装pip

1.下载pip2. easy_install pip

7. 安装python-memcached

$ wget https://pypi.python.org/packages/source/p/python-memcached/python-memcached-1.53.tar.gz --no-check-certificate$ tar zxvf python-memcached-1.53.tar.gz$ cd python-memcached-1.53/$ python setup.py install

8. 安装uwsgi

1.pip install uwsgi2.测试 uwsgi -- version

9. 安装MySQL-Python

0. get http://softlayer-ams.dl.sourceforge.net/project/mysql-python/mysql-python-test/1.2.4b4/MySQL-python-1.2.4b4.tar.gz1. tar zxvf MySQL-python-1.2.4b4.tar.gz2. cd MySQL-python-1.2.4b4.tar.gz ; python setup.py install

10 .

安装django-cas2

0. https://github.com/KTHse/django-cas2/archive/master.zip1. unzip django-cas2-master.zip2. cd django-cas2-master; python setup.py install

[root@localhost mongodb]# ./bin/mongod -f mongodb.conf all output going to: log/mongodb.log

====================================================================================================

欢迎来到我的博客, 本人乃互联网行业一枚小小的螺丝钉—非典型程序员妹子.

留下微信地址,方便大家和我联系

 

 

python服务器安装配置过程记录