當前位置:首頁 » 操作系統 » linuxopenssl安裝

linuxopenssl安裝

發布時間: 2023-04-02 17:28:49

linux環境怎樣正確安裝OpenSSL庫

openssl多數尺告和lighttpd、apache等結合使用。安裝openssl庫應該不難,我不知道你用什麼版本的linux,像debian就用apt-get install openssl,配困森ubuntu用sudo apt-get install openssl。其他版本的安裝包培畝也都差不多,大同小異。

❷ Linux openssl安裝的問題

  • yum install openssl openssl-devel -y

  • apt-get update

  • apt-get install openssl -y

  • 希望可以幫助你 請採納 謝謝

❸ linux下 安裝openssl-0.9.8e問題

"#./config shared zlib "這個命令是安裝還是設置啊?我看看怎麼象設置呢?

這個軟體不要先安裝的嗎?直接就能用嗎?是不是要先安裝的啊

如果是要先安裝的話,那可能是缺少zlib的庫文件吧

我沒有裝個這個軟體,不過我怎麼看你的問題都象是沒有安裝軟體啊

答案補充:
我看了這個網址了,估計是lz你沒有安裝全zlib的庫文件,你可以試試先安裝zlib的庫文件

我又發現一個問題,lz你用的是RH9.0嗎?如果不是的話,那可能是會出錯的,因為不同版本的linux安裝環境也是不同的

❹ linux中openssl安裝需要哪些軟體包

安裝環境:

操作系統:RedHat 12.0
OpenSSL Version:openssl-0.9.8l

Download

安裝包(Linux source) : openssl-0.9.8l.tar.gz(or the latest version of openssl)
下載地址:http://www.openssl.org/source/
在linux下解壓縮下載到的安裝包,命令如下.....
tar -xzf openssl-xxx.tar.gz
Our Configuration

Install to : /usr/local/ssl
Mole type : dynamically and staticly loaded moles, *.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 will 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 was 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'(...]代表「/usr/local/」)

...]# cd /usr/local
/usr/local]# ln -s ssl-0.9.8l ssl
Update the Run-time Linker

ld.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 these two files to /lib, but we recommend you follow these instructions instead.

Edit /etc/ld.so.conf, add to paths...(修改效果如下圖1,當然也可以直接在/etc/ld.so.conf.d文件夾下再創建一個.conf文件,把/usr/local/ssl/lib拷貝到裡面,另外也可以在現有的.conf文件中添加這個路徑,反正ld.so.conf中包含了這個文件夾下的所有.conf文件)

❺ linux下如何編譯安裝openssl模塊請高手詳細解答一下。。。。。。。。。。【】【】

1$ tar zxvf openssl-0.9.8k.tar.gz -C /opt/

2$ ./config --prefix=/usr/local/ssl-0.9.8lk shared zlib-dynamic enable-camellia --prefix=/usr/local/ssl-0.9.8lk

3$ ./config -t

4$ make depend

5$ make

6$ make test

7$ make install

/********************************************************************/
附加: 為了ssl

a:$ /usr/local/ssl-0.9.8lk/ssl

b:$ vi openssl.cnf
default_bits = 1024
改 default_bits = 8192//為了安全最好改為4096以上的數據

c:$ countryName = Country Name (2 letter code)
改 countryName = CN //只能使用2字母的國家代碼

d:$ countryName_default = AU
改countryName_default = Beijing
= Beijing //省份或直轄市名稱

/**********************************************************************/

8$ a)cd /usr/local
b)ln -s ssl-0.9.8lk ssl

9$ a)cd /etc/ld.so.conf.d
b)cp -r /usr/local/ssl-0.9.8lk/lib/ ./

10$ cd /etc
vi ld.so.conf
加入:/usr/local/ssl-0.9.8lk/lib

11$ cd /usr/local/ssl-0.9.8lk/lib
ldconfig

12$ vi /root/.bash_profile
另外一個終端:echo $PATH 把PATH顯示路徑加入到.bash_profile里
例如: PATH=$PATH:/usr/local/ssl-0.9.8lk/bin$HOME/bin

13$ source ~/.bash_profile

14$ cd /usr/local/

15$ ldd /usr/local/ssl-0.9.8lk/bin/openssl

16$ which openssl

17$ openssl version

❻ linux 可以openssl嗎

