OpenSSL is an open-source ssl technology. Because I need to use php-related functions and need to obtain https files, I have to install this. Below I have sorted out two ways to install and configure OpenSSL.
Method 1: Compile and install OpenSSL
2.1 preparations
System Version: Ubuntu-10.10-Server-I386
Update Source: apt-get update
Upgrade software: apt-get upgrade
Update System: apt-get dist-upgrade
2.2 view OpenSSL version
OpenSSL 0.9.8 is installed by default in some Linux systems, especially in VPS.
The Code is as follows: |
Copy code |
Openssl version- |
2.3 install the basic compiling environment
The Code is as follows: |
Copy code |
Apt-get install build-essential |
2.3 compile and install the Zlib library
The Code is as follows: |
Copy code |
Wget http://zlib.net/zlib-1.2.5.tar.gz Tar-zxf zlib-1.2.5.tar.gz Cd zlib-1.2.5/ ./Configure -- prefix =/usr/local Make & make install |
2.4 uninstall the old version OpenSSL
The Code is as follows: |
Copy code |
Apt-get purge openssl Rm-rf/etc/ssl # Delete the configuration file 2.5 compile and install OpenSSL Prefix is the installation directory, and openssldir is the configuration file directory. We recommend that you install it twice. shared is used to generate a dynamic Connection Library.
Wget ftp://ftp.openssl.org/source/openssl-1.0.0c.tar.gz Tar-zxf openssl-1.0.0c.tar.gz Cd openssl-1.0.0c/ ./Config -- prefix =/usr/local -- openssldir =/usr/local/ssl Make & make install ./Config shared -- prefix =/usr/local -- openssldir =/usr/local/ssl Make clean Make & make install |
Enter
Method 2,
OpenSSL library Installation
Official Website: http://www.openssl.org
Download Page: http://www.openssl.org/source/
Download the latest version
Http://www.openssl.org/source/openssl-1.0.0a.tar.gz
Decompress:
Tar-zxvf openssl-1.0.0d.tar.gz, unzipped Directory: openssl-1.0.0d
Then enter the cd openssl-1.0.0d for configuration, compilation, Installation
Configuration
./Configure or./config
Compile
Make
Install
Make install