nginxでspdyを試したい!だけど、現状動作しているものは、いじりたくない。。。
ec2で動作検証すればいいんでしょうが。。。
- 今、動いているのは、rpmからインストールしたもの
- tar.gzからインストールすれば、別々のところにインストール可能
というわけで、tar.gzからインストールしていきます。 今回は、OpenSSLのインストールからmake installするところまでです。
OpenSSLの1.0.1以上をインストールする
今の状態
~/package ᐅ rpm -qa | grep release remi-release-6-1.el6.remi.noarch epel-release-6-5.noarch centos-release-6-2.el6.centos.7.x86_64 nginx-release-centos-6-0.el6.ngx.noarch
IUS reposからインストールすることができるので、登録する。
~/package ᐅ wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/ius-release-1.0-10.ius.el6.noarch.rpm ~/package ᐅ wget http://dl.iuscommunity.org/pub/ius/stable/Redhat/6/x86_64/yum-plugin-replace-0.2.5-1.ius.el6.noarch.rpm ~/package ᐅ sudo rpm -Uvh ius-release-1.0-10.ius.el6.noarch.rpm ~/package ᐅ sudo rpm -Uvh yum-plugin-replace-0.2.5-1.ius.el6.noarch.rpm
今のopenssl
~/package ᐅ rpm -qi openssl Name : openssl Relocations: (not relocatable) Version : 1.0.0 Vendor: CentOS Release : 25.el6_3.1 Build Date: 2012年08月23日 14時01分06秒 Install Date: 2012年09月30日 23時54分08秒 Build Host: c6b7.bsys.dev.centos.org Group : System Environment/Libraries Source RPM: openssl-1.0.0-25.el6_3.1.src.rpm Size : 3768415 License: OpenSSL Signature : RSA/SHA1, 2012年08月23日 21時31分38秒, Key ID 0946fca2c105b9de Packager : CentOS BuildSystem <http://bugs.centos.org> URL : http://www.openssl.org/ Summary : A general purpose cryptography library with TLS implementation ~/package ᐅ rpm -qi openssl-devel Name : openssl-devel Relocations: (not relocatable) Version : 1.0.0 Vendor: CentOS Release : 25.el6_3.1 Build Date: 2012年08月23日 14時01分06秒 Install Date: 2012年09月30日 23時54分10秒 Build Host: c6b7.bsys.dev.centos.org Group : Development/Libraries Source RPM: openssl-1.0.0-25.el6_3.1.src.rpm Size : 2161501 License: OpenSSL Signature : RSA/SHA1, 2012年08月23日 21時31分38秒, Key ID 0946fca2c105b9de Packager : CentOS BuildSystem <http://bugs.centos.org> URL : http://www.openssl.org/ Summary : Files for development of applications which will use OpenSSL
インストール
~/package ᐅ sudo yum replace openssl --replace-with=openssl10 --enablerepo=ius-testing Loaded plugins: fastestmirror, replace, security Loading mirror speeds from cached hostfile * epel: ftp.iij.ad.jp * ius: ftp.neowiz.com * ius-testing: ftp.neowiz.com Replacing packages takes time, please be patient... WARNING: Unable to resolve all providers: ['config(openssl)', 'openssl(x86-64)', 'openssl-devel(x86-64)'] This may be normal depending on the package. Continue? [y/N] y Resolving Dependencies --> Running transaction check ---> Package openssl.x86_64 0:1.0.0-25.el6_3.1 will be erased ---> Package openssl-devel.x86_64 0:1.0.0-25.el6_3.1 will be erased ---> Package openssl10.x86_64 0:1.0.1c-10.ius.el6 will be installed ---> Package openssl10-devel.x86_64 0:1.0.1c-10.ius.el6 will be installed ---> Package openssl10-libs.x86_64 0:1.0.1c-10.ius.el6 will be installed --> Finished Dependency Resolution Dependencies Resolved =================================================================================================== Package Arch Version Repository Size ===================================================================================================Installing: openssl10 x86_64 1.0.1c-10.ius.el6 ius-testing 663 k openssl10-devel x86_64 1.0.1c-10.ius.el6 ius-testing 1.1 M openssl10-libs x86_64 1.0.1c-10.ius.el6 ius-testing 806 k Removing: openssl x86_64 1.0.0-25.el6_3.1 @updates 3.6 M openssl-devel x86_64 1.0.0-25.el6_3.1 @updates 2.1 M Transaction Summary =================================================================================================== Install 3 Package(s) Remove 2 Package(s) Total download size: 2.6 M ---------------------------------------------
確認
~/package ᐅ rpm -qi openssl10 Name : openssl10 Relocations: (not relocatable) Version : 1.0.1c Vendor: (none) Release : 10.ius.el6 Build Date: 2013年01月09日 04時58分55秒 Install Date: 2013年02月03日 02時57分28秒 Build Host: 339189-build03.rpmdev.rackspace.com Group : System Environment/Libraries Source RPM: openssl10-1.0.1c-10.ius.el6.src.rpm Size : 1588038 License: OpenSSL Signature : DSA/SHA1, 2013年01月09日 14時07分52秒, Key ID da221cdf9cd4953f URL : http://www.openssl.org/ Summary : Utilities from the general purpose cryptography library with TLS implementation ~/package ᐅ rpm -qi openssl10-devel Name : openssl10-devel Relocations: (not relocatable) Version : 1.0.1c Vendor: (none) Release : 10.ius.el6 Build Date: 2013年01月09日 04時58分55秒 Install Date: 2013年02月03日 02時57分27秒 Build Host: 339189-build03.rpmdev.rackspace.com Group : Development/Libraries Source RPM: openssl10-1.0.1c-10.ius.el6.src.rpm Size : 2226493 License: OpenSSL Signature : DSA/SHA1, 2013年01月09日 14時07分51秒, Key ID da221cdf9cd4953f URL : http://www.openssl.org/ Summary : Files for development of applications which will use OpenSSL
nginxをインストールする
~/package ᐅ wget http://nginx.org/download/nginx-1.3.11.tar.gz ~/package ᐅ tar xvfz nginx-1.3.11.tar.gz ~/package ᐅ cd nginx-1.3.11 # patchをおとしてあてる ~/package/nginx-1.3.11 ᐅ wget http://nginx.org/patches/spdy/patch.spdy.txt ~/package/nginx-1.3.11 ᐅ patch -p1 < patch.spdy.txt # cofigure make make install ~/package/nginx-1.3.11 ᐅ ./configure --with-http_ssl_module --with-http_spdy_module hecking for getaddrinfo() ... found checking for PCRE library ... not found checking for PCRE library in /usr/local/ ... not found checking for PCRE library in /usr/include/pcre/ ... not found checking for PCRE library in /usr/pkg/ ... not found checking for PCRE library in /opt/local/ ... not found ./configure: error: the HTTP rewrite module requires the PCRE library. You can either disable the module by using --without-http_rewrite_module option, or install the PCRE library into the system, or build the PCRE library statically from the source with nginx by using --with-pcre=<path> option. # エラーが出た! # pcre-develをインストールしてみる。 ~/package/nginx-1.3.11 ᐅ sudo yum install pcre-devel # ログ取ってないけど、成功しました。 ~/package/nginx-1.3.11 ᐅ sudo paco -D make install
nginxでspdyを試す02へ続きます。