Kylin 自定义配置
针对新安装或新购买的 Kylin 系统,可参考如下步骤完成系统加固或前期规范操作。本文以 Kylin V10 为例
交付前期
1. 配置ip地址
cat /etc/sysconfig/network-scripts/ifcfg-ens160
ifdown ens160
ifup ens160
2. 替换为阿里云的yum源
注:麒麟 V10 对应 CentOS 7 兼容,阿里云源用 CentOS 7 即可
cat /etc/resolv.conf | grep nameserver | grep "223.5.5.5" || echo "nameserver 223.5.5.5" >> /etc/resolv.conf
mv /etc/yum.repos.d/CentOS-Base.repo /tmp/CentOS-Base.repo.$(date +%Y%m%d%H%M%S)
curl -sL http://mirrors.aliyun.com/repo/Centos-7.repo -o /etc/yum.repos.d/CentOS-Base.repo
yum makecache > /dev/null
3. 安装基础软件
yum install -y wget lrzsz telnet zip unzip net-tools make chrony
4. 设置DNS及时区及时间同步
#.设置时区为上海
timedatectl set-timezone "Asia/Shanghai"
timedatectl status | grep Time
#.配置ntp时间同步
yum install -y chrony
systemctl start chronyd
systemctl enable chronyd
chronyc -a makestep
date