centos配置阿里云yum源
1.检查网络是否可以连接阿里镜像
ping mirrors.aliyun.com
rm -f /etc/yum.repos.d/* #删除原yum源
wget或curl -o /etc/yum,.repsos/.d/CentoS-Base.repo http://mirrors.liyun.com/repo/Centos-7.repo
修改相关配置
sed -i -e ‘/mirrors.cloud.aliyuncs.com/d’ -e ‘/mirrors.aliyuncs.com/d’ /etc/yum.repos.d/CentOS-Base.repo
清除并生成缓存
yum clean all && yum makecache
2.yum repolist enabled
检查yun仓库状态,确保各镜像正常
安装apache
yum install httpd -y
启动并设置开机自启
systemctl start httpd && systemctl enable httpd
常见问题:httpd package can be installed from default CentOS repositories, ‘base’ and ‘updates’ (for a newer version).
国内各大源把httpd移除了,
# repoquery -i httpd | grep -i repo
Repository : updates
Make sure that you have repository file /etc/yum.repos.d/CentOS-Base.repo or create it
yum –disableexcludes=all install -y httpd
3.systemctl status httpd
sed -i ‘s/SELINUX=enforcing/SELINUX=disabled/’ /etc/selinux/config
setenforce 0
systemctl stop firewalld && systemctl enable firewalld
4.进入网页根目录
cd /var/www/html
拉取小游戏源码
查看小游戏项目源码
tree -L 2 star-battle
setenforce: SELinux is disabled
vi /etc/selinux/config
更改为:SELINUX=1
重启linux,不重启是没办法立刻开启selinux
shutdown -r now或 reboot
感谢您的来访,获取更多精彩文章请收藏本站。
1. 资源都是经过站长或作者收集测试修改后发布分享。转载请在文内以超链形式注明出处,谢谢合作!
2. 本站除原创内容,其余所有内容均收集自互联网,仅限用于学习和研究目的,本站不对其内容的合法性承担任何责任。如有版权内容,请通知我们或作者删除,其版权均归原作者所有,本站虽力求保存原有版权信息,但因众多资源经多次转载,已无法确定其真实来源,或已将原有信息丢失,所以敬请原作者谅解!
3. 本站用户所发布的一切资源内容不代表本站立场,并不代表本站赞同其观点和对其真实性负责,若您对本站所载资源作品版权归属存有异议,请留言附说明联系邮箱,我们将在第一时间予以处理 ,同时向您表示歉意!为尊重作者版权,请购买原版作品,支持您喜欢的作者,谢谢!
4. 本站一律禁止以任何方式发布或转载任何违法的相关信息,访客如有发现请立即向站长举报;本站资源文件大多存储在云盘,如发现链接或图片失效,请联系作者或站长及时更新。


测试-晴天生活分享日志">
彩虹易支付使用教程-晴天生活分享日志">



暂无评论内容