プログラムがインストールされるまで。
./configure → make → make install


configureスクリプトの役割
○環境のチェックを(ライブラリ、パス等)行い、Makefileを作成する。
○一般的には config.hのような、ファイルを生成する。
○実際には、内部でライブラリをコンパイルを行っている。
オプション
 -prefix
インストールするディレクトリを指定できる。
root権限がなくてもソフトをインストールできる場合がある。
モジュールを別途組み込む事ができる。


makeの役割
○make する事で必要なファイルを生成する。
多くの場合 C or C++ のコンパイラを使う。 (後述のGCC これがないと、./configureの時点でエラーが吐き出される。)
Makefileはmakeの手順書である。
makeはMakefileを見ながら、ファイルを作成している。
make check
make test
バイナリが正しく動くかのチェック。ソフトによって、 make check or make test をINSTALLファイルを見て選ぶ。


make install
すでに出来上がっている、バイナリファイルを目的の場所に必要なファイルのみインストールする。

通常は、インストール前に " -n "オプションを使いテストする。
例 make -n install


流れ
wgetコマンドを使って   http://ftp.riken.jp/net/apache/httpd/httpd-2.4.43.tar.gzをダウンロード
tarコマンドを使って、  httpd-2.4.43.tar.gzを展開
例:
# tar -zxvf httpd-2.4.43.tar.gz
# cd httpd-2.4.43 ディレクトリ内へ
# ./configure makefile作成


APRが無いとエラー

aprをダウンロードして 展開する
http://ftp.yz.yamagata-u.ac.jp/pub/network/apache//apr/apr-1.7.0.tar.gz

# cd apr-1.7.0
# ./configure
# make
# make install

インストールが終了したら 再びapacheディレクトリへ移動

#./configure
checking for APR-util... no
configure: error: APR-util not found. Please read the documentation.
エラー 
apr-utilがない。

http://ftp.yz.yamagata-u.ac.jp/pub/network/apache//apr/apr-util-1.6.1.tar.gz
ダウンロードして展開
./configure →make → make install

しかし、エラー

checking for APR... no
configure: error: APR could not be located. Please use the --with-apr option.


aprの場所をしていして再度、./configure

しかし
致命的エラー: expat.h: そのようなファイルやディレクトリはありません


yum でインストール
# yum -y install expat-devel

再度 
# ./configure --with-apr=/root/apr-1.7.0
# make
# make install

cd ..
apacheのディレクトリに移動
# ./configure
エラー
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

pcreをyumでインストール、しかし最新になっている。
pcre-devel をyumでインストール


# ./configure
# make
# make install

# /usr/local/apache2/bin/apachectl start ←apache start

アクセスできない場合 ファイヤーウォール停止
# systemctl stop firewalld