cmd location: ~/
Download httpd
wget http://www-eu.apache.org/dist//httpd/httpd-2.4.25.tar.gz
tar -zxvf httpd-2.4.25.tar.gz
Download requirements
- Download
apr
wget http://www-eu.apache.org/dist//apr/apr-1.5.2.tar.gz
tar -zxvf apr-1.5.2.tar.gz
- Download
apr-util
wget http://www-eu.apache.org/dist//apr/apr-util-1.5.4.tar.gz
tar -zxvf apr-util-1.5.4.tar.gz
Make directories in httpd-2.4.25 ( call it as httpd_source_tree_root)
mkdir httpd_source_tree_root/srclib/apr
mkdir httpd_source_tree_root/srclib/apr-util
Move requirements' source to the srclib
directory
cp -r apr-1.5.2/* httpd_source_tree_root/srclib/apr
cp -r apr-util-1.5.4/* httpd_source_tree_root/srclib/apr-util
cmd location: httpd_source_tree_root
Compile
./configure --prefix=PREFIX # PREFIX 默认 /usr/local/apache2
make # build
make install # install
Check
All tools第一个就是ab
了
Q:我只是想安静的装个ab
,为啥装了这么多东西?貌似安装了个apache server
?!
A : ab
是 Apache Server 中的一个工具,我这么做只是想安装最新版本。
Q :那有没有简单点的方法来安装啊,我觉得完全没必要这样搞一坨一坨的!
A :这种问题的答案一般都是肯定的!CentOS下可以直接 yum install httpd-tools
;Ubuntu 下可以直接 apt-get install apache2-utils
Q :那这篇文章标题应该是 CentOS 下编译安装 Apache Server
吧!
A :我要去吃饭了。
网友评论