Tomcat

Linux_213_apache安装启动讲解

2022-08-09  本文已影响0人  为宇绸缪

linux安装软件的方式

安装流程
1、配置好yum源,推荐直接使用阿里云的yum源
配置yum源过程
https://developer.aliyun.com/mirror

2、通过命令,直接下载阿里云的yum源文件

3、清空yum缓存,针对阿里云的yum源生成新的缓存,用于加速软件下载
yum clean all
yum makecache

4、通过命令直接安装apache(linux的软件包httpd)
yum install httpd -y

5、检查linux是否启动了80端口
netstat -tunlp | grep "80"
查看80端口,没有结果则表示没人在用80端口

6、启动httpd服务,启动阿帕奇,配置阿帕奇开机自启
systemctl start httpd
systemctl status httpd
systemctl enable httpd # 开机自启
systemctl disable httpd # 禁止开机自启

输入本机的网址即可访问apache页面

7、检查阿帕奇进程是否存在
ps -ef | grep httpd
ps -ef | grep httpd | grep -v 'grep'

使用curl 127.0.0.1 可以访问前端html文件

apache安装结果.jpg
上一篇 下一篇

猜你喜欢

热点阅读