1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

RHEL 8.5にOSS版httpd 2.4.52をインストールする

Last updated at Posted at 2022-03-13

概要

RHEL8 AppStreamのhttpdに未修正の脆弱性が存在するため
今回はソースからhttpdのOSS最新版をインストールした

前提

  • RHEL 8.5
  • httpd 2.4.52

必要パッケージのインストール

sudo dnf module install perl
sudo dnf install gcc gcc-c++ wget bison flex
sudo dnf install ncurses-devel libaio libaio-devel expat-devel  pcre-devel openssl-devel

aprのインストール

sudo mkdir /usr/src/apr
cd /usr/src/apr
sudo wget https://dlcdn.apache.org//apr/apr-1.7.0.tar.gz
sudo tar zxvf apr-1.7.0.tar.gz
sudo vi ./configure

以下を修正

- $RM "$cfgfile"
+ $RM -f "$cfgfile"

その後

sudo ./configure --prefix=/usr/local/lib/apr-1.7.0
make
make install

apr-utilのインストール

sudo mkdir /usr/src/apr-util
cd /usr/src/apr-util
sudo wget https://dlcdn.apache.org//apr/apr-util-1.6.1.tar.gz
sudo tar zxvf apr-util-1.6.1.tar.gz
sudo ./configure --prefix=/usr/local/lib/apr-util-1.6.1 --with-apr=/usr/local/lib/apr-1.7.0
make
make install

httpdのインストール

ソースダウンロード & 展開

sudo mkdir /usr/src/httpd
cd /usr/src/httpd
sudo wget https://dlcdn.apache.org//httpd/httpd-2.4.52.tar.gz
sudo tar zxvf httpd-2.4.52.tar.gz

AppStreamのhttpdのsrpmから取得した設定をもとにconfigure実行

sudo ./configure \
        --prefix=/etc/httpd \
        --exec-prefix=/usr \
        --bindir=/usr/bin \
        --sbindir=/usr/sbin \
        --mandir=/usr/share/man \
        --libdir=/usr/lib64 \
        --sysconfdir=/etc/httpd/conf \
        --includedir=/usr/include/httpd \
        --libexecdir=/usr/lib64/httpd/modules \
        --datadir=/usr/share/httpd \
        --enable-layout=Fedora \
        --with-installbuilddir=/usr/lib64/httpd/build \
        --enable-mpms-shared=all \
        --with-apr=/usr/local/lib/apr-1.7.0 --with-apr-util=/usr/local/lib/apr-util-1.6.1 \
        --enable-suexec --with-suexec \
        --enable-suexec-capabilities \
        --with-suexec-caller=apache \
        --with-suexec-docroot=/var/www \
        --without-suexec-logfile \
        --with-suexec-syslog \
        --with-suexec-bin=/usr/sbin/suexec \
        --with-suexec-uidmin=1000 --with-suexec-gidmin=1000 \
        --with-brotli \
        --enable-pie \
        --with-pcre \
        --enable-mods-shared=all \
        --enable-ssl --with-ssl --disable-distcache \
        --enable-proxy --enable-proxy-fdpass \
        --enable-cache \
        --enable-disk-cache \
        --enable-cgid --enable-cgi \
        --enable-cgid-fdpassing \
        --enable-authn-anon --enable-authn-alias \
        --disable-imagemap --disable-file-cache \
        --disable-http2 \
        --disable-md

(差分は以下)
この設定があるためconfigureが完了しなかった&利用しないため無効化した

- --enable-ldap --enable-authnz-ldap \

インストール実行

sudo make
sudo make install

RHEL 8.5にOSS版httpd 2.4.52をインストールする(2)

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?