部署star-battle小游戏

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

------本页内容已结束,喜欢请分享------

感谢您的来访,获取更多精彩文章请收藏本站。

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片

    暂无评论内容