1 first install the necessary toolkit
Mount/dev/CDROM/Media/
CD/mnt/CDROM/Server/
Rpm-uvh setarch-2
Rpm-uvh make-3
Rpm-uvh glibc-2
Rpm-uvh libaio-0
Rpm-uvh compat-libstdc ++-33-3
Rpm-uvh compat-gcc-34-3
Rpm-uvh compat-gcc-34-c + +-3
Rpm-uvh gcc-4
Rpm-uvh libXp-1
Rpm-uvh openmotif-2
Rpm-uvh compat-db-4
Edit/etc/hosts. The file should contain text similar to the following:
127.0.0.1 localhost. localdomain localhost
192.168.203.11 stctestbox01.us.oracle.com stctestbox01
2. Change the/etc/RedHat-release file because the Oracle10g Database does not currently support rhel5:
# Vi/etc/RedHat-release
# Red Hat Enterprise Linux Server Release 5.2 (tikanga)
Redhat-4
3. The Oracle database can be installed only under the Oracle user. Therefore, create a user group and user, and set the directory owner.
And directory permissions. Remember to set a password for the Oracle user. At the same time, the Password Must Meet the complexity requirements, such as weiguo520 ..
Groupadd oinstall
Groupadd DBA
Groupadd rule
Useradd-G oinstall-g dba Oracle
Mkdir-P/opt/Oracle/or10g
Chown-r oracle. oinstall/opt/Oracle
Chmod-r 775/opt/Oracle
Passwd Oracle
4. Configure kernel parameters to support Oracle databases.
# Vim/etc/sysctl. conf
# For Oracle
Kernel. shmmni = 4096
Kernel. SEM = 250 32000 100 128
FS. File-max = 65536
Net. ipv4.ip _ local_port_range = 1024 65000
Net. Core. rmem_default = 262144
Net. Core. rmem_max = 262144
Net. Core. wmem_default = 262144
Net. Core. wmem_max = 262144
5. Set Oracle User Shell limit.
# Vim/etc/security/limits. conf
# For Oracle
Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
6. Add relevant content at the end of the/etc/PAM. d/login file. if it already exists, exit.
# Vim/etc/PAM. d/login
# For Oracle
Session required/lib/security/pam_limits.so
7. Modify the Oracle user language environment, log out of the root user, and log on to the system as an oracle user.
$ Touch. i18n
$ VI. i18n
Export lc_ctype = "us_en"
Or do not execute. However, execute export lc_ctype = "us_en" on the command line during installation"
8. Configure Oracle user environment variables to support Oracle database installation and future operations and maintenance.
$ vim. bash_profile
# for Oracle
TMP =/tmp; export TMP
tmpdir = $ TMP; export tmpdir
oracle_base =/opt/Oracle; export oracle_base # superior path of Oracle installation path
ORACLE_HOME = $ oracle_base/or10g; export ORACLE_HOME # local Oracle installation path
oracle_sid = orcl; export oracle_sid # Your own database instance
oracle_term = xterm; export oracle_term
Path =/usr/sbin: $ path; export path
Path = $ ORACLE_HOME/bin: $ path; export path
LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib; export LD_LIBRARY_PATH
classpath = $ ORACLE_HOME/JRE: $ ORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlib; export classpath
If [$ user = "oracle"]; then
If [$ shell = "/bin/KSh"]; then
Ulimit-P 16384
Ulimit-N 65536
Else
Ulimit-u 16384-N 65536
Fi
Fi
9. Run the xhost hostname command to start the X-Windows Installation interface, as shown in:
$ Xhost mail.weiguo.com
$ Unzip 10201_database_linux32.zip
$ CD database
$./Runinstaller
10 modify dbstart
Find oracle_home_listner =/Ade/vikrkuma_new/Oracle, and change it:
Oracle_home_listner =/u01/APP/product/10.2.0/db_1
Or directly modify it:
Oracle_home_listner = $ ORACLE_HOME
Test Run
Oracle $ dbshut
Oracle $ dbstart
Whether the Oracle service and listener service can be started or disabled
Oracle $ PS-EFW | grep ora _
Oracle $ LSNRCTL status
Oracle $ PS-EFW | grep listen | grep-V grep
11 self-starting
First, use the root user to modify:
Edit/etc/oratab (set N to Y)
Orcl:/Oracle/APP/product/10.2.0/db_1: n (set N to Y)
Create an Oracle database in the/etc/init. d/path under root
#! /Bin/bash
# Chkconfig: 345 99 10
# Description: STARTUP script for Oracle databases
Export oracle_base =/opt/Oracle
Export ORACLE_HOME =/opt/Oracle/or10g
Export oracle_sid = orcl
Export Path = $ ORACLE_HOME/bin: $ path
Case "$1" in
Start)
#
# Oracle10g start
#
Echo-n "Starting oracle"
Su-Oracle-c "$ ORACLE_HOME/bin/dbstart"
Su-Oracle-c "$ ORACLE_HOME/bin/emctl start dbconsole"
Su-Oracle-c "$ ORACLE_HOME/bin/LSNRCTL start"
Su-Oracle-c "$ ORACLE_HOME/bin/isqlplusctl start"
;;
Stop)
#
# Oracle stop
#
Echo-n "shutdown oracle ."
Su-Oracle-c "$ ORACLE_HOME/bin/emctl stop dbconsole"
Su-Oracle-c "$ ORACLE_HOME/bin/isqlplusctl stop"
Su-Oracle-c "$ ORACLE_HOME/bin/dbshut"
Su-Oracle-c "$ ORACLE_HOME/bin/LSNRCTL stop"
;;
Restart)
#
# Oracle restart
#
$0 stop
$0 start
;;
*)
Echo "Oracle10g START | stop | restart"
Exit 1
Esac
Exit 0
12. Join the service
# Service Oracle start test whether oracle can be started
# Chkconfig -- add Oracle
# Chkconfig -- level 345 oracle on
# Chkconfig -- list Oracle view running status
Dbua Chinese running method:
Jdk1.5 or later is installed.
Modify the dbua File
Find the jre_dir file and change it to $ java_home/JRE to run the Chinese environment.
13 patch
Stop all Oracle databases. Then run the patch.Program
Modify oracle_home_listner = $1 in dbstart dbshut
Oracle_home_listner = $ ORACLE_HOME
Dbua
Restart
14. Clear log files. (The database cannot be started due to abnormal database shutdown)
alter database clear Unarchived logfile group 2;
alter database open;