linux下的python更新及搭建apache+python

1. 下载安装包

wget http://python.org/ftp/python/2.6.6/Python-2.6.6.tgz

2. 解压

 tar -xvf Python-2.6.6.tgz

3. 编译

 cd Python-2.6.6

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

make

make install

4.覆盖原来的python

mv /usr/bin/python /usr/bin/python_old

ln -s /usr/local/python26/bin/python /usr/bin/

5. 检查

python -V

6. 修改yum

vim /usr/bin/yum

将#!/usr/bin/python修改为
#!/usr/bin/python2.4

相关推荐