install_httpd

简介:

1、安装apr

1
2
3
4
5
yum -y  install  gcc gcc-c++ openssl-devel pcre-devel
tar   xf  apr-1.4.6. tar .bz2
cd  apr-1.4.6
. /configure  --prefix= /usr/local/apr  --disable-ipv6
make  &&  make  install

2、安装apr-util

1
2
3
4
tar  xf apr-util-1.4.1. tar .bz2
cd  apr-util-1.4.1
. /configure   --prefix= /usr/local/apr-util   --with-apr= /usr/local/apr
make  &&  make  install

3、安装apache

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
tar  zxf httpd-2.4.17. tar .gz 
cd  httpd-2.4.17
  . /configure  \
. /configure  \
--prefix= /usr/local/apache  \
--sysconfdir= /etc/httpd  \
-- enable -so \
-- enable -ssl \
-- enable -cgi \
-- enable -rewrite \
--with-zlib \
--with-pcre \
--with-apr= /usr/local/apr  \
--with-apr-util= /usr/local/apr-util  \
-- enable -modules=most \
-- enable -mods-shared=most \
-- enable -mpms-shared=all \
--with-mpm=event
make  &&  make  install

4、设置服务控制脚本

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
cp  build /rpm/httpd .init  /etc/init .d /httpd
vim  /etc/init .d /httpd
     httpd=${HTTPD- /usr/local/apache/bin/httpd }
     pidfile=${PIDFILE- /usr/local/apache/logs/ ${prog}.pid}
     lockfile=${LOCKFILE- /var/lock/subsys/ ${prog}}
     RETVAL=0
     # check for 1.3 configuration
     check13 () {
         CONFFILE= /etc/httpd/httpd .conf
echo  "PATH=/usr/local/apache/bin:$PATH"  >>  /etc/profile .d /http .sh
/etc/profile .d /http .sh
ln  -s  /usr/local/apache/include/  /usr/include/httpd
vim  /etc/httpd/httpd .conf
     ServerName localhost:80
chkconfig --add httpd
chkconfig httpd on
service httpd start


 本文转自1321385590 51CTO博客,原文链接:http://blog.51cto.com/linux10000/1717541,如需转载请自行联系原作者





目录
打赏
0
0
0
0
348
分享
相关文章
一键编译安装Httpd-2.4.53
【4月更文挑战第30天】
111 1
How to Install and Configure Zabbix on Ubuntu 16.04
In this tutorial, we will go through step by step installation of Zabbix server and Zabbix client on Ubuntu 16.04 server.
3191 0
httpd 的坑
Httpd服务器的坑 在/etc/httpd/conf/httpd.conf中的配置信息, 有时注释到的内容仍然会生效 配置Auth时, 允许htpasswd规定的文件中的所有的用户, Require valid-uesr, 允许特定的用户Require user user1 user2 user3 .
963 0