Installation Environment: Operating system: Redhat 12.0 OpenSSL version:openssl-0.9.8l
Download Installation Pack (Linux source): openssl-0.9.8l.tar.gz (or the latest version of OpenSSL) download address: Http://www.openssl.org/sou rce/under Linux to extract the download to the installation package, the following commands ...
Tar-xzf openssl-xxx.tar.gz
Our Configuration Install to:/usr/local/ssl Module type:dynamically and staticly loaded modules, *.so *.a
Build Instructions
Configure
.../openssl-0.9.8l]#./config--prefix=/usr/local/ssl-0.9.8l shared zlib-dynamic Enable-camellia--prefix=/usr/local /ssl-0.9.8l
[This is the installation location. Default is '/usr/local/ssl '--which we'll symlink] shared
[In addition to the usual static libraries, create shared libraries] Zlib-dynamic
[Like ' zlib ', but has OpenSSL load the zlib library dynamically when needed] Enable-camellia
[Enables the symmetric cipher ' Camellia ' (128-bit, 192-bit, 256-bit key versions), which is now available for Royalty-free Use
Display guess on system made by './config ' ...
.../openssl-0.9.8l]#./config-t
Build and Install .../openssl-0.9.8l]# make depend
[Step required since extra cipher is enabled] .../openssl-0.9.8l]# make .../openssl-0.9.8l]# make test .../openssl-0.9.8l ]# make Install
Symlink
Form symlink from '/usr/local/ssl-0.9.8l ' to '/usr/local/ssl ' (...] Represents "/usr/local/") ...] # cd/usr/local/usr/local]# Ln-s ssl-0.9.8l SSL
Update the Run-time Linker
Ld.so.cache'll need to being 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 this two files to/lib, but we recommend you follow these instructions instead.
edit/etc/ld.so.conf, add to paths ... (The effect is as follows Figure 1, of course, you can also directly under the/ETC/LD.SO.CONF.D folder to create a. conf file, the/usr/local/ssl/lib copy into the inside, You can also add this path to an existing. conf file, anyway ld.so.conf contains all the. conf files in this folder.
Figure 1
/usr/local/ssl/lib
Update The RUN-TIME linker ...
...] # Ldconfig
Update the PATH
Edit/root/.bash_profile, add to PATH variable ...
(If you didn't have an older version of OpenSSL installed anywhere in the path, but remember to separate it with a colon, not a semicolon), see the screenshot below, you can use the following command to view what the current PATH environment variable is set to:
[Root@localhost local]# Echo $PATH
/usr/local/ssl/bin:/usr/lib/qt-3.3/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/ Sbin:/bin:/usr/sbin:/usr/bin:/usr/x11r6/bin:/root/bin
)
Note: Usually directly under root is invisible. Bash_profile (typically hidden files), you can use the Ls–a command in this directory to display hidden files. Then use the VI or Emacs Editor to modify the contents. To see the effect immediately after the compilation is complete, you can use the command: source. Bash_profile, to work long term, need to log in again (when I first installed the situation is this ~ ~ ~ ~
/usr/local/ssl/bin
Re-login.
[Sanity check] Openssl
Verify that binary ' OpenSSL ' is linking against the correct SSL libraries ... [Root@localhost/]# cd/usr/local [root@localhost local]# ldd/usr/local/ssl/bin/openssl linux-gate.so.1 => (0 x00c4b000) libssl.so.0.9.8 =>/usr/local/ssl-0.9.8l/lib/libssl.so.0.9.8 (0x00d5b000) libcrypto.so.0.9.8 =>/usr/local/ssl-0.9.8l/lib/libcrypto.so.0.9.8 (0x00110000) libdl.so.2 =>/lib/libdl.so.2 (0x005b2000) Libc.so.6 =>/lib/libc.so.6 (0x00447000)/lib/ld-linux.so.2 (0x0042a000)
...] # which OpenSSL
/usr/local/ssl/bin/openssl
...] # OpenSSL version
OpenSSL 0.9.8l 5 Nov 2009
If another path, or a older version is shown, your system contains a previously installed OpenSSL this is To the newer OpenSSL] in the path.
Repeate the steps in the "Update the path", except place the specified location at the start of the path variable. (in/root/.bash_profile, set path to the following order, where the version of OpenSSL on the current installation is placed in front of the environment variable, giving priority to the newly installed latest version of the OpenSSL)
Figure 2
Note This older OpenSSL, on most systems, is located under/usr/bin
The location of ' OpenSSL ' can be found with ... (with the following commands you can find your OpenSSL installation directory ~ ~ ~ ~) ...] # which OpenSSL