CentOS7 Apache安装踩坑

Gnome桌面右键弹出终端。

root@localhost \~# yum repolist

已加载插件:fastestmirror, langpacks

/var/run/yum.pid 已被锁定,PID 为 2611 的另一个程序正在运行。

Another app is currently holding the yum lock; waiting for it to exit...

root@localhost \~# yum makecache

已加载插件:fastestmirror, langpacks

Loading mirror speeds from cached hostfile

Could not retrieve mirrorlist http://mirrorlist.centos.org/?

Cannot find a valid baseurl for repo: base/7/x86_64

root@localhost \~# sudo nano /etc/yum.repos.d/CentOS-Base.repo

修改镜像站点为aliyun服务器写入,保存

root@localhost \~# yum makecache

已加载插件:fastestmirror, langpacks

Loading mirror speeds from cached hostfile

元数据缓存已建立

root@localhost \~# yum install httpd

重启

root@localhost \~# systemctl start httpd.service

root@localhost \~# systemctl status httpd.service 查看状态

● httpd.service - The Apache HTTP Server

Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)

root@localhost \~# ifconfig 查看ip地址

ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500

inet 192.168.159.129 netmask 255.255.255.0 broadcast 192.168.159.255

inet6 fe80::2c10:185e:e5c4:821f prefixlen 64 scopeid 0x20<link>

ether 00:0c:29:15:0c:28 txqueuelen 1000 (Ethernet)

RX packets 46624 bytes 69433792 (66.2 MiB)

RX errors 0 dropped 0 overruns 0 frame 0

TX packets 7699 bytes 475065 (463.9 KiB)

TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

相关推荐
一路向北finish1 天前
《CentOS 7 搭建 Hadoop 3.3.6 分布式集群:NFS 共享方案完整实操》
linux·运维·hadoop·分布式·centos
海兰3 天前
【 Kafka进阶5】使用 Docker 部署 Apache Kafka 集群完全指南
docker·kafka·apache
垂钓的小鱼13 天前
用关联图谱做量化选股:让基本面惊喜沿着网络扩散
服务器·php·apache
深维AI随笔3 天前
《构建之法》| 第二章个人技术和流程:单元测试不是“可选“,而是“必需“
单元测试·log4j·apache
极客灵风3 天前
免费约课小程序免费约课系统的区别,一文看懂怎么选
apache
xixiaoyunya3 天前
中小微企业轻量组网方案的技术选型与实践:从传统专线到软定义隧道的成本与效能分析
服务器·php·apache
SelectDB技术团队4 天前
四川航空湖仓一体:基于 SelectDB / Apache Doris 的多源数据联邦分析实践
apache
海兰4 天前
【Kafka进阶4】KRaft 完全指南:Apache Kafka 摆脱 ZooKeeper 的架构
zookeeper·kafka·apache
2601_967019514 天前
如何选择合适的SSL证书类型?
apache