1.在$ORACLE_HOME/jdk/jre/lib里找到font.properties文件。把它复制一份,更名为font.properties.bak
2.在$ORACLE_HOME/jdk/jre/lib里找到font.properties.zh_CN.Redhat文件。
更名为font.properties,把原文件替换掉。
3.确认font.properties,最后一行字体信息正确
filename.-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1=/usr/share/fonts/zh_CN/TrueType/zysong.ttf
4.把刚改好的文件复制到一下目录,并替换掉原文件。
$ORACLE_HOME/jre/1.4.2/lib
$ORACLE_HOME/javavm/lib/ojvmfonts
5.emctl stop dbconsole
6.进入$ORACLE_HOME/oc4j/j2ee/oc4j_applications/applications/em/em/cabo/images/cache/zhs
把里面的所有GIF文件删除;
7.emctl stop dbconsole
以下是具体操作过程:
[oracle@sun ~]$ cd $ORACLE_HOME/jdk/jre/lib
[oracle@sun lib]$ cp font.properties font.properties.bak
[oracle@sun lib]$vi
filename.-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1=/usr/share/fonts/zh_CN/TrueType/zysong.ttf
该文件最后一行为:
经查/usr/share/fonts/zh_CN/TrueType/zysong.ttf,
目录fonts下,根本不存在zh_CN
因此需要安装中文包
[root@sun isolinux]# yum -y groupinstall chinese-support
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Setting up Group Process
rhel-debuginfo/group
Resolving Dependencies
--> Running transaction check
---> Package Deployment_Guide-zh-CN.noarch 0:5.2-11 set to be updated
---> Package Deployment_Guide-zh-TW.noarch 0:5.2-11 set to be updated
---> Package fonts-chinese.noarch 0:3.02-12.el5 set to be updated
---> Package lv.i386 0:4.51-8.1 set to be updated
---> Package scim-bridge-gtk.i386 0:0.4.5-9.el5 set to be updated
--> Processing Dependency: scim-bridge = 0.4.5-9.el5 for package: scim-bridge-gtk
---> Package scim-chewing.i386 0:0.3.1-11.el5 set to be updated
--> Processing Dependency: libscim-gtkutils-1.0.so.8 for package: scim-chewing
--> Processing Dependency: libscim-1.0.so.8 for package: scim-chewing
--> Processing Dependency: scim for package: scim-chewing
--> Processing Dependency: libchewing.so.3 for package: scim-chewing
--> Processing Dependency: libscim-1.0.so.8(LIBSCIM_1.0) for package: scim-chewing
---> Package scim-chinese-standard.i386 0:0.0.2-1.el5 set to be updated
---> Package scim-pinyin.i386 0:0.5.91-16.el5 set to be updated
---> Package scim-qtimm.i386 0:0.9.4-5 set to be updated
---> Package scim-tables-chinese.i386 0:0.5.6-7 set to be updated
--> Processing Dependency: scim-tables = 0.5.6 for package: scim-tables-chinese
---> Package stardict.i386 0:2.4.5-5 set to be updated
--> Running transaction check
---> Package libchewing.i386 0:0.3.0-8.el5 set to be updated
---> Package scim.i386 0:1.4.4-41.el5 set to be updated
---> Package scim-bridge.i386 0:0.4.5-9.el5 set to be updated
---> Package scim-libs.i386 0:1.4.4-41.el5 set to be updated
---> Package scim-tables.i386 0:0.5.6-7 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
====================================================================================================================================
====================================================================================================================================
Installing:
Installing for dependencies:
Transaction Summary
====================================================================================================================================
Install
Update
Remove
Total download size: 43 M
Downloading Packages:
------------------------------------------------------------------------------------------------------------------------------------
Total
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installed:
Dependency Installed:
Complete!
[root@sun isolinux]# vi /etc/sysconfig/i18n
#LANG="en_US.UTF-8"
#SYSFONT="latarcyrheb-sun16"
LANG="zh_CN.UTF-8"
SUPPORTED="zh_CN:zh:en_US.UTF-8:en_US:en:zh_CN.GB18030"
SYSFONT="latarcyrheb-sun16"
~
然后查找对应fonts下
[root@sun fonts]# ls
bitmap-fonts
[root@sun share]# cd fonts/
[root@sun fonts]# ls
bitmap-fonts
[root@sun fonts]# cd chinese/
[root@sun chinese]# ls
misc
[root@sun chinese]# cd T
-bash: cd: T: No such file or directory
[root@sun chinese]# cd TrueType/
[root@sun TrueType]# ls
fonts.dir
[root@sun TrueType]#
[root@sun TrueType]# su - oracle
[oracle@sun ~]$ cd $ORACLE_HOME/jdk/jre/lib
[oracle@sun lib]$ vi font.properties
filename.-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1=/usr/share/fonts/zh_CN/TrueType/zysong.ttf
更改为(更改为存在的一种字体即可,这里是uming.ttf):
filename.-misc-zysong18030-medium-r-normal--*-%d-*-*-c-*-iso10646-1=/usr/share/fonts/chinese/TrueType/uming.ttf
拷贝文件
[oracle@sun ~]$ cp /oracle/product/1021/jdk/jre/lib/font.properties $ORACLE_HOME/jre/1.4.2/lib/font.properties
[oracle@sun ~]$ cp /oracle/product/1021/jdk/jre/lib/font.properties $ORACLE_HOME/javavm/lib/ojvmfonts/font.properties
重启,
[oracle@sun ~]$ emctl stop dbconsole
TZ set to PRC
Oracle Enterprise Manager 10g Database Control Release 10.2.0.1.0
Copyright (c) 1996, 2005 Oracle Corporation.
http://sun.localdomain:1158/em/console/aboutApplication
Stopping Oracle Enterprise Manager 10g Database Control ...
[oracle@sun ~]$ emctl start dbconsole
http://192.168.66.110:1158/em/
按钮中文字体正常