您的位置:首页 > 运维架构 > Linux

centos6 与 7 其中的一些区别

2016-03-22 00:00 253 查看
摘要: centos6 与 7 其中的一些区别

# vi /etc/ssh/sshd_config

#将MaxAuthTries注释去掉

MaxAuthTries 5(登录次数)

UseDNS no 默认是yes 的,把这个改为no,可以大大减少认证的时间

centos7

yum装的服务器,或者自带的,启动命令有区别

现在是 systemctl sshd.serviec start

centos6 是 service sshd start

修改语系有区别

centos7: vim /etc/locale.conf

LANG="en_US.UTF-8"

centos6 : vim /etc/sysconfig/i18n

LANG="en_US.UTF-8"

cento7 开放防火墙端口

firewall-cmd --zone=public --add-port=80/tcp --permanent

--zone #作用域

--add-port=80/tcp #添加端口,格式为:端口/通讯协议

--permanent #永久生效,没有此参数重启后失效

firewall-cmd --reload 重启防火墙生效

centos6

永久生效话直接修改/etc/sysconfig/iptables

修改名字

centos7 : vim /etc/hostname

centos6: vim /etc/sysconfig/network

暂时改名直接hostname + name

时间同步

centos7 自带chrony,可以设置时间,vim /etc/chrony.conf

centos6 vim /etc/ntp.conf

/etc/profile环境变量配置是否生效

centos 6 可以

centos 7 临时生效,现在需要修改/etc/bashrc
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: