Chinaunix首页 | 论坛 | 博客
  • 博客访问: 47854
  • 博文数量: 37
  • 博客积分: 2421
  • 博客等级: 大尉
  • 技术积分: 340
  • 用 户 组: 普通用户
  • 注册时间: 2010-04-09 16:04
文章分类

全部博文(37)

文章存档

2010年(37)

分类: Python/Ruby

2010-05-18 17:27:43

是一个开放源代码的 Web应用框架,由Python写成,它最初是被开发来用于管理劳伦斯出版集团旗下的一些以新闻内容为主的网站的。python+django也是web 开发者最受欢迎的框架.今天记录下整个搭建开发环境的过程.(说明下环境的系统为 centos 5.2)
一:更新yum仓库(目 前这个yum源是最快的)
[root@filerserver python]#cd /etc/yum.repos.d
[root@filerserver python]#mv CentOS-Base.repo CentOS-Base.repo.save
[root@filerserver python]#wget
[root@filerserver python]#mv CentOS-Base.repo.5 CentOS-Base.repo
二:安 装部分的开发包和更新
[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
三:安装Python
[root@filerserver python]#cd /usr/local/src
[root@filerserver python]#wget
[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
四:安装MySQL客户端
[root@filerserver python]#cd /usr/local/src
[root@filerserver python]#wget
[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-assembler \
                                       --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
五: 安装memcached
[root@filerserver python]#cd /usr/local/src
[root@filerserver python]#wget
[root@filerserver python]#tar xzvf memcached-1.2.6.tar.gz
[root@filerserver python]#cd memcached-1.2.6/
[root@filerserver python]#./configure --prefix=/usr/local/memcached --enable-threads
[root@filerserver python]#make
[root@filerserver python]#make install
六: 安装python setuptools
[root@filerserver python]#cd /usr/local/src
[root@filerserver python]#wget
[root@filerserver python]#tar xzvf setuptools-0.6c9.tar.gz
[root@filerserver python]#cd setuptools-0.6c9
[root@filerserver python]#python setup.py install
七:安装django
[root@filerserver python]#cd /usr/local/src
[root@filerserver python]#svn co django-trunk #直接重django的SVN拿最新稳定安装包
[root@filerserver python]#cd django-trunk
[root@filerserver python]#python setup.py install
八: 安装sqlalchemy
[root@filerserver python]#cd /usr/local/src
[root@filerserver python]#svn co
[root@filerserver python]#cd sqlalchemy-0.4
[root@filerserver python]#python setup.py install

九:安装MySQLdb
[root@filerserver python]#cd /usr/local/src
[root@filerserver python]#wget
[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
十:安装Twisted
[root@filerserver python]#cd /usr/local/src
[root@filerserver python]#wget
[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
十 一:安装python-memcached
[root@filerserver python]#cd /usr/local/src
[root@filerserver python]#wget
[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
十二:安装PIL
[root@filerserver python]#cd /usr/local/src
[root@filerserver python]#wget
[root@filerserver python]#tar xzvf Imaging-1.1.6.tar.gz
[root@filerserver python]#cd Imaging-1.1.6
[root@filerserver python]#python setup.py install
十 三:安装flup
[root@filerserver python]#cd /usr/local/src
[root@filerserver python]#wget
[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
十 四:安装simplejson
[root@filerserver python]#cd /usr/local/src
[root@filerserver python]#wget
[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
十五:安装nginx
[root@filerserver python]#cd /usr/local/src
[root@filerserver python]#wget
[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

      到此这个环境搭建完成,这边说明我们为了提高架构的稳定性,可以在中间层加入个缓存数据库--,的 安装和配置过程可以参考上篇日志--"",这边就不多说了.


转 载时请务必以超链接形式标明 文章和作者信息及。
链接:
阅读(392) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:如果你已经过了20岁但还不到25岁

给主人留下些什么吧!~~