vi /etc/selinux/config
SELINUX=disabled
vi /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6 =1
net.ipv6.conf.default.disable_ipv6 =1
关闭图形化界面
systemctl set-default multi-user.target
reboot
临时开启图形化
startx
yum install epel-release -y
yum clean all
yum install epel-release -y
这是为了确认epel源最新
yum makecache fast
yum makecache
yum update -y
yum install -y gcc gcc-c++ glibc make automake autoconf zlib zlib-devel pcre-devel perl perl-Test-Simple openssl-devel pam-devel vim firewalld htop iftop nmap screen telnet tree cmake ntp lrzsz
echo -e "export.UTF-8" >> /etc/bashrc
timedatectl set-timezone Asia/Shanghai
systemctl enable ntpd
systemctl start ntpd
ntpdate -u ntp1.aliyun.com
systemctl restart ntpd
ntpq -p
ntpstat
crontab -e
0 8,12 * * * /usr/sbin/ntpdate ntp1.aliyun.com && /usr/sbin/clock -w >> /var/log/history/ntpdate.log
保存并退出。
使用crontab -l查看命令是否保存。
systemctl start crond
systemctl enable crond
0 8,12 * * * /home/youzi/date.sh >> /home/youzi/log/history/ntpdate.log
systemctl start firewalld
systemctl enable firewalld
systemctl stop firewalld
systemctl disable firewalld
firewall-cmd --set-default-zone=trusted
firewall-cmd --reload