Apache Web Server

httpd 2.4.25 on Centos 7.2 설치

L’Etranger 2021. 1. 6. 16:08

$ su -

$ yum install gcc gcc-c++

 

$ mkdir -p /tmp/install_apache
$ cd /tmp/install_apache
$ wget https://archive.apache.org/dist/apr/apr-1.5.2.tar.gz
$ tar zxvf apr-1.5.2.tar.gz
$ cd apr-1.5.2

 

// compile
$ ./configure --prefix=/usr/local/apr
$ make
$ make install

 

// download
$ mkdir -p /tmp/install_apache
$ cd /tmp/install_apache
$ wget https://archive.apache.org/dist/apr/apr-util-1.5.4.tar.gz
$ tar zxvf apr-util-1.5.4.tar.gz
$ cd apr-util-1.5.4

 

// compile
$ ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr    

$ make
$ make install

// download
$ mkdir -p /tmp/install_apache
$ cd /tmp/install_apache
$ wget https://ftp.pcre.org/pub/pcre/pcre-8.38.tar.gz
$ tar zxvf pcre-8.38.tar.gz
$ cd pcre-8.38

 

// compile
$ ./configure --prefix=/usr/local/pcre
$ make
$ make install

// download
$ mkdir -p /tmp/install_apache
$ cd /tmp/install_apache
$ wget https://www.openssl.org/source/openssl-1.0.2l.tar.gz
$ tar zxvf openssl-1.0.2l.tar.gz
$ cd openssl-1.0.2l

 

// compile
$ ./config -fPIC --prefix=/usr/local/ssl
$ make depend
$ make
$ make install

 

// download
$ mkdir -p /tmp/install_apache
$ cd /tmp/install_apache
$ wget https://github.com/nghttp2/nghttp2/releases/download/v1.23.1/nghttp2-1.23.1.tar.gz
$ tar xfz nghttp2-1.23.1.tar.gz
$ cd nghttp2-1.23.1

 

// compile
$ export LDFLAGS="-I/usr/local/ssl/include"
$ export OPENSSL_CFLAGS="-I/usr/local/ssl/include"
$ export OPENSSL_LIBS="-L/usr/local/ssl -lssl -lcrypto"
$ ./configure --prefix=/usr/local/nghttp2
$ make
$ make install

 

// download
$ mkdir -p /tmp/install_apache
$ cd /tmp/install_apache
$ wget http://archive.apache.org/dist/httpd/httpd-2.4.25.tar.gz
$ tar xfz httpd-2.4.25.tar.gz
$ cd httpd-2.4.25

 

// compile
$ ./configure \
--prefix=/usr/local/httpd \
--enable-unique-id --enable-so --enable-proxy --enable-mods-shared=all \
--with-mpm=worker --enable-mpms-shared=all \
--with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util \
--with-pcre=/usr/local/pcre \
--with-ssl=/usr/local/ssl --enable-ssl \
--with-nghttp2=/usr/local/nghttp2 --enable-http2 --enable-proxy-http2
$ make
$ make install