Centos 7 安装 部署环境 新机配置
- 关闭SELINUX 【这是一个 Linux 内核模块,也是个安全子系统】
1.输入命令 vim /etc/selinux/config 进入配置文件
2.将SELINUX的值设置为 disabled
vim /etc/security/limits.conf ,在最下方添加 一下内容
* soft nofile 102400
* hard nofile 102400
- yum 源配置,这里使用阿里的,如果是公司有内网私服,更换地址即可
cd /etc/yum.repos.d/ && mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
curl -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum makecache
202.112.10.36
s2c.time.edu.cn 北京邮电大学
yum install ntp -y
ntpdate -u 202.112.10.36
同步结果如下:
13 Jan 16:46:15 ntpdate[398]: adjust time server 202.112.10.36 offset -0.002473 sec
vim /etc/ntp.conf
添加 server 202.112.10.36 iburst
systemctl enable ntpd
systemctl start ntpd
ntpq -p
得到一下内容:
remote refid st t when poll reach delay offset jitter
==============================================================================
*gus.buptnet.edu 10.3.8.150 4 u 23 64 7 44.607 1.931 5.726
remote - 本机和上层ntp的ip或主机名,“+”表示优先,“*”表示次优先
refid - 参考上一层ntp主机地址
st - stratum阶层
when - 多少秒前曾经同步过时间
poll - 下次更新在多少秒后
reach - 已经向上层ntp服务器要求更新的次数
delay - 网络延迟
offset - 时间补偿
jitter - 系统时间与bios时间差
- 如果是由 EXSI 管理的服务器,安装 VMware Tools
先在EXSi点击安装
mount /dev/cdrom /mnt/
tar -zxvf /mnt/VMwareTools-10.2.0-7253323.tar.gz
cd vmware-tools-distrib/
echo 'yes' | ./vmware-install.pl
reboot