|
|
ssh支持中文,但是在查询service sshd status时候出现乱码
很明显支持中文的。
[root@localhost ~]# localeLANG=zh_CN.UTF-8LC_CTYPE="zh_CN.UTF-8"LC_NUMERIC="zh_CN.UTF-8"LC_TIME="zh_CN.UTF-8"LC_COLLATE="zh_CN.UTF-8"LC_MONETARY="zh_CN.UTF-8"LC_MESSAGES="zh_CN.UTF-8"LC_PAPER="zh_CN.UTF-8"LC_NAME="zh_CN.UTF-8"LC_ADDRESS="zh_CN.UTF-8"LC_TELEPHONE="zh_CN.UTF-8"LC_MEASUREMENT="zh_CN.UTF-8"LC_IDENTIFICATION="zh_CN.UTF-8"LC_ALL=[root@localhost ~]# date2011年 09月 29日 星期四 16:01:31 CST[root@localhost ~]#
但是在查询sshd的运行状态的时候,产生乱码。
[root@localhost ~]# service sshd statusopenssh-daemon (pid 2589) ��������...[root@localhost ~]#
解决方法:
vim /etc/sysconfig/i18n把 LANG="zh_CN" SUPPORTED="zh_CN.UTF-8:zh_CN:zh:en_US.UTF-8:en_US:en" SYSFONT="latarcyrheb-sun16"修改成 LANG="zh_CN.UTF-8" SYSFONT="latarcyrheb-sun16" SUPPORTED="zh_CN.UTF-8:zh_CN:zh" 并且执行下 . /etc/sysconfig/i18n
问题解决:
[root@localhost ~]# localeLANG=zh_CN.UTF-8LC_CTYPE="zh_CN.UTF-8"LC_NUMERIC="zh_CN.UTF-8"LC_TIME="zh_CN.UTF-8"LC_COLLATE="zh_CN.UTF-8"LC_MONETARY="zh_CN.UTF-8"LC_MESSAGES="zh_CN.UTF-8"LC_PAPER="zh_CN.UTF-8"LC_NAME="zh_CN.UTF-8"LC_ADDRESS="zh_CN.UTF-8"LC_TELEPHONE="zh_CN.UTF-8"LC_MEASUREMENT="zh_CN.UTF-8"LC_IDENTIFICATION="zh_CN.UTF-8"LC_ALL=[root@localhost ~]# date2011年 09月 29日 星期四 16:05:42 CST[root@localhost ~]# service sshd statusopenssh-daemon (pid 2589) 正在运行...[root@localhost ~]# |
|