Apacheのhttpdのソースインストールは4月のエラーを促し
1、ソースパッケージをダウンロードHTTPD
サイトの中国のCNドメイン名を選択します。
発見のhttpd:
2、バックwgetの名前を使用して、LinuxのCentOSのにとてもHTTPDアーカイブをダウンロードしてください:
[root@magedu ~]# wget https://mirrors.tuna.tsinghua.edu.cn/apache/httpd/httpd-2.4.38.tar.gz
--2019-07-21 13:16:50-- https://mirrors.tuna.tsinghua.edu.cn/apache/httpd/httpd-2.4.38.tar.gz
Resolving mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)... 101.6.8.193, 2402:f000:1:408:8100::1
Connecting to mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)|101.6.8.193|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 9187294 (8.8M) [application/x-gzip]
3、ダウンロードしたファイルを抽出。
[root@magedu ~]# tar zxvf httpd-2.4.38.tar.gz
httpd-2.4.38/
httpd-2.4.38/config.layout
httpd-2.4.38/configure.in
httpd-2.4.38/Makefile.win
httpd-2.4.38/configure
httpd-2.4.38/test/
httpd-2.4.38/test/test_parser.c
httpd-2.4.38/test/check_chunked
httpd-2.4.38/test/make_sni.sh
httpd-2.4.38/test/README
httpd-2.4.38/test/test-writev.c
httpd-2.4.38/test/test_limits.c
httpd-2.4.38/test/tcpdumpscii.txt
図4は、解凍前に、コンパイラおよび開発キットをインストールします。
` [root@magedu ~]# yum install gcc "Developent Tools"`
図5は、抽出のhttpdディレクトリに、ヘルプ表示の構成
[root@magedu ~]# cd httpd-2.4.38/
[root@magedu httpd-2.4.38]# ./configure --help
6、インストールして設定ファイルを使用して
[root@magedu httpd-2.4.38]# ./configure --prefix=/usr/local/httpd --sysconfdir=/etc/httpd
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
configure:
configure: Configuring Apache Portable(移植) Runtime library(运行库)...
configure:
checking for APR... no
configure: error: APR not found. Please read the documentation.(错误:APR没找到,请阅读文档)
ヒントエラー:
のconfigure:エラー:4月ドキュメントで読む。..してください見つからない(エラー:4月が見つからない、ドキュメントを読んでください)
プロンプトが、4月を見つけるインストールするにはyumをを使用しますが、インストールは注意を払う必要がありませんでした、あなたはどのソフトウェアをインストールするように指示され、通常、バックでのソフトウェアのdevelを追加するには、そのようなプロンプト4月などのソフトウェア開発ツールの欠如をインストールすることで、それは4月-develのをインストールする必要があります:
#yum install apr-devel
インストールが完了したら、その後は./configureは、
特別な注意は、別のディレクトリにこの期間を切り替えることはできません、ソフトウェアのインストールプロセス全体がこのルートディレクトリにインストールする必要があります。
[root@magedu httpd-2.4.38]# ./configure --prefix=/usr/local/httpd --sysconfdir=/etc/httpd
checking for APR-util... no
configure: error: APR-util not found. Please read the documentation.
これは、4月-utilの不足APR-utilのは、その後、開発版、すなわち4月-utilの-develのをインストールすることを示唆しました
root@magedu httpd-2.4.39]# yum install apr-util-devel
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
--> Processing Dependency: libdb-devel(x86-64) for package: apr-util-devel-1.5.2-6.el7.x86_64
--> Processing Dependency: libaprutil-1.so.0()(64bit) for package: apr-util-devel-1.5.2-6.el7.x86_64
--> Running transaction check
...
インストールが完了した後に./configure
[root@magedu httpd-2.4.38]# ./configure --prefix=/usr/local/httpd --sysconfdir=/etc/httpd
checking for pcre-config... false
configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
ヒントPCREのエラー、その後、PCREをインストールし、このPCREはPCRE-develのをインストールし、開発版をインストールする必要があります。
[ルート@ mageduのhttpd-2.4.39]#yumのPCRE-のdevel -yをインストール
インストールが完了した後に./configure
# ./configure --prefix=/usr/local/httpd --sysconfdir=/etc/httpd
checking for chosen layout... Apache
checking for working mkdir -p... yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
configure:
...
config.status: creating include/ap_config_auto.h
config.status: executing default commands
configure: summary of build options:
Server Version: 2.4.39
C compiler: gcc -std=gnu99
CFLAGS: -pthread
CPPFLAGS: -DLINUX -D_REENTRANT -D_GNU_SOURCE
LDFLAGS:
LIBS:
C preprocessor: gcc -E
最後に彼は、成功のためのエコー$チェックを使用して、成功しました?:
[root@magedu httpd-2.4.39]# echo $?
0
次に作ります
[root@magedu httpd-2.4.39]# make
Making all in srclib
make[1]: Entering directory `/soft/httpd-2.4.39/srclib'
make[1]: Leaving directory `/soft/httpd-2.4.39/srclib'
Making all in os
最後に:make installを[root@magedu httpd-2.4.39]#make install
7.完了したら、PATH変数の設定は、男のマニュアルが完了し、サービスを開始し、アドレスを着陸、テストページが登場、それはインストールが成功したことを意味します。