###前提・実現したいこと
https://teratail.com/questions/66253
OpenSSL を
yum -y groupinstall development yum -y install zlib-devel cd /usr/local/src/ wget https://www.openssl.org/source/openssl-1.1.0e.tar.gz tar xvzf openssl-1.1.0e.tar.gz cd openssl-1.1.0e/ ./config shared zlib make make install echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local.conf echo "/usr/local/lib" >> /etc/ld.so.conf.d/local.conf /sbin/ldconfig
と OpenSSL を手動でインストールしました。
###発生している問題・エラーメッセージ
しかし、openssl version
で確認するとリコンパイルした。OpenSSL のバージョンが表示されます。
でも、ソフトの詳細を見るとyum install openssl
でインストールされたOpenSSLが使われています。
###補足情報(言語/FW/ツール等のバージョンなど)
CentOS 7.3
初期から OpenSSL 1.0.1 が入っています。
気になる質問をクリップする
クリップした質問は、後からいつでもMYページで確認できます。
またクリップした質問に回答があった際、通知やメールを受け取ることができます。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。

退会済みユーザー
2017/03/03 11:24

回答3件
0
opensslコマンドについて
centosで標準でインストールされている openssl は色々なパッケージが依存しているので システム標準の openssl はデフォルトのままが良いと思います。
自分でビルドしたOpensslは/usr/local/bin にインストールされていると思いますので 使用する際に、/usr/local/bin/openssl が呼び出されれば良いと思います。
というわけで環境変数PATHに /usr/local/bin を追加すれば良い気がします。
例:
$ echo 'export PATH=/usr/local/bin:$PATH' >> ~/.bash_profile
$ . ~/.bash_profile
$ openssl -v
Apacheに組み込む
Apacheに組み込むには ソースからビルドを行います。
その際、「./configure --prefix=/opt/httpd --enable-mods-shared=all --enable-ssl --with-ssl=/opt/openssl」というように ssl のインストール先を指定します。
投稿2017/03/03 13:56
編集2017/03/08 12:15総合スコア1484
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。

退会済みユーザー
2017/03/06 11:18

退会済みユーザー
2017/03/07 07:49
2017/03/07 08:11

退会済みユーザー
2017/03/07 10:37
2017/03/08 07:12

退会済みユーザー
2017/03/08 11:36

退会済みユーザー
2017/03/09 10:23

0
明確な回答にはなっていませんが・・・
しかし、openssl versionで確認すると yum install openssl で導入した OpenSSL のバージョンが表示されてしまします。
以下の要因が考えられます。
- インストール先にパスが通っていない
- 正常にインストールできていない。
そして OpenSSL を使用する物も古いOpenSSL を使ってしまって困ってます。
(自己責任であれば)OpenSSL を併用することは可能だと思います。
※ 「OpenSSL 1.1.0」で動作しない可能性もありますが。。。
■(2017-03-09 19:10 追記)■
■(2017-03-09 22:45 修正):configure のオプションのダイエット■
■(2017-03-10 16:20 )修正■
「nginx-1.11.10」 を 「openssl-1.1.0e」 でビルド・インストール
ワタシが試しにビルドしたときのメモです
●nginx のコンパイルに必要なモノをダウンロード
cd /usr/local/src wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.40.tar.bz2 wget http://zlib.net/zlib-1.2.11.tar.xz wget https://www.openssl.org/source/openssl-1.1.0e.tar.gz wget https://nginx.org/download/nginx-1.11.10.tar.gz
●ダウンロードしたファイルを展開
cd /usr/local/src tar zxvf openssl-1.1.0e.tar.gz tar jxvf pcre-8.40.tar.bz2 tar Jxvf zlib-1.2.11.tar.xz tar zxvf nginx-1.11.10.tar.gz
●意味ないけど、シンボリック・リンク
cd /usr/local/src ln -s ./openssl-1.0.2k openssl ln -s ./pcre-8.40 pcre ln -s ./zlib-1.2.11 zlib ln -s ./nginx-1.11.10 nginx
●nginx のソースディレクトリで "configure"実行
/usr/local
以下にインストール- 今回、
configure
のオプションは(多分)最低限になっています。 - デフォルトの「モジュール使用」+「HTTPS対応」
- 他に必要な機能(モジュール)は、適宜、指定してください。
- 必要なパッケージはわかりません。
cd /usr/local/src/nginx ./configure --prefix=/usr/local \ --with-cc=gcc \ --user=nginx \ --group=nginx \ --with-http_ssl_module \ --with-stream \ --with-pcre-jit \ --with-pcre=./../pcre \ --with-zlib=./../zlib \ --with-openssl=./../openssl \ --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' \ --with-ld-opt='-Wl,-z,relro -Wl,-z,now '
エラーが発生しなければ、以下のようなメッセージが表示されます。
Configuration summary + using threads + using PCRE library: ./../pcre + using OpenSSL library: ./../openssl + using zlib library: ./../zlib nginx path prefix: "/usr/local" nginx binary file: "/usr/local/sbin/nginx" nginx modules path: "/usr/local/modules" nginx configuration prefix: "/usr/local/conf" nginx configuration file: "/usr/local/conf/nginx.conf" nginx pid file: "/usr/local/logs/nginx.pid" nginx error log file: "/usr/local/logs/error.log" nginx http access log file: "/usr/local/logs/access.log" nginx http client request body temporary files: "client_body_temp" nginx http proxy temporary files: "proxy_temp" nginx http fastcgi temporary files: "fastcgi_temp" nginx http uwsgi temporary files: "uwsgi_temp" nginx http scgi temporary files: "scgi_temp"
●"make" & "make install"実行
make make install
●バージョン確認
/usr/local/sbin/nginx -V nginx version: nginx/1.11.10 built by gcc X.Y.Z built with OpenSSL 1.1.0e 16 Feb 2017 TLS SNI support enabled ~~~
●後始末
cd /usr/local/src rm -rf openssl-1.0.2k openssl pcre-8.40 pcre zlib-1.2.11 zlib nginx-1.11.10 nginx
- ばっさり、消してしまって良いのかは知りません。
※ 補足
- OS起動時に自動実行させる設定は、環境によって異なるので、ご自身でお調べください。
投稿2017/03/03 13:55
編集2017/03/10 07:27総合スコア447
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。

退会済みユーザー
2017/03/09 10:26

退会済みユーザー
2017/03/09 11:52

退会済みユーザー
2017/03/13 11:57
2017/03/15 11:38

あなたの回答
tips
太字
斜体
打ち消し線
見出し
引用テキストの挿入
コードの挿入
リンクの挿入
リストの挿入
番号リストの挿入
表の挿入
水平線の挿入
プレビュー
質問の解決につながる回答をしましょう。 サンプルコードなど、より具体的な説明があると質問者の理解の助けになります。 また、読む側のことを考えた、分かりやすい文章を心がけましょう。