首页 > 技术文章 > centos7 初始化

walkersss 2019-12-16 20:48 原文


sshd
GSSAPIAuthentication no
UseDNS no

/etc/security/limits.d/limits.conf
*    soft    nproc     65535
*    hard    nproc     65535
*    soft    nofile    65535
*    hard    nofile    65535

/etc/sysctl.conf
fs.file-max = 65535


systemctl disable firewalld
systemctl stop firewalld

yum install iptables-services
systemctl enable iptables
systemctl start iptables
/etc/init.d/iptables save

net.ipv4.ip_forward = 1
vm.swappiness = 0


alias ll='ls -lh --color=auto'
alias grep='grep --color=auto'
alias vi='vim'



yum install epel-release
yum repolist
yum install -y nload iftop vim sysstat iostat nmon nmap lrzsz tumx htop psmisc net-tools.x86_64 wget zip unzip sysstat iotop dstat gcc lsof


Centos7 hostname:
修改所有三个主机名:静态、瞬态和灵活主机名:
[root@localhost ~]# hostnamectl set-hostname xh00
[root@localhost ~]# hostnamectl --pretty
[root@localhost ~]# hostnamectl --static
xh00
[root@localhost ~]# hostnamectl --transient
xh00

推荐阅读