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端口即为成功

更多关于云服务器域名注册虚拟主机的问题,请访问西部数码官网:www.west.cn

赞(0)
声明:本网站发布的内容(图片、视频和文字)以原创、转载和分享网络内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-62778877-8306;邮箱:fanjiao@west.cn。本站原创内容未经允许不得转载,或转载时需注明出处:西部数码知识库 » apache一键安装脚本

登录

找回密码

注册