作为ubuntu的忠实粉丝,第一次用centos不得不说感觉到了许多麻烦,但是我的新服务器采用了centos7.6的系统,所以这里记录一下我的服务器配置过程吧
修改yum源到国内
备份yum base源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo_bak
然后下载阿里云的的yum配置文件
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
最后清除缓存与重建缓存即可
yum clean all && yum makecache
安装中文字符集
输入locale命令可查看当前系统的字符集,然后安装中文字符集
yum install kde-l10n-Chinese
安装完毕后我们需要修改/etc/locale.conf
文件,把编码改为zh_cn.UTF-8
vim /etc/locale.conf #LANG="en_US.UTF-8" LANG="zh_CN.UTF-8"
我们把原本的英文编码使用#注释掉,然后添加上中文编码保存重启即可
关闭防火墙
在我的服务器中打开了防火墙导致网站后台与游戏服务器都无法访问,这里我直接关闭了防火墙
systemctl start firewalld #启动 systemctl stop firewalld #停止 systemctl status firewalld #查看状态 systemctl disable firewalld #禁用
文章评论