Note: this article is a light adaptation of the original author's work; I retain secondary-creation rights to this text. If it infringes, please leave a comment and it will be removed promptly. This site reserves the right to keep this repost.
Many aaPanel servers still run OpenSSL 1.0.1e. Even the aaPanel I installed in October 2021 had a very old OpenSSL. Today a server vulnerability scan flagged OpenSSL as vulnerable, and some applications need a newer OpenSSL — so an upgrade it is. Below is the tutorial for aaPanel.
1. Log in via SSH and check the OpenSSL version:
openssl version
If the version is old, it shows something like:
OpenSSL 1.0.2k-fips 26 Jan 2017
Version < 1.1.0
If the version is newer, it shows something like:
OpenSSL 1.1.0c 10 Nov 2016
Version >= 1.1.0 — then there's no need to update (as of 2021-10, 1.1.0 is nearly the latest).
2. In the aaPanel panel → [sidebar] Files → go to the root directory → New folder → name it OpenSSL

3. In SSH, enter the /OpenSSL/ directory:
cd /OpenSSL
4. Run the following command in SSH:
wget https://www.openssl.org/source/openssl-1.1.0c.tar.gz --no-check-certificate
The source code here is from the official OpenSSL download channel, safe to use.
--no-check-certificate skips the server's certificate safety check for the wget download; some servers don't trust that certificate, and this flag lets you download in an insecure manner, i.e. over plain HTTP.
5. Extract the source package and enter the OpenSSL directory:
tar zxvf openssl-1.1.0c.tar.gz
(p.s. you can also extract it from the aaPanel file manager)
6. Move the extracted files up to the parent directory:



7. Pre-compile:
./config --prefix=/usr/local/openssl
8. Now actually compile OpenSSL:
make && make install
9. Move the relevant files into place:
mv /usr/bin/openssl /usr/bin/openssl.OFF
mv /usr/include/openssl /usr/include/openssl.OFF
ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl
ln -s /usr/local/openssl/include/openssl /usr/include/openssl
echo "/usr/local/openssl/lib" >> /etc/ld.so.conf
ldconfig -v
Quantum Responses (2)