linux离线安装httpd服务,Linux系列之离线安装Apache HTTP

1.  安装准备

1.1  下载介质

链接: https://pan.baidu.com/s/1R1iaKfHbeLUQuJcGn9kNrA 密码: iceg

1.2  上传介质

scp -r /opt/tools/httpd 192.168.233.130:/opt/tools/httpd

2.  安装HTTP

2.1  编译安装apr

cd /opt/tools/httpd

tar -zxvf apr-1.5.2.tar.gz -C ./

cd ./apr-1.5.2

./configure --prefix=/usr/local/httpd/apr

make

make install

2.2  编译安装apr-util

cd /opt/tools/httpd

tar -zxvf apr-util-1.5.4.tar.gz -C ./

cd ./apr-util-1.5.4

./configure --prefix=/usr/local/httpd/apr-util --with-apr=/usr/local/httpd/apr/bin/apr-1-config

make

make install

2.3  编译安装pcre

cd /opt/tools/httpd

tar -zxvf pcre-8.42.tar.gz -C ./

cd ./pcre-8.42

./configure --prefix=/usr/local/httpd/pcre --with-apr=/usr/local/httpd/apr/bin/apr-1-config

make

make install

2.4  编译安装httpd

cd /opt/tools/httpd

tar -zxvf httpd-2.4.34.tar.gz -C ./

cd ./httpd-2.4.34

./configure --prefix=/usr/local/httpd/apache2 --with-apr=/usr/local/httpd/apr/bin/apr-1-config --with-apr-util=/usr/local/httpd/apr-util/bin/apu-1-config --with-pcre=/usr/local/httpd/pcre/bin/pcre-config --enable-dav --enable-so

make

make install

2.5 修改httpd配置

# vim /usr/local/httpd/apache2/conf/httpd.conf

ServerName 192.168.233.130:80

3.  启动HTTP

3.1  将apachectl加入service系统服务

cp /usr/local/httpd/apache2/bin/apachectl /etc/rc.d/init.d/apache

chkconfig --add apache

3.2  启动apache服务

service apache start

3.3  验证启动

ps -ef | grep http

netstat -an | grep :80

3.4 WEB UI验证

http://192.168.233.130

3.5  配置HTTP环境变量

# vim /etc/profile

# HTTP_HOME

export HTTP_HOME=/usr/local/httpd/apache2

export PATH=$PATH:$HTTP_HOME/bin

3.6 验证HTTP环境

source /etc/profile

httpd -v

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值