How to Use Xshell to view Tomcat real-time logs with Chinese garbled characters in Linux

Source: Internet
Author: User
Tags i18n nginx reverse proxy

How to Use Xshell to view Tomcat real-time logs with Chinese garbled characters in Linux

In Linux, when Xshell is used to view tomcat real-time logs, Chinese characters are garbled, but the Chinese characters in the log files are not garbled. There may be two reasons. The i18n of the system does not support Chinese characters, or the Xshell encoding format does not support Chinese characters. The solution is as follows:

1. Configure the i18n System File

Vi/etc/sysconfig/i18n

The configuration content is as follows:

LANG = "zh_CN.GB18030"
LANGUAGE = "zh_CN.GB18030: zh_CN.GB2312: zh_CN"
SUPPORTED = "zh_CN.GB18030: zh_CN: zh: en_US.UTF-8: en_US: en"
SYSFONT = "lat0-sun16"

2. restart the system

Reboot

3. If garbled characters exist, set the Xshell encoding format.

File -- Properties -- Terminal Translation option Encoding: Select UTF-8

The end...

Load Balancing between Apache and multiple Tomcat clusters in Linux

Nginx Tomcat Cluster load balancing solution notes

Instance details Tomcat component installation + Nginx reverse proxy Tomcat + Apache use mod_jk and mod_proxy Reverse Proxy and load balancing

Deploy a log server using Rsyslog + LogAnalyzer + MySQL in CentOS 6.5

Build an Apache + Tomcat environment (JK deployment process)

Tomcat details: click here
Tomcat: click here

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.