标签:python
1.安装python
下载Python源码包
[root@test ~]# wget http://www.python.org/ftp/python/2.4.3/Python-2.4.3.tar.bz2
解压Python源码包
[root@test ~]# tar jxvf Python-2.4.3.tar.bz2
编译安装Python
[root@test ~]# cd Python-2.4.3
[root@test Python-2.4.3]# ./configure
checking MACHDEP... linux2
checking EXTRAPLATDIR...
checking for --without-gcc... no
checking for --with-cxx=<compiler>... no
checking for c++... c++
checking for /dev/ptmx... yes
checking for /dev/ptc... no
checking for socklen_t... yes
checking for build directories... done
configure: creating ./config.status
config.status: creating Makefile.pre
config.status: creating Modules/Setup.config
config.status: creating pyconfig.h
creating Setup
creating Setup.local
creating Makefile
[root@test Python-2.4.3]# make
[root@test Python-2.4.3]# make install
running install_scripts
copying build/scripts-2.4/smtpd.py -> /usr/local/bin
copying build/scripts-2.4/pydoc -> /usr/local/bin
copying build/scripts-2.4/idle -> /usr/local/bin
changing mode of /usr/local/bin/smtpd.py to 755
changing mode of /usr/local/bin/pydoc to 755
changing mode of /usr/local/bin/idle to 755
if test -f /usr/local/bin/python -o -h /usr/local/bin/python; \
then rm -f /usr/local/bin/python; \
else true; \
fi
(cd /usr/local/bin; ln python2.4 python)
Creating directory /usr/local/man
Creating directory /usr/local/man/man1
/usr/bin/install -c -m 644 ./Misc/python.man \
/usr/local/man/man1/python.1
2.下载并安装python-urlgrabber,python-pycurl,yum-metadata-parser
[root@test ~] wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/python-urlgrabber-3.9.1-8.el6.noarch.rpm
[root@test ~] wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/python-pycurl-7.19.0-8.el6.x86_64.rpm
[root@test ~] wget http://mirrors.163.com/centos/5/os/x86_64/CentOS/yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
[root@test ~] rpm -ivh python-urlgrabber-3.9.1-8.el6.noarch.rpm python-pycurl-7.19.0-8.el6.x86_64.rpm yum-metadata-parser-1.1.2-16.el6.x86_64.rpm
本文出自 “Debris·记忆” 博客,请务必保留此出处http://debris.blog.51cto.com/1614432/1733592
标签:python
原文地址:http://debris.blog.51cto.com/1614432/1733592