Xx-net is easy to use on Ubuntu, and if there are some reasons to use CentOS, the trouble is bigger.
First need to upgrade Python version, CentOS comes with the 2.6 version is not used, must upgrade to more than 2.7, but not with Python3,yum may not rise to 2.7, so only to the official website to download the source code compiled installation. Yum itself relies on python, so it cannot unload python and can only be installed separately.
1. Upgrade Python
First install the libraries and tools needed for compilation:
Wget
Download the latest version of Python2. (As of January 17 is 2.4.13)
wget https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tgz
Extract:
Tar-xzf./python-2.7. 13.tgz
Xx-net requires Python's _ssl module and _socket module, which may not be installed by default, modify the configuration file to ensure that the modules are compiled and installed
VI python-2.7. 3/modules/setup.dist
Remove the comments from the following lines:
_socket socketmodule.c timemodule.c4-duse_ssl-i$ (SSL)/include-i$ (SSL)/include/5-l$ (SSL)/ Lib-lssl-lcrypto
Start compiling after saving
CD ~/python-2.7. 3./configure--prefix=/usr/Local #指定安装目录install
Let the new Python become the default, the old version of the system also retains
Mv/usr/bin/python/usr/bin/python2. 6ln-s/usr/local/bin/python2. 7/usr/bin/python
To ensure that the python-dependent yum is not defective, modify the calling Python program
vi/usr/bin/Yum
Change the #!/usr/bin/python of the first line to #!/usr/bin/python2.6
2. Installing the PYOPENSSL Library
Xx-net use PYOPENSSL This library to encrypt HTTPS connection, here is a bit of trouble, you can find a way to install PIP, and then use PIP installation, but I think the PIP is also very troublesome, and the basic need not, so manually to the official website to download the library installation, Dependencies required for installation: PYOPENSSL--Setuptools-Libffi-devel
yum-y install libffi- develwget--no-check-certificate https://pypi.python.org/packages/e8/68/ F968ebc015c7e0021e76b60b8cfd29f9ffbae4b3b58d96ad20045a99562e/setuptools-32.3.1.zip wget--no-check-certificate https://pypi.python.org/packages/0c/d6/b1fe519846a21614fa4f8233361574eddb223e0bc36b182140d916acfb3b/ Pyopenssl-16.2.0.tar.gzuzip setuptools-32.3. 1.ziptar-xzf pyopenssl- 16.2.0. tar.gz
Installation:
CD setuptools-32.3. 1installCD. /pyopenssl-16.2. 0Install
Installation needs to be networked to download something, may be a little slow, patient wait, if the failure to retry a bit.
3. The final step
Run xx-net directly or error, because it also requires a dependent library
Install Nss-tools
Now it's time to use xx-net, try it.
CD ~/xx-net-2.8. 9setsid./start. Sh &
Original address: http://www.cnblogs.com/foxgab/p/6900637.html
CentOS6.8 installation of python2.7 and xx-net