ubuntu10.04安装stacklesspython运行高性能服务器

以下”#”开头是ubuntu终端命令

1。首先安装ubuntu 10.04

2。修改root用户密码

3。使用root登陆系统

4。ubuntu默认已经安装python2.6.5

5。下载stackless

查看网址 http://zope.stackless.com/download/sdocument_view

# cd /usr/src

# wget http://www.stackless.com/binaries/stackless-265-export.tar.bz2

# tar jxvf stackless-265-export.tar.bz2

6。预先安装一些模块依赖的开发库

6.1 要安装zlib的开发库,没有zip组件可跑不了easy_install

# apt-get install zlib1g-dev

6.2 要安装readline的开发包,python需要他

# apt-get install libreadline5-dev

6.3 还有openssl, bdb和bzip2的开发包

# apt-get install libssl-dev

# apt-get install libdb-dev

# apt-get install libbz2-dev

6.4 安装编译工具

# apt-get install build-essential

7。编译python-2.6.5-stackless,安装到/opt目录

# cd /usr/src/python-2.6.5-stackless/

# ./configure –prefix=/opt/stackless –with-readline –with-zlib=/usr/include

# make

# make install

8。修改系统路径,现在可以在自己的path变量前面加上stackless的路径了,使stackless作为默认python

# export path=/opt/stackless/bin:”$path”

这句可以加到.profile或者.bash_profile里面,每次进入bash时就可以默认用stackless了

9。 现在装上easy_install,以后装python包就方便了

# cd /usr/src

# wget http://peak.telecommunity.com/dist/ez_setup.py

# python ez_setup.py

10。测试高性能网络开发框架

Posted in 未分类