Apache2.4/今の作り方
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
]
開始行:
**今の作り方 [#s7acccf8]
#contents
----
***本体 [#f3fb8a0a]
暫定。~
~
PHPがOpenSSL1.1.1系にまだ対応していないようでビルド時にこ...
当方ではRPM版OpenSSLとの分離としてOpenSSL1.1.1系は従来通...
OpenSSL1.1.1系をデフォルトでインストールする場合は ~
LDFLAGS="-L/usr/local/lib64" ~
を指定する。
APR/APUが入ってないので別途落とし、httpdソースのsrclibへ...
今のところ必要なモジュール類が定まらないので暫定的に全部...
cp apr-1.6.x.tar.gz httpd-2.4.x/srclib
cp apr-util-1.6.x.tar.gz httpd-2.4.x/srclib
cd httpd-2.4.x/srclib
tar zxf apr-1.6.x.tar.gz
tar zxf apr-util-1.6.x.tar.gz
mv apr-1.6.x apr
mv apr-util-1.6.x apr-util
./configure --enable-http2 \
--with-nghttp2=/usr/local \
--enable-brotli \
--with-brotli=/usr/local \
--enable-pie \
--enable-modules=all \
--with-ssl=/usr/local/ssl \
--with-included-apr \
--enable-mpms-shared=all \
--enable-threads \
--with-openssl=/usr/local/ssl \
--with-crypto
--with-included-aprで展開したAPR/APUを使用する。
--enable-threads はAPR用オプション。
--with-openssl=/usr/local/ssl 以下はAPU用オプション。
--with-openssl=/usr/local/ssl と --with-crypto は
--enable-session-crypto に必要で、1セットで指定し
WARNING: Your APR does not include SSL/EVP support.
を回避する。
----
***systemd対応 [#z8d00f6b]
Apache2.5から対応のようで、現状別途ビルドする必要がある。
yum -y install systemd-devel
cd /usr/local/src/httpd-2.4.x/modules/arch/unix
wget https://raw.githubusercontent.com/apache/httpd/trun...
libtool \
--silent \
--mode=compile gcc -std=gnu99 -prefer-pic -O2 -g -pipe -...
--param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mt...
-pthread -I/usr/local/apache2/include -I/usr/local/apr/i...
libtool \
--silent \
--mode=link gcc -std=gnu99 -Wl,-z,relro,-z,now,-L/usr/li...
libtool \
--silent \
--mode=link gcc -std=gnu99 -Wl,-z,relro,-z,now,-L/usr/li...
/usr/local/apache2/bin/apxs -i -a -n systemd mod_systemd...
----
***サービス登録 [#y66eb2b0]
cat <<EOT > /etc/systemd/system/httpd2.service
[Unit]
Description=The Apache HTTP Server Source Build
After=network.target remote-fs.target nss-lookup.target
Documentation=man:httpd(8)
Documentation=man:apachectl(8)
[Service]
Type=notify
PIDFile=/usr/local/apache2/logs/httpd.pid
ExecStart=/usr/local/apache2/bin/httpd -DFOREGROUND
ExecReload=/usr/local/apache2/bin/httpd -k graceful
ExecStop=/bin/kill -WINCH \$\{MAINPID\}
KillSignal=SIGCONT
PrivateTmp=true
[Install]
WantedBy=multi-user.target
EOT
/usr/bin/systemctl daemon-reload
/usr/bin/systemctl enable httpd2
終了行:
**今の作り方 [#s7acccf8]
#contents
----
***本体 [#f3fb8a0a]
暫定。~
~
PHPがOpenSSL1.1.1系にまだ対応していないようでビルド時にこ...
当方ではRPM版OpenSSLとの分離としてOpenSSL1.1.1系は従来通...
OpenSSL1.1.1系をデフォルトでインストールする場合は ~
LDFLAGS="-L/usr/local/lib64" ~
を指定する。
APR/APUが入ってないので別途落とし、httpdソースのsrclibへ...
今のところ必要なモジュール類が定まらないので暫定的に全部...
cp apr-1.6.x.tar.gz httpd-2.4.x/srclib
cp apr-util-1.6.x.tar.gz httpd-2.4.x/srclib
cd httpd-2.4.x/srclib
tar zxf apr-1.6.x.tar.gz
tar zxf apr-util-1.6.x.tar.gz
mv apr-1.6.x apr
mv apr-util-1.6.x apr-util
./configure --enable-http2 \
--with-nghttp2=/usr/local \
--enable-brotli \
--with-brotli=/usr/local \
--enable-pie \
--enable-modules=all \
--with-ssl=/usr/local/ssl \
--with-included-apr \
--enable-mpms-shared=all \
--enable-threads \
--with-openssl=/usr/local/ssl \
--with-crypto
--with-included-aprで展開したAPR/APUを使用する。
--enable-threads はAPR用オプション。
--with-openssl=/usr/local/ssl 以下はAPU用オプション。
--with-openssl=/usr/local/ssl と --with-crypto は
--enable-session-crypto に必要で、1セットで指定し
WARNING: Your APR does not include SSL/EVP support.
を回避する。
----
***systemd対応 [#z8d00f6b]
Apache2.5から対応のようで、現状別途ビルドする必要がある。
yum -y install systemd-devel
cd /usr/local/src/httpd-2.4.x/modules/arch/unix
wget https://raw.githubusercontent.com/apache/httpd/trun...
libtool \
--silent \
--mode=compile gcc -std=gnu99 -prefer-pic -O2 -g -pipe -...
--param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mt...
-pthread -I/usr/local/apache2/include -I/usr/local/apr/i...
libtool \
--silent \
--mode=link gcc -std=gnu99 -Wl,-z,relro,-z,now,-L/usr/li...
libtool \
--silent \
--mode=link gcc -std=gnu99 -Wl,-z,relro,-z,now,-L/usr/li...
/usr/local/apache2/bin/apxs -i -a -n systemd mod_systemd...
----
***サービス登録 [#y66eb2b0]
cat <<EOT > /etc/systemd/system/httpd2.service
[Unit]
Description=The Apache HTTP Server Source Build
After=network.target remote-fs.target nss-lookup.target
Documentation=man:httpd(8)
Documentation=man:apachectl(8)
[Service]
Type=notify
PIDFile=/usr/local/apache2/logs/httpd.pid
ExecStart=/usr/local/apache2/bin/httpd -DFOREGROUND
ExecReload=/usr/local/apache2/bin/httpd -k graceful
ExecStop=/bin/kill -WINCH \$\{MAINPID\}
KillSignal=SIGCONT
PrivateTmp=true
[Install]
WantedBy=multi-user.target
EOT
/usr/bin/systemctl daemon-reload
/usr/bin/systemctl enable httpd2
ページ名: