1, installation Zlib
Yum Install Zlib-devel
2, source installation OpenSSL
Go to root directory cd/root
Download OpenSSL wget https://www.openssl.org/source/openssl-1.0.1g.tar.gz
Decompression TAR-ZXVF openssl-1.0.1g.tar.gz
CD openssl-1.0.1g
Configure the Dynamic library./config Shared zlib-dynamic
Compile and install make && make install
Rename the original OpenSSL command
Mv/usr/bin/openssl/usr/bin/openssl.old
Rename the original OpenSSL directory (if present, does not exist skip)
Mv/usr/include/openssl/usr/include/openssl.old
Soft-connect the installed OpenSSL's OpenSSL command to the/USR/BIN/OPENSSL
Ln-s/usr/local/ssl/bin/openssl/usr/bin/openssl
Soft-connect the installed OpenSSL's OpenSSL directory to/usr/include/openssl
Ln-s/usr/local/ssl/include/openssl/usr/include/openssl
Modify the system's own OpenSSL library files, such as/usr/local/lib64/libssl.so (depending on the machine environment) soft chain to upgraded libssl.so
Ln-s/usr/local/ssl/lib/libssl.so/usr/local/lib64/libssl.so
Ln-s/usr/local/ssl/lib/libcrypto.so/usr/local/lib64/libcrypto.so
To write the search path to the OpenSSL library file in the/etc/ld.so.conf file
echo "/usr/local/ssl/lib" >>/etc/ld.so.conf
echo "/usr/local/lib64" >>/etc/ld.so.conf
Make the modified/etc/ld.so.conf effective
Ldconfig
Execute the command to see if the OpenSSL dependent library version is 1.0.1g:
OpenSSL version
CentOS installation OpenSSL