linux 常用指令和中文乱码问题

xiaoxiao2021-02-28  128

查看版本指令

cat /etc/redhat-release

强制干掉正在运行的yum

rm-f /var/run/yum.pid

中文乱码问题centos7

[root@localhost ~]# cat /etc/locale.conf  LANG=en_US.UTF-8  [root@localhost ~]# cp /etc/locale.conf /etc/locale.conf_bak  [root@localhost ~]# vim /etc/locale.conf  LANG=”zh_CN.GB18030”  LANGUAGE=”zh_CN.GB18030:zh_CN.GB2312:zh_CN”  SUPPORTED=”zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en”  SYSFONT=”lat0-sun16

centos6.5

2)查看支持的字符集:

#  locale -a

3) 安装英文版默认的字符集配置为: # cat /etc/sysconfig/i18n LANG="en_US.UTF-8" SYSFONT="latarcyrheb-sun16" 4) 修改为中文字符集: # vi /etc/sysconfig/i18n LANG="zh_CN.gbk" SUPPORTED="zh_CN.utf8:zh_CN:zh" SYSFONT="latarcyrheb-sun16"

注意编辑完成source /etc/sysconfig/i18n

防火墙某个端口

 firwall-cmd --permanent --add-port=9527/tcp  ps:

开启端口

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

命令含义:

--zone #作用域

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

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

重启防火墙

firewall-cmd --reload

转载请注明原文地址: https://www.6miu.com/read-30520.html

最新回复(0)