ユーザ用ツール

サイト用ツール


サイドバー



最近の更新



Tag Cloud

タグ#
6
10
1
3
1
2
17
7
1
1
6
9
4
1
2
182
1
4
2
7
14
5
1
25
2
3
1
6
1
1
33
1
3
3
1
1
1
1
1
1
13
45
7
9
10
5
10
3
2
2
8
2
2
6
3
1
1
4
7
4
2
2
2
1
7
2
4
1
3
24
2
12
2
3
1
1
2
2
1
1
1
4
2
2
4
2
2
1
1
2
1
1
1
2
1
26
2
1
2
2
2
1
1
2
3
12
4
7
1
1
2
9
1
3
1
1
7
1
1
1
1
1
8
1
4
2
1
1
1
3
3
5
1
2
1
1
7
3
1
10
1
1
4
1
2
1
2
7
2
1
3
1
1
3
1
2
1
2
2
2
1
2
3
1
1
3
2
1
3
1
3
3
2
1
1
7
1
3
3
1
1
1
1
5
1
27
2
1
2
1
2
2
3
1
1
1
2
1
2
1
1
1
3
1
1
1
2
2
2
1
1

01_linux:02_www:32_centos_tls_apache_php

32 CentOS5でTLS1.2 Apache PHP

OpenSSLのアップグレードは31 CentOS5 でTLS1.2

apr/apr-util

# wget http://ftp.kddilabs.jp/infosystems/apache/apr/apr-1.6.5.tar.gz
# ./configure --prefix=/opt/apr/apr-1.6.5

# wget http://ftp.kddilabs.jp/infosystems/apache/apr/apr-util-1.6.1.tar.gz
./configure --prefix=/opt/apr-util/apr-util-1.6.1 --with-apr=/opt/apr/apr-1.6.5/

エラー

