CentOS5下Python-2.5安装笔记

1、己安装的老版本

[root@ha01 Python-2.5.2]# rpm -qa python
python-2.4.3-27.el5

2、安装新版本Python2.5

[root@ha01 local]# tar -jxvf Python-2.5.2.tar.bz2

[root@ha01 local]# cd Python-2.5.2
[root@ha01 Python-2.5.2]# ./configure

[root@ha01 Python-2.5.2]# make & make install

3、覆盖老版本Python

[root@ha01 Python-2.5.2]# cd /usr/bin/
[root@ha01 bin]# rm -rf python
[root@ha01 bin]# ln -s /usr/local/Python-2.5.2/python ./

4、安装完成

[root@ha01 /]# python
Python 2.5.2 (r252:60911, Apr  2 2011, 11:35:01)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type "help", "copyright", "credits" or "license" for more information.

相关推荐