python django 服务器搭建

公司近期服务器虚拟化,需要将物理机上面的应用全部迁移至虚拟机。我负责的这块应用是用python语言开发django框架搭建的一个博客系统。

运维分配了一台虚拟机,啥都没装

----------------------------------------------------------------------------------

服务器上面没有rzsz安装一下

lrzsz-0.12.20.tar.gz

http://ohse.de/uwe/software/lrzsz.html

(1)解压

(2)./configure&&make&&makeinstall

(3)默认将lsz和lrz安装到了/usr/local/bin目录,创建个软连接并命名为rzsz

ln-s/usr/local/bin/lrzrz

ln-s/usr/local/bin/lszsz

----------------------------------------------------------------------------------

python2.6.8

Python-2.6.8.tgz

(1)看linux当前python版本python-V

(2)看一下当前环境变量echo$PATH

(3)在/usr/local/software/Python-2.6.8目录下面执行

./configure

make

makeinstall

(4)修改环境变量

PATH=$PATH:/usr/local/bin

(5)检查python版本是否升级成功执行

python-V

----------------------------------------------------------------------------------

nginx-0.8.50

nginx-0.8.50.tar.gz

(1)查看nginx版本/usr/local/nginx/sbin/nginx–v

(2)检查当前linux服务器上面nginx依赖模块是否已经安装

whereisgcc如果没有安装执行

yum–yinstallgccgcc-c++autoconfautomake

zlib:whereiszlib

openssl:whereisopenssl

pcre:whereispcre

上面三个如果也没有执行

yum–yinstallzlibzlib-developensslopenssl-develpcrepcre-devel

如果没法使用yum在线安装,就需要手动从网上下载软件进行安装

prce-

ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/

pcre-8.30.tar.gz

(3)安装nginx

./configure--prefix=/usr/local/nginx/

make

makeinstall

(4)运行nginx

./nginx-c/usr/local/nginx/conf/nginx.conf

./nginx:errorwhileloadingsharedlibraries:libpcre.so.1:cannotopensharedobjectfile:Nosuchfileordirectory

解决方法:ln-s/usr/local/lib/libpcre.so.1/usr/lib/libpcre.so.1

----------------------------------------------------------------------------------

python-pluginpython插件安装目录/usr/local/lib/python2.6/site-packages

Django-1.1.4

Django-1.1.4.tar.gz

(1)pythonsetup.pyinstall

----------------------------------------------------------------------------------

flup-1.0.2.zip

(1)pythonsetup.pyinstall

安装时提示需要Thisscriptrequiressetuptoolsversion0.6c9torun

等几秒钟后会自动下载并安装setuptools-0.6c9-py2.6.egg

----------------------------------------------------------------------------------

fpconst-0.7.2.tar.gz

pythonsetup.pyinstall

----------------------------------------------------------------------------------

MySQL-python-1.2.3.tar.gz

pythonsetup.pyinstall

提示:sh:mysql_config:commandnotfound

解决方式,首先确认visite.cfg文件中的mysql_config=/usr/local/bin/mysql_config是否开启

然后执行find/-namemysql_config如果没找到那就需要安装mysql软件

----------------------------------------------------------------------------------

pytz-2012c.tar.gz

pythonsetup.pyinstall

先安装pytz这个然后再安装pysugar

pysugar-0.0.6.tar.gz

pythonsetup.pyinstall

这个需要等待一段时间,因为需要自动下载并安装关联软件elementtreeelementsoappytz

----------------------------------------------------------------------------------

mmseg-1.2.4.tar.gz

pythonsetup.pyinstall

----------------------------------------------------------------------------------

gearman-1.4.1.tar.gz

pythonsetup.pyinstall

----------------------------------------------------------------------------------

python-memcached-1.44.tar.gz

pythonsetup.pyinstall

----------------------------------------------------------------------------------

pytyrant-1.1.17.tar.gz

pythonsetup.pyinstall

----------------------------------------------------------------------------------

SQLAlchemy-0.5.6.tar.gz

pythonsetup.pyinstall

----------------------------------------------------------------------------------

wstools-0.3.tar.gz需要先安装这个软件

pythonsetup.pyinstall

SOAPpy-0.12.4.zip

pythonsetup.pyinstall

相关推荐