1.打开cacti的配置文件

# vim /usr/local/webserver/cacti/lib/functions.php 

在文件后尾倒数第二行添加以下内容:

setlocale(LC_CTYPE,"zh_CN.UTF-8");


2.查看系统是否带有中文字体包

# ls /usr/share/fonts/chinese

如没有则安装

# yum -y install fonts-chinese


3.设置cacti使用中文字体调用rrdtool

在cacti的WEB界面选择:Console -> Settings -> Paths 标签中的:

RRDTool Default Font Path: /usr/share/fonts/chinese/TrueType/ukai.ttf