RHEL6从源码安装Python及其他软件包
RHEL6从源码安装Python及其他软件包
## get zlib-devel source and build install it
$ wget --no-check-certificate http://zlib.net/zlib-1.2.8.tar.gz
$ tar -zxf zlib-1.2.8.tar.gz
$ cd zlib-1.2.8
$ ./configure
$ make && make install
#### /usr/local/include/zlib.h zconf.h
## python--->zlib-devel
## get python source and build install it
$ wget --no-check-certificate https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz
$ tar -zxf Python-2.7.9.tgz
$ cd Python-2.7.9
$ ./configure -–with-zlib=/usr/local/include
$ make && make install
## test:
$ python
>>> import zlib
## python-setuptools
$ wget --no-check-certificate https://pypi.python.org/packages/source/s/setuptools/setuptools-15.0.tar.gz#md5=2a6b2901b6c265d682139345849cbf03
$ tar -zxf setuptools-15.0.tar.gz
$ cd setuptools-15.0
$ python setup.py build
$ python setup.py install
## MarkupSafe
$ wget --no-check-certificate https://pypi.python.org/packages/source/M/MarkupSafe/MarkupSafe-0.23.tar.gz
$ tar -zxf MarkupSafe-0.23.tar.gz
$ cd MarkupSafe-0.23
$ python setup.py build
$ python setup.py install
## jinja2=>MarkupSafe
#### $ git clone https://github.com/mitsuhiko/jinja2.git
####$ wget --no-check-certificate https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.7.3.tar.gz
$ wget --no-check-certificate https://pypi.python.org/packages/source/J/Jinja2/Jinja2-2.0.tar.gz
$ tar -zxf Jinja2-2.7.3.tar.gz
$ cd Jinja2-2.7.3
$ python setup.py build
$ python setup.py install
## libyaml
$ wget --no-check-certificate http://pyyaml.org/download/libyaml/yaml-0.1.5.tar.gz
$ tar -zxf yaml-0.1.5.tar.gz
$ cd yaml-0.1.5
$ ./configure
$ make && make install
### /usr/local/include/yaml.h
## PyYAML--->libyaml
$ wget --no-check-certificate https://pypi.python.org/packages/source/P/PyYAML/PyYAML-3.11.tar.gz#md5=f50e08ef0fe55178479d3a618efe21db
$ tar -zxf PyYAML-3.11.tar.gz
$ cd PyYAML-3.11
$ python setup.py build
$ python setup.py install
#### test
$ python
>>> import yaml
--------------------------------------分割线 --------------------------------------
Python 的详细介绍:请点这里
Python 的下载地址:请点这里