Solution to Oracle Chinese Character garbled characters installation on Linux

Source: Internet
Author: User

1. Install JDK

Create a Temporary Folder under/tmp

[Root @ lsjlinux root] # cd/tmp

[Root @ lsjlinux root] # mkdir javacn

[Root @ lsjlinux tmp] # cd javacn

  

Download the j2sdk-1_4_2_02-linux-i586.bin from the sun website and save it to/tmp/javacn

  

Add executable permissions to files

[Root @ lsjlinux javacn] # chmod 755 j2sdk-1_4_2_02-linux-i586.bin

  

Install JDK in the execution File

[Root @ lsjlinux javacn] #./j2sdk-1_4_2_02-linux-i586.bin

... (A lot of license information)

Check whether you agree. Of course, select yes.

.........

  

Delete the installation file after installation

[Root @ lsjlinux javacn] # rm-rf *. bin

  

It seems that the installation is just to decompress it. The decompressed result is the j2sdk1.4.2 _ 02 folder.

  

This folder cannot be placed in/tmp. What should I do if I accidentally delete it one day? Move and rename it!

[Root @ lsjlinux javacn] # mv j2sdk1.4.2 _ 02/usr/j2sdk

  

The JDK installation is not complete yet. You need to set the environment variable:

  

[Root @ lsjlinux usr] # cd/etc

[Root @ lsjlinux etc] # vi profile

Add the following section before the export PATH

JAVA_HOME =/usr/j2sdk

Export JAVA_HOME

  

JRE = $ JAVA_HOME/jre

Export JRE

  

PATH = $ JAVA_HOME/bin: $ JRE/bin: $ PATH

  

Log out and log on again

  

OK. JDK installation is complete!

  

Ii. Install the system font

Decompress the attachment file to/tmp/javacn. The extracted results are as follows:

[Root @ lsjlinux root] # cd/tmp

[Root @ lsjlinux tmp] # cd javacn

[Root @ lsjlinux javacn] # ls-l

Total usage 23184

-Rw-r -- 1 root 8102 font. properties

Drwxr-xr-x 9 root 4096 June 24 15:36 j2sdk1.4.2 _ 02

-Rw-r -- 1 root 12642204 1970-01-01 SimSun18030.ttc

-Rw-r -- 1 root 10500352 1970-01-01 simsun. ttc

-Rw-r -- 1 root 7764 1970-01-01 sm. sh

-Rw-r -- 1 root 260472 1970-01-01 tahomabd. ttf

-Rw-r -- 1 root 265528 1970-01-01 tahoma. ttf

  

Next, you need to rename the font. properties file in $ JRE/lib and copy the font. properties file in/tmp/javacn to $ JRE/lib.

  

[Root @ lsjlinux root] # cd $ JRE

[Root @ lsjlinux jre] # cd lib

  

[Root @ lsjlinux lib] # mv font. properties font. properties. bak

[Root @ lsjlinux lib] # cp/tmp/javacn/font. properties ./

  

The remaining operation is to execute/tmp/javacn/sm. sh.

After sm. sh is executed, the system restarts automatically. Therefore, save the ongoing work before performing the following operations!

[Root @ lsjlinux root] # cd/tmp

[Root @ lsjlinux tmp] # cd javacn

[Root @ lsjlinux javacn] #./sm. sh

Bash:./sm. sh: insufficient Permissions

[Root @ lsjlinux javacn] # chmod 755 sm. sh

[Root @ lsjlinux javacn] #./sm. sh

  

The operating system restarts.

  

The second part is completed.

  

3. Set the operating system font

After restarting logon, follow these steps:

(The following steps are in KDE and should be similar in GNOME)

Start> Control Center> appearance and subject> font

Click "adjust all fonts", configure the settings in the following interface, select the font check box, and select "Simsun" in the list (in fact, this is what everyone is familiar with in the Window ), you don't need to worry about the font style. Select the size check box and select 9 in the list. After the configuration is complete, click OK.

  

Return to the previous window and close the window.

  

