Skip to content

Instantly share code, notes, and snippets.

@nikushi
Last active December 17, 2015 13:29
Show Gist options
  • Select an option

  • Save nikushi/5617433 to your computer and use it in GitHub Desktop.

Select an option

Save nikushi/5617433 to your computer and use it in GitHub Desktop.
ApacheとOpenSSLをコンパイルする。 都合DSOは使わないことにした。 mod_sslはhttpd実行時にlibssl.soを呼ぶが、LIB_LIBRARY_PATHを設定せずhttpdを起動するとシステムワイドな/usr/lib64/libssl.soが呼ばれて意図しないOpenSSLバージョンで起動してしまう問題に悩まされたときのメモ。
# @reference http://d.hatena.ne.jp/hiroppon/20081122/1228069519
# openssl
# sharedオプションでlibssl.soを作る
./Configure shared --prefix=/usr/local/openssl-x.x.x
make
make install
# chdir 略
# apache
./configure --prefix=/usr/local/httpd-y.y.y --enable-ssl --with-ssl=/usr/local/openssl-x.x.x --with-expat=builtin --with-included-apr
make
make install
# apacheのenvvarsのLD_LIBRARY_PATHにopensslのlibのパス(/usr/local/openssl-x.x.x/lib)を追加する
# ここ重要
vim /usr/local/httpd-y.y.y/bin/envvars
===
LD_LIBRARY_PATH="/usr/local/openssl-x.x.x/lib:/usr/local/httpd-y.y.y/lib:$LD_LIBRARY_PATH"
===
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment