### 1.服务器端配置
yum groupinstall -y "fonts" # groupinstall 安装软件并安装依赖
yum install *chinese -y # centos 安装所有Chinese的包
apt-get install ttf-wqy-zenhei language-pack-zh-hans -y
# ubuntu 安装中文 ,切换命令: dpkg-reconfigure locales 然后选择 zh_cn.uft8
# yum install -y langpacks-zh_CN # centos8 与 redhat8 中文语言包
sed -i 's/LANG=.*/LANG="zh_CN.UTF-8"/g' /etc/locale.conf
# 修改为中文,/g 作用于双引号不被解析
source /etc/locale.conf # 立即生效
locale # 查看安装的编码
date # 显示时间,看是否为中文显示
reboot # 重启, # halt 关机
#### 2.本地xshell crt 配置
【 选项 】--- 【 全局选项 】 --- 【 默认会话 】--- 【 编辑默认设置 】--- 【 外观 】---【 字符编码 】---【 UTF-8 】---【 关闭软件重新打开 】
-------- nginx 同时支持gbk 和 utf-8 编码 ---------
find / -name nginx.conf # 查找nginx 配置文件
# /nginx/conf/nginx.conf 类似于这种路径
server {
listen 80;
server_name localhost;
charset ISO-88509-1; # ISO-88509-1 这是都兼容,可以改为 uft-8
}
Powered by ddoss.cn 12.0
©2015 - 2025 ddoss
渝公网安备50011302222260号
渝ICP备2024035333号
【实验平台安全承诺书】
小绿叶技术社区,优化网络中,点击查看配置信息
主机监控系统: 安全防火墙已开启检查cc攻击-下载文件完成后等待10s 恢复访问,检查连接数低于峰值恢复访问
您的IP:216.73.216.110,2025-12-01 16:08:18,Processed in 0.01267 second(s).