OS: Oracle Linux Enterprise 5.6
1.Download
Python
Version: Python-2.7.3.tgz
setuptools
Version: setuptools-0.6c11.tar.gz (md5)
You can also use wget to download:
wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz#md5=7df2a529a074f613b509fb44feefe74e
2. Install Python
—View the python that comes with the system:
[root@njdyw~]# python
python python2 python2.4
—Install Python2.7.3
[root@njdyw~]# mkdir /python
[root@njdyw ~]# cp Python-2.7.3.tgz /python/
[root@njdyw~]# cd /python/
[root@njdyw python]# ls
Python-2.7.3.tgz
—Decompression
[root@njdyw python]# tar -zvxf Python-2.7.3.tgz
[root@njdyw python]# ls
Python-2.7.3 Python-2.7.3.tgz
--configure: To avoid affecting the original Python, a prefix must be formulated.
[root@njdyw python]# cd Python-2.7.3
[root@njdyw Python-2.7.3]#. /configure --prefix=/usr/local/python2.7.3
—make:
[root@njdyw Python-2.7.3]# make
—make install:
[root@njdyw Python-2.7.3]# make install