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\