作者:张宗硕
微信:iSuring
1. 修改主机名
hostnamectl set-hostname duckr
vi /etc/hosts
reboot -f
2. 关闭FireWall
systemctl stop firewalld.service
systemctl disable firewalld.service
3. 安装iptables防火墙
yum install iptables-services
vi /etc/sysconfig/iptables
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT
systemctl restart iptables.service
systemctl enable iptables.service
4. 关闭SELINUX
vi /etc/selinux/config
SELINUX=disabled
setenforce 0
5. 常用软件
yum update
yum install unzip
yum install zip
yum install vim 有想要vim插件配置的话可以加我微信
yum install lrzsz
yum install gcc
yum install git
yum install svn