CentOS 6.2 ç¨ã« Apache 2.4.1 ã® RPM ãä½æãã
CentOS 6.2(i686)ç¨ã«å æ¥ãªãªã¼ã¹ããã Apache 2.4.1 ã® RPM ãä½æãã¤ã³ã¹ãã¼ã«ãã¦ã¿ã¾ããã
äºåæºå
éçºç¨ãã¼ã«ã®ã¤ã³ã¹ãã¼ã«ã
# yum groupinstall -y "Development Tools"
yum ãªãã¸ããªã« EPEL ã追å ã
# rpm --import http://ftp.riken.jp/Linux/fedora/epel/RPM-GPG-KEY-EPEL-6 # rpm -ivh http://ftp.riken.jp/Linux/fedora/epel/6/i386/epel-release-6-5.noarch.rpm
äºåã«è¡ã£ã¦ãã主ãªä½æ¥ã¯ãã®ãããã§ã(ãã¶ãã»ã»ã»)ã
ãã足ããªãã©ã¤ãã©ãªãªã©ãããã°ã¨ã©ã¼ãåºãã¯ããªã®ã§ãé©å®ã¤ã³ã¹ãã¼ã«ãã¦ãã ããã
ã¤ã³ã¹ãã¼ã«ããã¦ãã Apache ã®åé¤
Apache ã®ææ°çã RPM ãã«ããã¦ã¤ã³ã¹ãã¼ã«ãããããã¾ã㯠yum ã§å ¥ã£ã¦ãã Apache é¢é£ããã±ã¼ã¸ãåé¤ãã¾ãã
# yum remove httpd apr apr-util
rpmbuild ã®æºå
RPM ãä½æãããããrpmbuild ã®æºåããã¾ãã
# useradd rpmdevel # su - rpmdevel $ mkdir -p ~/rpm/{BUILD,SRPMS,SPECS,SOURCES,RPMS} $ echo "%_topdir $HOME/rpm" > $HOME/.rpmmacros $ mkdir src
ãã㧠RPM ä½æã®ããã®æºåã¯å®äºã§ãã
apr ã®ã¤ã³ã¹ãã¼ã«
apr ã® RPM ãä½æãã¦ã¤ã³ã¹ãã¼ã«ã
$ cd src/ $ wget http://ftp.kddilabs.jp/infosystems/apache/apr/apr-1.4.6.tar.bz2 $ rpmbuild -tb --clean --rmspec apr-1.4.6.tar.bz2
æåããã° /home/rpmdevel/rpm/RPMS/ 以ä¸ã« RPM ããã±ã¼ã¸ãä½æããã¦ãã¾ãã
apr-util ã® rpmbuild æã«å¿
è¦ã«ãªãã®ã§ãããã§ã¤ã³ã¹ãã¼ã«ãã¦ããã¾ãã
$ su -
# rpm -Uvh /home/rpmdevel/rpm/RPMS/i686/apr-1.4.6-1.i686.rpm /home/rpmdevel/rpm/RPMS/i686/apr-devel-1.4.6-1.i686.rpm
SQLite3 ã®ã¤ã³ã¹ãã¼ã«
apr-util ãå¿
è¦ã¨ãã SQLite3 ã®æ°ãããã¼ã¸ã§ã³ãå
¥ãããããFedora ã® SRPM ãæã£ã¦ãã¦ãªãã«ããã¾ãã
ä¸æ¦ root ã«ãªãä¾åã©ã¤ãã©ãªãã¤ã³ã¹ãã¼ã«ã
$ su -
# yum install -y tcl-devel
Fedora ã®ãªãã¸ããªãã SQLite3 ã® SRPM ãåå¾ãã¦ãªãã«ããã¾ãã
# su - rpmdevel $ cd src/ $ wget http://ftp.riken.jp/Linux/fedora/releases/16/Everything/source/SRPMS/sqlite-3.7.7.1-1.fc16.src.rpm $ rpmbuild --rebuild sqlite-3.7.7.1-1.fc16.src.rpm
root ã«ãªãã¤ã³ã¹ãã¼ã«ãã¾ãã
# su - # rpm -Uvh /home/rpmdevel/rpm/RPMS/i686/sqlite-3.7.7.1-1.el6.i686.rpm /home/rpmdevel/rpm/RPMS/i686/sqlite-devel-3.7.7.1-1.el6.i686.rpm
apr-util ã®ã¤ã³ã¹ãã¼ã«
ä¾åã©ã¤ãã©ãªãã¤ã³ã¹ãã¼ã«ã
# yum install -y expat-devel libuuid-devel db4-devel postgresql-devel mysql-devel freetds-devel unixODBC-devel openldap-devel nss-devel
apr-util ã® RPM ãä½æãã¦ã¤ã³ã¹ãã¼ã«ã
# su - rpmdevel $ cd src/ $ wget http://ftp.kddilabs.jp/infosystems/apache/apr/apr-util-1.4.1.tar.bz2 $ rpmbuild -tb --clean --rmspec apr-util-1.4.1.tar.bz2 $ su - # rpm -Uvh /home/rpmdevel/rpm/RPMS/i686/apr-util-1.4.1-1.i686.rpm /home/rpmdevel/rpm/RPMS/i686/apr-util-devel-1.4.1-1.i686.rpm
Apache 2.4.1 ã®ã¤ã³ã¹ãã¼ã«
ä¾åã©ã¤ãã©ãªãã¤ã³ã¹ãã¼ã«ã
# yum install -y pcre-devel lua-devel libxml2-devel
distcache-devel ã«ã¤ãã¦ã¯ CentOS 6 ã®ãªãã¸ããªã§ã¯æä¾ããã¦ããªããããªã®ã§ãFedora ãã SRPM ãæã£ã¦ã㦠ãªãã«ããã¦ã¤ã³ã¹ãã¼ã«ãã¾ããã
# su - rpmdevel $ cd src/ $ wget http://ftp.riken.jp/Linux/fedora/releases/16/Everything/source/SRPMS/distcache-1.4.5-22.src.rpm $ rpmbuild --rebuild distcache-1.4.5-22.src.rpm $ su - # rpm -Uvh /home/rpmdevel/rpm/RPMS/i686/distcache-1.4.5-22.i686.rpm /home/rpmdevel/rpm/RPMS/i686/distcache-devel-1.4.5-22.i686.rpm
ããã§ãã£ã¨ Apache ããã«ãããæºåãå®äºã§ãã
ããã¾ã§ã¨åãã rpmbuild ãå®è¡ã㦠RPM ãä½æãã¾ãã
$ su - rpmdevel $ cd src $ wget http://ftp.kddilabs.jp/infosystems/apache/httpd/httpd-2.4.1.tar.bz2 $ rpmbuild -ta --clean --rmspec httpd-2.4.1.tar.bz2
æåããã¨ä»¥ä¸ã®ãã¡ã¤ã«ãä½æããã¾ãã
/home/rpmdevel/rpm/SRPMS/httpd-2.4.1-1.src.rpm /home/rpmdevel/rpm/RPMS/i686/httpd-2.4.1-1.i686.rpm /home/rpmdevel/rpm/RPMS/i686/httpd-devel-2.4.1-1.i686.rpm /home/rpmdevel/rpm/RPMS/noarch/httpd-manual-2.4.1-1.noarch.rpm /home/rpmdevel/rpm/RPMS/i686/httpd-tools-2.4.1-1.i686.rpm /home/rpmdevel/rpm/RPMS/i686/mod_authnz_ldap-2.4.1-1.i686.rpm /home/rpmdevel/rpm/RPMS/i686/mod_lua-2.4.1-1.i686.rpm /home/rpmdevel/rpm/RPMS/i686/mod_proxy_html-2.4.1-1.i686.rpm /home/rpmdevel/rpm/RPMS/i686/mod_socache_dc-2.4.1-1.i686.rpm /home/rpmdevel/rpm/RPMS/i686/mod_ssl-2.4.1-1.i686.rpm /home/rpmdevel/rpm/RPMS/i686/httpd-debuginfo-2.4.1-1.i686.rpm
ããã§ã¯åãåãã httpd 㨠httpd-develãmod_ssl ãã¤ã³ã¹ãã¼ã«ãã¾ããã
$ su -
# rpm -Uvh /home/rpmdevel/rpm/RPMS/i686/httpd-2.4.1-1.i686.rpm /home/rpmdevel/rpm/RPMS/i686/httpd-devel-2.4.1-1.i686.rpm /home/rpmdevel/rpm/RPMS/i686/mod_ssl-2.4.1-1.i686.rpm
ãã¼ã¸ã§ã³ã確èªãã2.4.1 ãã¤ã³ã¹ãã¼ã«ããããã¨ã確èªãã¾ãã
# apachectl -V Server version: Apache/2.4.1 (Unix) Server built: Feb 25 2012 19:10:50 Server's Module Magic Number: 20120211:0 Server loaded: APR 1.4.6, APR-UTIL 1.4.1 Compiled using: APR 1.4.6, APR-UTIL 1.4.1 Architecture: 32-bit Server MPM: event threaded: yes (fixed thread count) forked: yes (variable process count) Server compiled with.... -D APR_HAS_SENDFILE -D APR_HAS_MMAP -D APR_HAVE_IPV6 (IPv4-mapped addresses enabled) -D APR_USE_SYSVSEM_SERIALIZE -D APR_USE_PTHREAD_SERIALIZE -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT -D APR_HAS_OTHER_CHILD -D AP_HAVE_RELIABLE_PIPED_LOGS -D DYNAMIC_MODULE_LIMIT=256 -D HTTPD_ROOT="/usr" -D SUEXEC_BIN="/usr/sbin/suexec" -D DEFAULT_PIDLOG="/var/run/httpd.pid" -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" -D DEFAULT_ERRORLOG="logs/error_log" -D AP_TYPES_CONFIG_FILE="/etc/httpd/conf/mime.types" -D SERVER_CONFIG_FILE="/etc/httpd/conf/httpd.conf"
ããã§ç°å¢ã¯æ´ã£ãã®ã§ãæãè¦ã¦ Apache 2.4 ç³»ã®æ°æ©è½ã試ãã¦ã¿ããã§ãã