1、设置时区
rm -f /etc/localtime cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
2、配置内网IP (如果是外网IP,linux要修改远程端口)
3、配置自己的yum源
yum install wget rm -f /etc/yum.repos.d/* wget -P /etc/yum.repos.d/ http://mirrors.163.com/.help/CentOS7-Base-163.repo wget -P /etc/yum.repos.d/ https://mirrors.aliyun.com/repo/epel-7.repo
如何需要最新版本的rpm包,请安装下面的仓库
rpm -Uvh http://repo.webtatic.com/yum/el7/epel-release.rpm rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
4、关闭SELinux
sed -i 's#SELINUX=enforcing#SELINUX=disabled#g' /etc/selinux/config setenforce 0
5、添加zabbix监控
6、配置防火墙
systemctl stop firewalld.service systemctl disable firewalld.service
7、安装软件包
yum install -y vim openssh-clients ntpdate man lrzsz net-tools
8、时间同步任务
echo "10 6 * * * root (/usr/sbin/ntpdate time1.aliyun.com && /sbin/hwclock -w) &> /dev/null" >> /etc/crontab
9、配置主机名
vim /etc/hostname
10、修改文件句柄数
#临时修改,立刻生效 ulimit -n 655350 #永久修改 echo "* soft nofile 655360" >> /etc/security/limits.conf echo "* hard nofile 655360" >> /etc/security/limits.conf
11、可以禁用ipv6
cat >> /etc/modprobe.d/ipv6.conf <> .pip/pip.conf <原文链接:https://www.f2er.com/centos/375210.html