Article directory
1. Preparation
1.1 Download compressed package
Before installing openssl, we need to download the corresponding compressed package
https://www.openssl.org/source/openssl-3.0.1.tar.gz
This compressed package can be downloaded from Windows, decompressed, and copied to the local virtual machine, or you can download it directly using the wget command in the local virtual machine. Of course, when using the wget command, we need to install wget first.
You can download the compressed package of openssl in Linux through the following command
wget https://www.openssl.org/source/openssl-3.0.1.tar.gz
After downloading, you need to unzip it and finally get the folder named openssl-3.0.1
1.2 Installation of gcc, make, etc.
Since compilation requires the use of gcc and make commands, gcc and make need to be installed first.
sudo apt-get install g++
sudo apt-get install make
2. Installation and configuration
After decompressing the compressed package and installing gcc and make, you need to enter the folder corresponding to openssl before proceeding.
cd openssl-3.0.1
Execute the following commands in the corresponding folder
./config
After the execution is completed, you will get the following information
make -j32
Then continue to execute and commands in the current directory make install
to get the following results. The -j32 here refers to compilation with 32 threads, which is faster than traditional make.
After the above two commands, the openssl command line file will be installed in /usr/local/bin
the directory, the configuration file will be installed in /usr/local/ssl
the directory, the header file will be installed in /usr/local/include/openssl
the directory, and the so library file will be in the /usr/local/lib
or /usr/local/lib64
directory. See the figure below for specific results
so library file
head File