Openssl是用來生成一個密鑰的,我們通常是成對出來了,下面一起來看看在linux 下Openssl的安裝配置與使用方法,希望對各位有用。
1. Openssl介紹
自己網上找去吧,我說的不好!
2. 安裝
1、下載地址:http://www.openssl.org/source/ ;下一個最新新版本的OpenSSL,版本是:openssl-1.0.2-beta1.tar.gz
2、在下載的目錄中,用命令執行:tar -xzf openssl-openssl-1.0.2-beta1.tar.gz
3、進入解壓的目錄:openssl-1.0.2-beta1 [.......]#cd openssl-1.0.2-beta1
4、[.....openssl-1.0.2-beta1]# ./config --prefix=/usr/local/openssl
5、[...../openssl-1.0.2-beta1]# ./config -t
6、[...../openssl-1.0.2-beta1]# make depend (時間很長)
7、[.../openssl-1.0.2-beta1]# make (時間很長,慢慢等待)
8、[.../openssl-1.0.2-beta1]# maketest
9、[.../openssl-1.0.2-beta1]# makeinstall
10、[...../openssl-1.0.2-beta1]# cd /usr/local
11、[/usr/local]# ln -s openssl ssl
12、在/etc/ld.so.conf文件的最後面,添加如下內容:/usr/local/openssl/lib
13...]# ldconfig
14添加OPESSL的環境變數:
在etc/的profile的最後一行,添加:
export OPENSSL=/usr/local/openssl/bin
export PATH=$OPENSSL:$PATH:$HOME/bin
15退出命令界面,再從新登錄。
16、以上OPENSSL就安裝完畢,下面進行一些檢查。
17依次如下執行:
[root@localhost /]# cd /usr/local
[root@localhost local]# ldd /usr/local/openssl/bin/openssl
會出現類似如下信息:
linux-vdso.so.1 => (0x00007fff3bc73000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fc5385d7000)
libc.so.6 => /lib64/libc.so.6 (0x00007fc538279000)
/lib64/ld-linux-x86-64.so.2 (0x00007fc5387db000)
18查看路徑
...]# which openssl
/usr/local/openssl/bin/openssl
19、...]# openssl version
OpenSSL 1.0.2-beta1 24 Feb 2014
3. 錯誤情況
自己寫的程序出現這個(fatal error: openssl/sha.h: No such fileor directory)或者相似的問題,一開始以為是環境變數的問題,重裝了幾次,後來差了網路才知道問題所在,都是沒有安裝libssl-dev,libssl-dev包含libraries, header files and manpages,他是openssl的一部分,而openssl對ssl進行了實現。解決方案:使用sudo apt-get install libssl-dev來安裝libssl-dev即可註:部分為網上抄襲!

下面來看使用方法,生成RSA
3.1 公私鑰對生成
命令解析:openssl genrsa[-out filename] [-passout arg] [-des] [-des3] [-idea] [-f4][-3] [-rand file(s)] [numbits]
OPTIONS
-out filename 私有密鑰輸入文件名,預設為標准輸出。
-passout arg 參看指令dsa裡面的passout參數說明 -des|-des3|-idea 採用什麼加密演算法來加密我們的密鑰。一般會要你輸入保護密碼。 如果這三個中一個也沒set, 我們的密鑰將不被加密而輸入。
-F4|-3 使用的公共組件,一種是3, 一種是F4, 我也沒弄懂這個option是什麼意思。
-randfile(s) 產生key的時候用過seed的文件,可以把多個文件用冒號分開一起做seed.
-numbits 指明產生的參數的長度。必須是本指令的最後一個參數。如果沒有指明,則產生512bit長的參數。 研究過RSA演算法的人肯定知道,RSA的私有密鑰其實就是三個數字,其中倆個是質數。這倆個呢,就叫prime numbers.產生RSA私有密鑰的關鍵就是產生這倆。還有一些其他的參數,引導著整個私有密鑰產生的過程。因為產生私有密鑰過程需要很多隨機數,這個過程的時間是不固定的。
//root@ubuntu:/mnt/hgfs/windows_linux/AlipayEx/study/opensslstudy/study#openssl genrsa -out RSAPrivateKey.pem 1024
//root@ubuntu:/mnt/hgfs/windows_linux/AlipayEx/study/opensslstudy/study#openssl rsa -in RSAPrivateKey.pem -pubout -out RSAPublicKey.pem

