I am asked to recompile mo_ssl
with openssl 1.0.2 in SuseSE11SP3.
However, I am a newbie to Suse, but know a little bit of linux.
- OS : Suse SE11SP3
- Openssl : 0.9.8j <-which comes with original Suse linux
- Web Server : Apache httpd 2.2.9
Here is limitation I have. I cannot use zypper
or rpm
because company security policy does not allow me to do it. It is absurd, this is how it goes here.
Another limitation I have is this system is used by other web servers which I don't have permission. I have to make it as locally as possible.
What I want it to happen is that when I recompile apache server, I like to see mod_ssl
is linked to newer version Openssl library.
So, I downloaded Openssl 1.0.2h source file:
./confgiure --prefix=//PREFIX/openssl --opendir=/PREFIX/openssl
make test
make install
Successfully, I installed openssl on local directory.
and then I attempted to recompile httpd2.2.9 which already exists. so I went to source file in httpd 2.2.9
make clean
export LIBS=-ldl
export LD_LIBRARY_PATH="/PREFIX/openssl"
export LIBS="-L/PREFIX/openssl"
export CPPFLAGS="-I/PREFIX/include/openssl"
./configure --prefix=/PREFIX/apache22 --enable-so --enable-ssl=ssl -with-ssl=/PREFIX/openssl --enable-module=shared CC=/usr/bin/gcc
make install
There were some errors but I kind of figured out and make it compiled. However,
the final result for mod_ssl
is still linked to old Openssl 0.9.8 instead of newer version 1.0.2h
What did I miss in these steps? Or where did I go wrong?
//openssl install
./config -fPIC shared --prefix=/PREFIX/openssl --openssldir=/PREFIX/openssl
make
make test
make install
// install apache2
//recompiling after apache2 is installed with openssl
export LIBS=-ldl
export LD_LIBRARY_PATH="/PREFIX/openssl/lib"
export LDFLAGS="-L/PREFIX/openssl"
export CPPFLAGS="-I/PREFIX/openssl/include/openssl"
export CFLAGS="-Wl,-rpath=/PREFIX/openssl:/usr/lib -I/PREFIX/openssl/include/openssl"
./configure --prefix=/PREFIX/apache22 --enable-so --enable-ssl=shared -with-ssl=/PREFIX/openssl --enable-module=shared CC=/usr/bin/gcc
make
make install
The above command creates mod_ssl.so under "apache22/modules" but when I did ldd mod_ssl.so it came out like the following
linux-vdso.so.1 => (0x00007fffef8f2000)
libssl.so.1.0.0 => not found
libcrypto.so.1.0.0 => not found
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ffe6a48d000)
libc.so.6 => /lib64/libc.so.6 (0x00007ffe6a116000)
/lib64/ld-linux-x86-64.so.2 (0x00007ffe6a913000)
libssl.so, libcrypto.so is not linked .. I don't know whatelse I can do it here to link mod_ssl.so to different version of openssl.
please help me.
LDFLAGS=-L/PREFIX/openssl
? – Teetotalexport CPPFLAGS="-Wl,-rpath=/PREFIX/openssl:/usr/lib -I/PREFIX/include/openssl"
. – TeetotalCFLAGS
, notCPPFLAGS
. – Teetotal--enable-ssl=ssl
to--enable-ssl=shared
. – Teetotal-Wl,-rpath
accordingly where libssl.so and libcrypto.so are. I would suggest creating a/etc/ld.so.conf.d/*.conf
file for your new lib location, but it might conflict with your existing libcrypto and libssl. So adjusting-Wl,-rpath
should do it. – Teetotal/PREFIX/openssl/lib
. Useexport CFLAGS="-Wl,-rpath=/PREFIX/openssl/lib:/usr/lib -I/PREFIX/openssl/include/openssl"
. – Teetotal