openssl 安装(修改篇)

本文档详细介绍了在Fedora 10系统上安装OpenSSL的步骤,包括下载源码、配置、编译安装、创建符号链接、更新运行时链接器路径以及环境变量设置。确保正确链接到新安装的libcrypto.so.0.9.8和libssl.so.0.9.8库。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Fedora 10   内核:2.6

 

 

原文地址:http://www.devside.net/guides/linux/openssl

Building a Web Server, for Linux

Requirements

Perl

Download

Our Configuration

  • Install to : /usr/local/ssl
  • Module type : dynamically and staticly loaded modules, *.so *.a

Build Instructions

Configure

.../openssl-0.9.8c]# ./config --prefix=/usr/local/ssl-0.9.8c shared zlib-dynamic enable-camellia

  • --prefix=/usr/local/ssl-0.9.8c
    [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.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
Symlink

Form 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 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 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 PATH

Edit /root/.bash_profile, add to PATH variable...

/usr/local/ssl/bin

Re-login.

[sanity check] OpenSSL

Verify that binary 'openssl' is linking against the correct ssl libraries...

...]# ldd /usr/local/ssl/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 ...

...]# PATH=“$PATH:/usr/local/ssl/bin”   <-----添加此条命令,不然之后两条命令无效

...]# which openssl

/usr/local/ssl/bin/openssl

...]# openssl version

OpenSSL 0.9.8c 05 Sep 2006

If 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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值