一些可修改的系统设置
# 支持Root登录
# 编辑文件
sudo /etc/ssh/sshd_config
# 修改
#PermitRootLogin prohibit-password
PermitRootLogin yes
# 重启ssh
sudo service ssh restart
# 换源
# centos8
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-vault-8.5.2111.repo
yum clean all && yum makecache
# centos7
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
curl -o /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo
yum clean all && yum makecache
# CentOS同步时间
首先保证机器的网络正常
安装ntp工具
yum -y install ntp
同步时间
/usr/sbin/ntpdate -u cn.pool.ntp.org
写入硬件时间:
hwclock -w
上次更新: 2024/11/05, 08:29:31