Install openssl library

Dependent software: make, gcc, zlib1g-dev

Upgrade steps:

1, go to the official website to download the latest version, or download wget also OK http://www.openssl.org

wget https://www.openssl.org/source/openssl-1.1.x.tar.gz

2, unzip and unpack into the directory execute:

./config --prefix=/usr/local/openssl shared zlib
make depend
make && make install

3. (Optional) Back up your current openssl:

mv /usr/local/openssl /usr/local/openssl.bak

mv /usr/include/openssl /usr/include/openssl.bak

4, configure the new version:

ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl

ln -s /usr/local/openssl/include/openssl /usr/include/openssl

5, update the dynamic link library data:

echo "/usr/local/ssl/lib" >> /etc/ld.so.conf

Reload the dynamic link library
ldconfig -v

6, re-check the version number:

ssh version

If you execute the command openssl version update after being given as follows:

 

This is because the position of the openssl library incorrect result.
You can make a soft link:

ln -s /usr/local/openssl/lib/libssl.so.1.x /lib/x86-64....../

ln -s /usr/local/openssl/lib/libcrypto.so.1.x  /lib/x86-64...../


Then you can execute the command openssl version

Guess you like

Origin www.cnblogs.com/sper/p/12040521.html