Cách cài đặt, update và sửa lỗi Openssl cho Censtos 6x7x | HOW TO UPDATE OPENSSL 1.1.0 IN CENTOS 6.9/7.0

cai dat setup openssl centos

Kiểm tra phiên bản openssl <Check openssl version>

openssl version
OpenSSL 1.0.1e-fips 11 Feb 2013

hoặc lệnh này:

yum info openssl
Name      : openssl
Arch        : x86_64
Epoch     : 1
Version  : 1.0.1e
Release  : 60.el7_3.1

Kiểm tra vị trí openssl trước khi bạn tiến hành nâng cấp <Check openssl location before you proceed the upgrade>

which openssl

/usr/bin/openssl

we have to softlink back to this path after we upgrade the openssl.

Cài đặt openssql 1.1.0 từ các nguồn <Install openssql 1.1.0 from sources>

1. Download and extract:

cd ~
wget https://www.openssl.org/source/openssl-1.1.0f.tar.gz
tar -xzf openssl-1.1.0f.tar.gz

2. Compile and install:

cd openssl-1.1.0f
./config
make
sudo make install

Bây giờ nếu bạn cố gắng chạy openssl, bạn sẽ gặp lỗi này:<Now if you try to run openssl, you will get this error:>

/usr/local/bin/openssl version
/usr/local/bin/openssl: error while loading shared libraries: libcrypto.so.1.1: cannot open shared object file: No such file or directory

Để sửa lỗi, chúng ta cần thực hiện bước tiếp theo. <To fix it, we need to do the next step.>

3. Tạo liên kết đến libssl: <Create links to libssl:>

sudo ln -s /usr/local/lib64/libssl.so.1.1 /usr/lib64/
sudo ln -s /usr/local/lib64/libcrypto.so.1.1 /usr/lib64/

4. Cuối cùng tạo liên kết đến openssl mới <Finally create link to new openssl>

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

Ở đây tôi gọi nó là ‘openssl_latest’, bạn có thể thay đổi nó thành bất cứ thứ gì bạn muốn. <Here I called it ‘openssl_latest’, you can change it to whatever you want.>

5. Bây giờ, hãy kiểm tra phiên bản ‘openssl_latest’ của chúng ta, phiên bản này phải là ‘1.1.0f’ tại thời điểm viết bài: <Now let’s check version of our ‘openssl_latest’, which should be ‘1.1.0f’ at the time of writing:>

openssl_latest version
OpenSSL 1.1.0f 25 May 2017

Additional tips

Bạn cũng có thể đổi tên openssl cũ và đổi tên openssl mới nhất thành tên cũ.

<you can also rename the old openssl and rename the latest openssl to the old name.>

cd /usr/bin/
mv openssl openssl_old
mv openssl_latest openssl

Trả lời

Email của bạn sẽ không được hiển thị công khai.