Linux系統安裝 OpenSSL兩種方法

來源:互聯網
上載者:User

OpenSSL是一個開源的ssl技術,由於我需要使用php相關功能,需要擷取https的檔案所以必須安裝這個東西了,下面我整理了兩種關於OpenSSL安裝配置方法。

方法一,編譯安裝 OpenSSL

2.1、準備工作

系統版本:Ubuntu-10.10-Server-I386
更新源:apt-get update
升級軟體:apt-get upgrade
更新系統:apt-get dist-upgrade

2.2、查看OpenSSL版本

部分 Linux 系統已預設安裝了 OpenSSL 0.9.8,特別是 VPS 一般都安裝了。

 代碼如下 複製代碼

openssl version -a

2.3、安裝基礎編譯環境

 代碼如下 複製代碼

apt-get  install build-essential

2.3、編譯安裝 Zlib 庫

 代碼如下 複製代碼

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、卸載舊版本 OpenSSL

 代碼如下 複製代碼


apt-get purge openssl
rm -rf /etc/ssl #刪除設定檔
2.5、編譯與安裝 OpenSSL
prefix 是安裝目錄,openssldir 是設定檔目錄,另外建議安裝兩次,shared 作用是產生動態串連庫。

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

進一


方法二,

 

OpenSSL庫的安裝

官網:http://www.openssl.org

下載頁面:http://www.openssl.org/source/

選擇最新版本下載

http://www.openssl.org/source/openssl-1.0.0a.tar.gz

解壓:

tar –zxvf openssl-1.0.0d.tar.gz,解壓目錄為:openssl-1.0.0d

然後進入到 cd openssl-1.0.0d,進行配置、編譯、安裝

配置

./configure或./config

編譯

make

安裝

make install

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.