在GCE上安装Apache、tomcat等

本文详细介绍了如何在CentOS7上安装Apache2.2.3版本,并提供了具体的步骤,包括安装依赖、编译配置及启动服务等。安装完成后,可以通过浏览器访问外部IP来验证安装是否成功。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.安装Apache2.2.3

(虚机的操作系统是CentOS7)

 1 sudo yum install wget -y
 2 cd /opt
 3 sudo wget http://archive.apache.org/dist/httpd/httpd-2.2.3.tar.gz
 4 sudo gzip -d httpd-*.tar.gz
 5 sudo tar xvf httpd-*.tar
 6 cd httpd-*
 7 
 8 sudo yum install gcc gcc-c++ -y
 9 
10 sudo ./configure --with-mpm=worker --prefix=/opt/httpd --enable-proxy --enable-proxy-http --enable-proxy-ajp
11 sudo make && sudo make install

验证安装

1 cd /opt/httpd
2 bin/httpd -v

 启动服务

1 cd /opt/httpd
2 bin/apachectl start

验证服务已启动

ps aux | grep httpd

浏览器中使用外部IP就可以访问页面。It works!

 

转载于:https://www.cnblogs.com/niaomingjian/p/6337513.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值