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

相关推荐
拉不拉斯3 小时前
vsCode远程连接Centos 7出现的错误以及解决办法
ide·vscode·centos
く成哦15 小时前
部署Apache Gravitino项目及使用教程
jupyter·docker-compose·apache·trino·playground·gravitino
杰建云16720 小时前
商家小程序有什么用
大数据·apache
小夏子_riotous1 天前
Kubernetes学习路径——3. Kubernetes 1.25 高可用集群部署实战:从 Docker 到 Calico 全链路详解
linux·运维·学习·docker·容器·kubernetes·centos
盈建云系统1 天前
小程序表单提交、input 双向绑定,最简洁写法
前端·小程序·apache
Haibakeji1 天前
AI如何串联官网小程序APP多端用户体验
大数据·apache
weixin_457507211 天前
centos安装docker配置自动HTTPS部署多个项目
docker·https·centos
淼淼爱喝水1 天前
Ansible 中 handler 与 notify 的作用与使用详解
linux·网络·apache·playbook
小周技术驿站1 天前
Linux 基础命令详解
linux·前端·chrome·ubuntu·centos
Zhu7581 天前
软件更新-openssh和openssl-centos
linux·运维·centos