码迷,mamicode.com
首页 > Web开发 > 详细

apache一键安装脚本

时间:2017-05-25 22:15:54      阅读:209      评论:0      收藏:0      [点我收藏+]

标签:apache一键安装脚本

vi installapache.sh

#!/bin/bash

tar -zxf apr-1.4.6.tar.gz

cd apr-1.4.6

./configure --prefix=/usr/local/apr &>/dev/null

make &>/dev/null

make install &>/dev/null

cd

tar -zxf apr-util-1.4.1.tar.gz

cd apr-util-1.4.1

./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/bin/apr-1-config &>/dev/null

make &>/dev/null

make install &>/dev/null

cd

tar -zxf pcre-8.30.tar.gz

cd pcre-8.30

./configure --prefix=/usr/local/pcre &>/dev/null

make &>/dev/null

make install &>/dev/null

cd

tar -zxf httpd-2.4.1.tar.gz

cd httpd-2.4.1

./configure --prefix=/usr/local/apache2 -enable-so -enable-rewrite --with-mpm=worker --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre &>dev/null

make &>/dev/null

make install &>/dev/null

cd

/usr/local/apache2/bin/apachectl start

:wq

netatat -tunlp | grep httpd 

有80端口即为成功

apache一键安装脚本

标签:apache一键安装脚本

原文地址:http://12372297.blog.51cto.com/12362297/1929525

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!