LoginSignup
4
6

More than 5 years have passed since last update.

CentOSへapacheをソースからインストール

Last updated at Posted at 2015-03-08

apacheのインストールから設定まで重要だと思った項目を備忘録としてメモ

環境構築

  • CentOS6.5
  • minimal インストール

apache インストール(ソースから)

make,gcc がインストールされているか確認

$ sudo yum list installed gcc make
Installed Packages
gcc.x86_64         4.4.7-4.el6          @base                                   
make.x86_64        1:3.81-20.el6        @anaconda-CentOS-201311272149.x86_64/6.5

インストールされていなければ以下でインストール
$ sudo yum -y install gcc make

apr(apache portable runtime)ライブラリをダウンロード
これがないと./configure時にエラーになってしまう。

$ wget http://ftp.yz.yamagata-u.ac.jp/pub/network/apache//apr/apr-1.5.1.tar.gz
$ tar xvzf apr-1.5.1.tar.gz
$ wget http://ftp.yz.yamagata-u.ac.jp/pub/network/apache//apr/apr-util-1.5.4.tar.gz
$ tar xvzf apr-util-1.5.4.tar.gz

PERL 5 regular expression pattern matching インストール
こちらもコンパイルに使用

$ wget wget http://sourceforge.net/projects/pcre/files/pcre/8.36/pcre-8.36.tar.gz/download
$ tar xvzf pcre-8.31.tar.gz
$ cd pcre-8.31
$ ./configure
$ make
$ sudo make install

ソースファイルダウンロード => 解凍 => ライブラリファイル配置 => コンパイル => インストール

$ wget http://ftp.riken.jp/net/apache//httpd/httpd-2.4.12.tar.gz
$ tar xvzf httpd-2.4.12.tar.gz
$ mv apr-1.5.1 ./httpd-2.4.12/srclib/
$ mv apr-util-1.5.4 ./httpd-2.4.12/srclib/
$ cd ./httpd-2.4.12/srclib/
$ mv apr-1.5.1 apr
$ mv apr-util-1.5.4 apr-util
$ cd ../
$ ./configure --prefix=/usr/local/httpd
$ make
$ sudo make install

ここから先、起動と設定ファイルに関しては、後日追記予定

4
6
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
4
6