第 4 章 防火墙
- Centos5.x 6.x iptables
- Centos7.x firewalld
工作应用:
防火墙 服务器拥有公网 IP 地址 开启
防火墙 服务器只有内网 IP(局域网) 地址 关闭
高并发的时候
4.1 关闭 iptables
4.1.1 临时关闭
[root@oldboyedu50 /oldboy]# /etc/init.d/iptables stop
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
- [root@oldboyedu50 /oldboy]# /etc/init.d/iptables stop
- [root@oldboyedu50 /oldboy]# /etc/init.d/iptables status
iptables: Firewall is not running.
4.1.2 永久关闭
永久关闭 - 关闭开机自启动 软件在开机的时候自动运行
开机自启动软件管理命令
- [root@oldboyedu50 /oldboy]# chkconfig iptables off
- [root@oldboyedu50 /oldboy]# chkconfig |grep ipt
- iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off
关闭 iptables 小结:
1. 临时 - 重启服务器之后失效
/etc/init.d/iptables stop
2. 永久 - 重启服务器之后生效
- # 关闭开机自启动
- chkconfig iptables off
4.1.3 检查
- /etc/init.d/iptables status
- chkconfig |grep ipt
第 5 章 Linux 显示中文乱码
字符集: 就是一套文字符号及其编码
GBK: 国家标准
UTF-8: 万国码
5.1 . 查看字符集
- [root@oldboyedu50 /oldboy]# echo $LANG
- en_US.UTF-8
- [root@oldboyedu50 /oldboy]# #en_US 语言
- [root@oldboyedu50 /oldboy]# #UTF-8 字符集
- [root@oldboyedu50 /oldboy]# #语言. 字符集
5.1.1 修改字符集 - 临时
- [root@oldboyedu50 /oldboy]# export LANG=zh_CN.UTF-8
- [root@oldboyedu50 /oldboy]# echo $LANG
- zh_CN.UTF-8
5.1.2 永久修改字符集
- [root@oldboyedu50 /oldboy]# cat /etc/sysconfig/i18n
- LANG="en_US.UTF-8"
- SYSFONT="latarcyrheb-sun16"
- [root@oldboyedu50 /oldboy]# source /etc/sysconfig/i18n
- [root@oldboyedu50 /oldboy]# echo $LANG
- en_US.UTF-8
linux 显示中文乱码:
1.linux 系统的字符集与远程连接工具不同
来源: http://www.bubuko.com/infodetail-2689277.html