How do I upgrade OpenSSL in CentOS 6.5?
I have used these commands, but nothings happens:
cd /usr/src
wget http://www.openssl.org/source/openssl-1.
I agree that in 95% of cases, all you need is sudo yum update openssl
However, if you need a specific version of openssl or specific functionality, which is not in CentOS repository, you probably need to compile from source. The other answers here were incomplete. Below is what worked (CentOS 6.9), although this may introduce incompatibilities with installed software, and will not auto-update the openssl.
Choose openssl version from https://www.openssl.org/source/
Log-in as root:
cd /usr/local/src/
# OPTIONALLY CHANGE openssl-1.1.0f.tar.gz to the version which you want
wget https://www.openssl.org/source/openssl-1.1.0f.tar.gz
sha256sum openssl-1.1.0f.tar.gz #confirm this matches the published hash
tar -zxf openssl-1.1.0f.tar.gz
cd /usr/local/src/openssl-1.1.0f
./config --prefix=/usr/local --openssldir=/usr/local/openssl
make
make test
make install
export LD_LIBRARY_PATH=/usr/local/lib64
#make export permanent
echo "export LD_LIBRARY_PATH=/usr/local/lib64" > /etc/profile.d/ld_library_path.sh
chmod ugo+x /etc/profile.d/ld_library_path.sh
openssl version #confirm it works
#recommended reboot here
openssl version #confirm it works after reboot