久久久久久久999_99精品久久精品一区二区爱城_成人欧美一区二区三区在线播放_国产精品日本一区二区不卡视频_国产午夜视频_欧美精品在线观看免费

 找回密碼
 立即注冊

QQ登錄

只需一步,快速開始

搜索
查看: 1789|回復: 0
收起左側

Linux下的openssl安裝

[復制鏈接]
ID:107189 發表于 2016-3-5 18:12 | 顯示全部樓層 |閱讀模式
我從網上搜索到了一篇安裝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 : 默認安裝路徑 /usr/local/ssl
  • Module type : dynamically and staticly loaded modules, *.so *.a
Build InstructionsConfigure.../openssl-0.9.8c]# ./config --prefix=/usr/local/ --openssldir=/usr/local/openssl -g3 shared zlib-dynamic enable-camellia

  • --prefix=/usr/local/ --openssldir=/usr/local/openssl
    [指定安裝路徑; 默認是'/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]
  • 運行./config --prefix=/usr/local/openssl (更 多選項用./config --help來查看),可用的選項有:no-mdc2、no-cast no-rc2、no-rc5、no-ripemd、 no-rc4 no-des 、no-md2、no-md4、no-idea 、no-aes、no-bf、no-err、no-dsa、no-dh、 no-ec、no-hw、no-asm、no-krb5、no-dso 、no-threads 、no-zlib、-DOPENSSL_NO_HASH_COMP、-DOPENSSL_NO_ERR、-DOPENSSL_NO_HW 、- DOPENSSL_NO_OCSP、-DOPENSSL_NO_SHA256和-DOPENSSL_NO_SHA512等。去掉不必要的內容可以減少生成庫的大小。 若要生成debug版本的庫和可執行程序加-g或者-g3(openssl中有很多宏,需要調試學習最好加上-g3)。
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
  • libssl.so.0.9.8 => /usr/local/ssl-0.9.8c/lib/libssl.so.0.9.8 ...
  • libcrypto.so.0.9.8 => /usr/local/ssl-0.9.8c/lib/libcrypto.so.0.9.8 ...
...]# 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.
     但是我最后沒有得到想要的結果,系統原來的openssl還是沒能卸載掉,我該怎么做那?我繼續搜索資料,哈,幸運的我找了,在一個國內論壇上是這么說的
      cd /usr/local/ssl/lib
      ln -s libcrypto.so.0.9.7 libcrypto.so.2
      ln -s libssl.so.0.9.7 libssl.so.2

      //最后要刷新系統的動態連接庫配置
      echo /usr/local/ssl/lib >> /etc/ld.so.conf
      ldconfig -v
        這下子我豁然開朗,原來依賴的那2個文件是個軟鏈接啊,我把它修改為我現在真正的openssl庫文件不是就行了嗎?于是一頓忙碌后,我終于執行了 rpm -e -nodeps ,然后重新啟動系統,一路運行下去,全是綠燈。一時間感覺自己好幸福啊
回復

使用道具 舉報

您需要登錄后才可以回帖 登錄 | 立即注冊

本版積分規則

小黑屋|51黑電子論壇 |51黑電子論壇6群 QQ 管理員QQ:125739409;技術交流QQ群281945664

Powered by 單片機教程網

快速回復 返回頂部 返回列表
主站蜘蛛池模板: 日日干天天操 | 久久成人综合 | 在线看一区二区三区 | 国产精品69久久久久水密桃 | 亚洲欧美一区二区在线观看 | 孰女乱色一区二区三区 | 91精品一区二区三区久久久久 | av香港经典三级级 在线 | 一级特黄网站 | 国产精品片aa在线观看 | 国内精品免费久久久久软件老师 | 亚洲国产精品久久久久秋霞不卡 | 国产区精品 | 91av久久久| 成人av免费在线观看 | 国产ts人妖系列高潮 | 在线播放国产一区二区三区 | 免费看的av | 成年人网站在线观看视频 | 天天天天操 | 午夜精品一区二区三区在线观看 | 懂色av一区二区三区在线播放 | 视频三区| 怡红院怡春院一级毛片 | 欧美在线不卡 | 日韩成人 | 在线播放亚洲 | 国产精品久久久久久一区二区三区 | 午夜小视频在线观看 | 欧美黄在线观看 | japanhd美女动 | 91久久| 亚洲高清一区二区三区 | 成人精品视频在线观看 | 一二区电影 | 欧美日本在线观看 | 久久毛片网站 | 在线观看中文字幕亚洲 | 黄色一级片aaa | 男女免费观看在线爽爽爽视频 | 亚洲一区二区中文字幕 |