xml/apr_xml.c:35:19: error: expat.h: No such file or directory
xml/apr_xml.c:66: error: expected specifier-qualifier-list before ‘XML_Parser’
xml/apr_xml.c: In function ‘cleanup_parser’:
xml/apr_xml.c:364: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:365: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c: At top level:
xml/apr_xml.c:384: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
xml/apr_xml.c: In function ‘apr_xml_parser_create’:
xml/apr_xml.c:401: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:402: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:410: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:411: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:412: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:424: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:424: error: ‘default_handler’ undeclared (first use in this function)
xml/apr_xml.c:424: error: (Each undeclared identifier is reported only once
xml/apr_xml.c:424: error: for each function it appears in.)
xml/apr_xml.c: In function ‘do_parse’:
xml/apr_xml.c:434: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:438: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:442: error: ‘apr_xml_parser’ has no member named ‘xp_err’
xml/apr_xml.c:442: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c: In function ‘apr_xml_parser_geterror’:
xml/apr_xml.c:500: error: ‘apr_xml_parser’ has no member named ‘xp_err’
xml/apr_xml.c:500: error: ‘apr_xml_parser’ has no member named ‘xp_err’
make[1]: *** [xml/apr_xml.lo] Error 1
make[1]: Leaving directory `/usr/local/src/apr-util-1.6.1'
make: *** [all-recursive] Error 1

対応

# yum install expat-devel

Apache

# wget https://archive.apache.org/dist/httpd/httpd-2.2.24.tar.gz
./configure --prefix=/opt/httpd/httpd-2.2.24 \
--with-apr=/opt/apr/apr-1.6.5 \
--with-included-apr \
--with-apr-util=/opt/apr-util/apr-util-1.6.1 \
--enable-so \
--enable-rewrite \
--enable-ssl \
--enable-mods-shared=all \
--with-ssl=/opt/openssl-1.0.2r \
--enable-proxy \
--enable-setenvif \
--enable-authn-alias \
--enable-file-cache \
--enable-disk-cache \
--enable-mem-cache \
--enable-suexec \
--enable-cache

起動ファイル・conf用意

# cp  build/rpm/httpd.init  /etc/init.d/httpd-2.2.24
# diff build/rpm/httpd.init /etc/init.d/httpd-2.2.24 
60,62c60,62
< httpd=${HTTPD-/usr/sbin/httpd}
< pidfile=${PIDFILE-/var/log/httpd/${prog}.pid}
< lockfile=${LOCKFILE-/var/lock/subsys/${prog}}
---
> httpd=${HTTPD-/opt/httpd/httpd-2.2.24/bin/httpd}
> pidfile=${PIDFILE-/var/run/httpd-2.2.24.pid}
> lockfile=${LOCKFILE-/var/lock/subsys/httpd-2.2.24}
67c67
< 	CONFFILE=/etc/httpd/conf/httpd.conf
---
> 	CONFFILE=/opt/httpd/httpd-2.2.24/conf/httpd.conf

# chkconfig --add httpd-2.2.24
# chkconfig httpd off
# chkconfig httpd-2.2.24 on

# cp /opt/httpd/httpd-2.2.24/conf/httpd.conf /opt/httpd/httpd-2.2.24/conf/httpd.conf.org
# cp /etc/httpd/conf/httpd.conf  /opt/httpd/httpd-2.2.24/conf/httpd.conf
# cd /opt/httpd/httpd-2.2.24
# cp -rvf /etc/httpd/conf.d ./
# ln -s /var/log/httpd logs
# ln -s  /var/run run

-PIDファイルを変更確認
# grep ^Pid httpd.conf
PidFile run/httpd-2.2.24.pid

-ServerRootも変更確認
# grep ^ServerRoot conf/httpd.conf
ServerRoot "/opt/httpd/httpd-2.2.24"

PHP5.6

# yum install python-devel gd-devel libmcrypt-devel mysql-devel

# wget ftp://xmlsoft.org/libxml2/libxml2-2.9.2.tar.gz
# ./configure --prefix=/opt/libxml2-2.9.2

# wget http://nih.at/libzip/libzip-0.10.1.tar.gz
# ./configure --prefix=/opt/libzip-0.10.1


# wget http://jp2.php.net/get/php-5.6.13.tar.gz/from/this/mirror/ -O php-5.6.13.tar.gz
./configure  \
--with-apxs2=/opt/httpd/httpd-2.2.24/bin/apxs \
--with-libxml-dir=/opt/libxml2-2.9.2 \
--prefix=/opt/php-5.6.13 \
--with-zlib-dir=/usr  \
--with-mysql=/usr \
--with-libdir=lib64 \
--enable-mbstring \
--with-openssl \
--with-openssl-dir=/opt/openssl-1.0.2r \
--with-libzip=/opt/libzip-0.10.1 \
--with-pdo-mysql=shared \
--with-mysql-sock=/var/lib/mysql/mysql.sock \
--with-gd \
--with-gettext \
--with-curl=/opt/curl-7.58.0 \
--with-config-file-path=/opt/php-5.6.13/etc/ \
--with-config-file-scan-dir=/opt/php-5.6.13/etc/php.d \
--with-mcrypt

# wget https://pecl.php.net/get/zip-1.13.5.tgz
# /opt/php-5.6.13/bin/pear install zip-1.13.5.tgz


# cp /etc/php.ini /opt/php-5.6.13/etc/php.ini
# cp -rvf /etc/php.d /opt/php-5.6.13/etc/

CA証明書のパス確認

default_cert_fileに証明書を用意しておく。

# ln -s /etc/pki/tls/certs/ca-bundle.crt /opt/openssl-1.0.2r/ssl/cert.pem
# /opt/php-5.6.13/bin/php -r "print_r(openssl_get_cert_locations());"
Array
(
    [default_cert_file] => /opt/openssl-1.0.2r/ssl/cert.pem
    [default_cert_file_env] => SSL_CERT_FILE
    [default_cert_dir] => /opt/openssl-1.0.2r/ssl/certs
    [default_cert_dir_env] => SSL_CERT_DIR
    [default_private_dir] => /opt/openssl-1.0.2r/ssl/private
    [default_default_cert_area] => /opt/openssl-1.0.2r/ssl
    [ini_cafile] => 
    [ini_capath] => 
)
01_linux/02_www/32_centos_tls_apache_php.txt · 最終更新: 2019/11/05 12:19 by matsui

Yesterday:270 Today:198 Total:11392