CentOS8にOpenSSLをインストールする方法

1.事前準備
# dnf install lksctp-tools lksctp-tools-devel
# cd /usr/local/src
ダウンロード
# wget https://www.openssl.org/source/openssl-1.1.1f.tar.gz
ファイルの解凍
# tar zxf openssl-1.1.1f.tar.gz
# mv openssl-1.1.1f openssl
# cd openssl/

2.インストール
config設定を行う
# ./config –prefix=/usr/local/openssl –openssldir=/usr/local/openssl/shared enable-md2 enable-rc5 sctp zlib -fPIC 

**********************************************************************
*** ***
*** OpenSSL has been successfully configured ***
*** ***
*** If you encounter a problem while building, please open an ***
*** issue on GitHub <https://github.com/openssl/openssl/issues> ***
*** and include the output from the following command: ***
*** ***
*** perl configdata.pm –dump ***
*** ***
*** (If you are new to OpenSSL, you might want to consult the ***
*** 'Troubleshooting’ section in the INSTALL file first) ***
*** ***
**********************************************************************

3.コンパイル
# make

chmod a+x tools/c_rehash
/usr/bin/perl “-I." -Mconfigdata “util/dofile.pl" \
“-oMakefile" util/shlib_wrap.sh.in > “util/shlib_wrap.sh"
chmod a+x util/shlib_wrap.sh
make[1]: Leaving directory '/usr/local/src/openssl’

4.インストール
# make install

5.共有ライブラリを設定
# vi /etc/ld.so.conf.d/openssl-1.1.1f.conf
追記
/usr/local/openssl/lib

6.キャッシュファイルを更新
# ldconfig

7.バージョンを確認
# openssl version
OpenSSL 1.1.1g FIPS 21 Apr 2020 (Library: OpenSSL 1.1.1f 31 Mar 2020)

CentOS

Posted by arkgame