1. 切换到需要将Python安装到的目录,如:
# cd /home/wudi
2. 下载Python文件
# wget -c http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
3. 安装
# tar –jxvf Python-2.7.3.tar.bz2
# cd Python-2.7.3
# ./configure
# make
# make install
4. 验证Python是否安装成功(如下,安装成功)
# cd Python-2.7.3
# python
Python 2.7.3 (default, May 3 2012, 17:08:22)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>