Because you need to test Nginx spdy, you need to upgrade OpenSSL. May involve subsequent large-scale upgrade plans, so the OpenSSL is made into RPM packages, which includes the management of HIFN so.
The management of HIFN so is:
Copy so to/usr/lib and create the latest so link file in/usr/lib.
It is then introduced into the directory of OpenSSL via the/usr/lib link file.
After so upgrade, copy to/usr/lib, then update so linked file on it.
OpenSSL's spec file content.
#sinaopenssl -1.0.1j.specs%define debug_package %{nil}%define openssldir /usr/local/ openssl-%{version}summary: rpm for openssl name: sina-openssl version: 1.0.1jrelease: 1vendor: sina/guoliang9license: sharegroup: enterprise/sinaautoreqprov: 0url: http://www.sina.com.cn/source: sina-openssl-1.0.1j.tar.gzbuildroot: %{_tmppath}/%{ name}-%{version}-root-% (%{__ID_U} -N) buildarch: noarch%description installed on this device%{name}-%{version}%prep% setup -q%build%define config_flags --prefix=%{openssldir}./config %{config_flags} Sharedld_library_path= ' pwd ' makeld_library_path= ' pwd ' make rehash%installrm -rf $RPM _ build_rootmake install install_prefix= "$RPM _build_root" install -d libeng_dx.so.1.1.0 %{buildroot}/%{openssldir}/lib/engines/%posttest -f /usr/lib/libeng_dx.so.1.1.0 | | cp -f %{openssldir}/lib/engines/libeng_dx.so.1.1.0 /usr/lib/libeng_dx.so.1.1.0 test -l /usr/lib/libeng_dx.so | | ln -sf /usr/lib/libeng_dx.so.1.1.0 /usr/lib/libeng_dx.soln -sf /usr/lib/ libeng_dx.so %{openssldir}/lib/engines ldconfig%cleanrm -rf $RPM _build_root%preunrm - F %{openssldir}/lib/engines/libeng_dx.so%postunldconfig%files%defattr (-,root,root,0755)%{openssldir}% Changelog
Nginx startup file Main change content is:
#!/bin/sh# chkconfig: - 85 15 # description: this sina nginx# processname: nginx# config: /usr/local/{nginx}/conf/nginx.conf# pidfile: /usr/ Local/{nginx}/logs/nginx.pid# source function library. /etc/rc.d/init.d/functions# source networking configuration. /etc/sysconfig/network# check that networking is up. [ "$NETWORKING" = "no" ] && exit 0# define OpenSSL version pathif [ -d "/usr/local/openssl-1.0.1j/lib" ];then openssldir= "/ Usr/local/openssl-1.0.1j/lib "elif [ -d "/usr/local/openssl-1.0.0m/lib " ];then Openssldir= "/usr/local/openssl-1.0.0m/lib" fi if [ ! -z $OPENSSLDIR ];then nginx= "/bin/env ld_library_path= $OPENSSLDIR /usr/ local/$COnfdir/sbin/nginx "else nginx="/usr/local/$CONFDIR/sbin/nginx " The subsequent content of FI is basically almost. Balabala ...
The remaining OpenSSL upgrade operations are only required:
Yum Install sina-openssl-y &&/etc/init.d/nginx restart
This article is from the "Xiaofeng Moon" blog, make sure to keep this source http://kinda22.blog.51cto.com/2969503/1586592
OPENSSL-1.0.1J making rpm Spec file