3.2 讀取密鑰
PEM_read_RSAPrivateKey
PEM_read_RSA_PUBKEY
具體參數看文檔去吧!
3.3 加解密
公鑰加密,私鑰解密
RSA_public_encrypt
RSA_private_decrypt
具體參數看文檔去吧!
3.4 簽名
私鑰簽名,公鑰驗簽
SHAwithRSA
1.SHA1M(自己封裝的)
2. RSA_sign(/*sha1withRSA第一個參數為NID_sha1,第二第三個參數為明文的sha1摘要及長度SA_verify

❼ Linux升級openssl時遇到的奇怪錯誤

伺服器系統為centos6.5 想對系統的openssl進行升級 於是開始安裝,最櫻拆先開始安裝的脊蔽棗是1.1.1-pre8 後來將其刪除重新安裝1.1.1b。安裝過程中出現了奇怪的問題
具體如下:

建立openssl硬鏈接時,同時建立一個openssl 和 testopenssl
運行命令 ls -li|grep ssl後可以看到這兩個硬鏈接對應了同樣的 inode 796072
如圖1:

可是在運行 openssl version 和 testopenssl version時確出現了 奇怪的現象 圖2

得到的運行結果居然不同 其中1.1.1b為目前安裝的版本 1.1.1-pre8為之前試安裝的版本
實在不明白原因是什麼

附:在卸載1.1.1-pre8時 把/usr/bin/openssl 軟鏈接刪除後 發現openssl軟鏈接仍然可以使用 當時就覺得非常奇怪

圖3 甚至將usr/bin 下對應的鏈接文件換回系統默認的openssl後 仍然找到的是之前安裝的1.1.1-pre8版本
後來安裝git時 報錯好像也與openssl有關
這個奇怪的錯誤已然成為本系統中的一個並檔毒瘤了!!!

今天 了解到了 bashrc profile 文件 懷疑 可能將openssl配置到了 這類文件裡面
參考 https://blog.csdn.net/chenchong08/article/details/7833242
緣由卸載git 後 發現使用 git version 仍能顯示版本號

❽ linux環境下php5.6.30安裝openssl擴展報錯,麻煩各位大神看看哪兒的問題

安裝PHP成功後,進入 PHP 的源碼

#cd /usr/local/src/php-5.6.8

進入openssl擴展模塊的目錄

#cd ext/openssl

在當前目錄下執行

# mv config0.m4   config.m4

#/usr/local/php/bin/phpize //這里為你自己的phpize路徑,如果找不到,可以用whereis phpize查找

#./configure --help |grep openssl 查看安裝openssl擴展需要的相關選項

#./configure --with-openssl --with-php-config=/usr/local/php/bin/php-config 描紅的是安裝每個擴展的必選項

#make

#make install

❾ 如何在linux下安裝ssl證書

Apache安裝景安SSL證書需要三個配置文件

1
1_root_bundle.crt、2_domainname.com.crt、3_ domainname.com.key。
註:這三個文件在文件夾for Apache.zip中,其中domainname.com是您的域名,2_ domainname.com.crt為公鑰,3_domainname.com.key為私鑰。(文件後綴名crt和cer的性質是一樣的)
END
安裝證書

下載並解壓openssl。(1)確認文件的存放目錄,例當前目錄為:/usr/local。

解壓openssl。如:tar zxvf openssl-0.9.8k.tar.gz

配置openssl。(1)進入openssl目錄。如:cd openssl-0.9.8k。

2)配置openssl。如:./config shared zlib make make test make install mv /usr/bin/openssl /usr/bin/openssl.save mv /usr/include/openssl /usr/include/openssl.save mv /usr/lib/libssl.so /libssl.so.save ln -s /usr/local/ssl/bin/openssl /usr/bin/openssl ln -s /usr/local/ssl/include/openssl /usr/include/openssl ln -sv /usr/local/ssl/lib/libssl.so.0.9.8 /usr/lib/libssl.so

安裝apache1.解壓文件:tar zxvf httpd-2.2.26.tar.gz2.進入目錄:cd httpd-2.2.263.配置安裝(/usr/local/ssl是openssl的安裝路徑):./configure --prefix=/usr/local/apache --enable-so --enable-ssl --with-ssl=/usr/local/ssl --enable-mods-shared=all
4.安裝:make && make install5.修改apache下的httpd.conf文件。(1)打開apache安裝目錄下conf目錄中的httpd.conf文件,找到 #LoadMole ssl_mole moles/mod_ssl.so #Include conf/extra/httpd-ssl.conf (2)刪除行首的配置語句注釋符號「#」,保存退出。6.修改apache下httpd-ssl文件。

如果本地測試,請做本地解析訪問:打開 系統盤:\Windows\System32\Drivers\etc\hosts文件,用文本編輯器修改,把證書綁定的域名解析到本地ip。

訪問https://+證書綁定的域名,測試效果如下:

熱點內容
內置存儲卡可以拆嗎 發布:2025-05-18 04:16:35 瀏覽:336
編譯原理課時設置 發布:2025-05-18 04:13:28 瀏覽:378
linux中進入ip地址伺服器 發布:2025-05-18 04:11:21 瀏覽:612
java用什麼軟體寫 發布:2025-05-18 03:56:19 瀏覽:32
linux配置vim編譯c 發布:2025-05-18 03:55:07 瀏覽:107
砸百鬼腳本 發布:2025-05-18 03:53:34 瀏覽:945
安卓手機如何拍視頻和蘋果一樣 發布:2025-05-18 03:40:47 瀏覽:742
為什麼安卓手機連不上蘋果7熱點 發布:2025-05-18 03:40:13 瀏覽:803
網卡訪問 發布:2025-05-18 03:35:04 瀏覽:511
接收和發送伺服器地址 發布:2025-05-18 03:33:48 瀏覽:372