To solve this problem, click the terminal console menu:

Set-> font-> Custom

The following window is displayed:

Select Monospace from the list on the left and select 9 from the size column.

Remember to save the settings:

Settings> Save settings

  

4. Install Oracle

Switch to the Oracle user and run./runInstaller. The interface should be a friendly Chinese interface. If it is still garbled, check the above steps.

The steps for installing Oracle are not required here.

However, there is still a small tail project after installation.

After the installation is complete, run dbca to create a database and find garbled characters. This is not mentioned on the internet, and I found the problem after repeated exploration, after Oracle was installed, it installed its own JDK. Several of its tools were all using its own JDK, and our previous efforts did not work.

But this is a good solution. Change it!

  

Only the red part needs to be changed.

  

Change dbca first

Bash-2.05 $ cd $ ORACLE_HOME

Bash-2.05 $ cd bin

  

Bash-2.05 $ vi dbca

Add the last paragraph

# Run DBCA

$ JRE_DIR/bin/jre-DORACLE_HOME = $ OH-DJDBC_PROTOCOL = thin-mx64m-classpath $ CLASS

PATH oracle. sysman. assistants. dbca. Dbca $ ARGUMENTS

Changed:

# Run DBCA

Java-DORACLE_HOME = $ OH-DJDBC_PROTOCOL = thin-mx64m-classpath $ CLASS

PATH oracle. sysman. assistants. dbca. Dbca $ ARGUMENTS

  

Modify the oemapp

Bash-2.05 $ vi oemapp

Last paragraph

If ["$1" = "ocmcli"]

Then

Exec $ JRE-DADMIN_WRL = $ ADMIN_WRL-DORACLE_HOME = $ ORACLE_HOME-DORBdisableLoca

Tor = true-Djdbc. backward_compatible_to_816 = true $ JREOPTIONS_STRING-$ CLASSPATH_Q

UAL $ CLASSPATHADD oracle. sysman. vtx. vtxOemApp. OemApp $ APPLICATION "$2" "$3" "$4"

"$5" "$6" "$7" "$8" "$9"

Else

Exec $ JRE-DADMIN_WRL = $ ADMIN_WRL-DORACLE_HOME = $ ORACLE_HOME-DORBdisableLoca

Tor = true-Djdbc. backward_compatible_to_816 = true $ JREOPTIONS_STRING-$ CLASSPATH_Q

UAL $ CLASSPATHADD oracle. sysman. vtx. vtxOemApp. OemApp $ APPLICATION $2 $3 $4 $5 $6

$7 $8 $9

Fi

  

Changed:

If ["$1" = "ocmcli"]

Then

Java-DADMIN_WRL = $ ADMIN_WRL-DORACLE_HOME = $ ORACLE_HOME-DORBdisableLoca

Tor = true-Djdbc. backward_compatible_to_816 = true $ JREOPTIONS_STRING-$ CLASSPATH_Q

UAL $ CLASSPATHADD oracle. sysman. vtx. vtxOemApp. OemApp $ APPLICATION "$2" "$3" "$4"

"$5" "$6" "$7" "$8" "$9"

Else

Java-DADMIN_WRL = $ ADMIN_WRL-DORACLE_HOME = $ ORACLE_HOME-DORBdisableLoca

Tor = true-Djdbc. backward_compatible_to_816 = true $ JREOPTIONS_STRING-$ CLASSPATH_Q

UAL $ CLASSPATHADD oracle. sysman. vtx. vtxOemApp. OemApp $ APPLICATION $2 $3 $4 $5 $6

$7 $8 $9

Fi

  

Finally, netca

Bash-2.05 $ vi netca

Last paragraph

# Run Net Configuration Assistant

Cd $ NETTOOLSDIR

$ JRE-classpath $ CLASSPATH oracle.net. ca. NetCA $ *

Exit $ status

  

Change

# Run Net Configuration Assistant

Cd $ NETTOOLSDIR

Java-classpath $ CLASSPATH oracle.net. ca. NetCA $ *

Exit $ status

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.