標(biāo)題: Linux下的openssl安裝 [打印本頁] 作者: 51黑tt 時間: 2016-3-5 18:12 標(biāo)題: Linux下的openssl安裝 我從網(wǎng)上搜索到了一篇安裝openssl的英文文章,地址在 http://www.devside.net/web/server/linux/openssl 我按照上面說的安裝了zlib,openssl。步驟簡介如下(怕以后忘了)
先安裝zlib,見linux下安裝zlib
安裝openssl Building a Web Server, for Linux 下載地址
Package(Linux source) : openssl-0.9.8c.tar.gz
解壓文件
tar -zxvf openssl-0.9.8c.tar.gz
Our Configuration
Install to : 默認(rèn)安裝路徑 /usr/local/ssl
Module type : dynamically and staticly loaded modules, *.so *.a
display guess on system made by './config'...
.../openssl-0.9.8c]# ./config -t 正式安裝,Build and Install
.../openssl-0.9.8c]# make depend
[step required since extra cipher was enabled] (時間很長)
.../openssl-0.9.8c]# make (時間很長,慢慢等待)
.../openssl-0.9.8c]# make test
.../openssl-0.9.8c]# make install
*測試是否安裝成功,#openssl version 是否是新安裝的版本
SymlinkForm symlink from '/usr/local/ssl-0.9.8c' to '/usr/local/ssl'
...]# cd /usr/local
/usr/local]# ln -s ssl-0.9.8c ssl
Update the Run-time Linkerld.so.cache will need to be updated with the location of the new OpenSSL shared libs: libcrypto.so.0.9.8 and libssl.so.0.9.8
Sometimes it is sufficient to just symlink or copy these two files to /lib, but we recommend you follow these instructions instead.
Edit /etc/ld.so.conf, add to paths...
/usr/local/ssl/lib Update the run-time linker...
...]# ldconfig Update the PATHEdit /root/.bash_profile, add to PATH variable...
/usr/local/ssl/bin Re-login. [sanity check] OpenSSLVerify that binary 'openssl' is linking against the correct ssl libraries...
...]# ldd /usr/local/openssl/bin/openssl
...]# which openssl /usr/local/ssl/bin/openssl...]# openssl version OpenSSL 0.9.8c 05 Sep 2006If another path, or an older version is shown, your system contains a previously installed OpenSSL that is first [relative to the newer openssl] in the path.
Repeate the steps in section 'Update the PATH', except place the specified location at the start of the PATH variable.
Note that the older openssl, on most systems, is located under /usr/bin
The location of 'openssl' can be found with...
...]# which openssl
...]# openssl version
should display openssl 0.9.7d 17 mar 2004
if an older version is shown, your system contains a previously installed openssl.
repeate the steps in update the path, except place the specified location at the start of the path variable.
[the older openssl, on most systems, is located under /usr/bin]
[the command 'which openssl' should display the path of the openssl that your system is using]
/usr/local/ssl/bin]# ./openssl version should display the correct version.