1.ssh远程
/etc/ssh/sshd_config
提高SSH远程连接速度
修改ssh服务配置文件
vim /etc/ssh/sshd_config 两个参数功能需要关闭
79 GSSAPIAuthentication yes --- 远程认证的方式
115 #UseDNS yes --- DNS 已知域名 解析IP地址 反向DNS解析:已知IP,解析名称
2.firewalld防火墙
系统安全优化:
系统防火墙优化:关闭
centos6 iptables
关闭安全服务:
临时关闭:
/etc/init.d/iptables stop == services stop iptables
/etc/init.d/iptables status
/etc/init.d/sshd stop
永久关闭:
chkconfig iptables off
chkconfig --list iptables
centos7 firewalld
关闭安全服务:
临时关闭:systemctl stop firewalld
永久关闭:systemctl disable firewalld
检查确认:systemctl status firewalld
systemctl is-active firewalld
systemctl is-enabled firewalld
PS: systemctl 可以控制多个服务同时关闭或启动
3.selinux优化
系统selinux优化:关闭
setenforce 0
getenforce --- 检查确认
永久关闭:
vi /etc/selinux/config
enforcing - SELinux security policy is enforced.
selinux安全策略是激活
permissive - SELinux prints warnings instead of enforcing.
selinux输出警告信息替换激活功能 --- 临时关闭
disabled - No SELinux policy is loaded.
selinux安全策略没有被加载
sed -n '7p' /etc/selinux/config --- 进行检查确认
sed -i '7s#enforcing#disabled#g' /etc/selinux/config --- sed命令修改文件内容
补充:selinux程序由关闭 --- 启动,系统重启会有长时间延迟
4.ip地址串联
[root@backup ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
172.16.1.5 lb01
172.16.1.6 lb02
172.16.1.7 web01
172.16.1.8 web02
172.16.1.31 nfs01
172.16.1.41 backup
172.16.1.51 db01 db01.etiantian.org
172.16.1.61 m01
5.rsync配置文件
[root@web01 ~]# cat /etc/rsyncd.conf
# /etc/rsyncd: configuration file for rsync daemon mode
# See rsyncd.conf man page for more options.
# configuration example:
网友评论