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\ 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\ 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

相关推荐
一位摩羯座DBA7 小时前
Redhat&Centos挂载镜像
linux·运维·centos
学习3人组7 小时前
CentOS配置网络
linux·网络·centos
即将头秃的程序媛14 小时前
centos 7.9安装tomcat,并实现开机自启
linux·运维·centos
chanalbert19 小时前
CentOS系统新手指导手册
linux·运维·centos
Fireworkitte1 天前
Apache POI 详解 - Java 操作 Excel/Word/PPT
java·apache·excel
蚂蚁数据AntData1 天前
从性能优化赛到社区Committer,走进赵宇捷在Apache Fory的成长之路
大数据·开源·apache·数据库架构
小湘西2 天前
Apache HttpClient 的请求模型和 I/O 类型
java·http·apache
小张不嚣张꒰ঌ(˚ᆺ˚)໒꒱2 天前
Centos7在yum当中遇到Could not resolve host: mirrorlist.centos.org解决方案
linux·运维·服务器·centos
Sally璐璐2 天前
CentOS企业级文件服务器终极部署指南
linux·服务器·centos
岁月玲珑2 天前
【如何判断Linux系统是Ubuntu还是CentOS】
linux·ubuntu·centos