红联Linux门户
Linux帮助

CentOS5下Python-2.5安装笔记

发布时间:2015-02-08 10:43:10来源:linux网站作者:puwenhui

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.