Red Hat AS4 install oracle9i
Reference Articles:
http://blog.csdn.net/navyforce/archive/2007/04/09/1557555.aspx
First, the preparatory work
1, first installed RedHat AS4.0, to keep the system clean.
In the oracle site to download the official installation of Oracle 9i documents:
ship_9204_linux_disk1.cpio.gz
ship_9204_linux_disk2.cpio.gz
ship_9204_linux_disk3.cpio.gz
Because the system requires a lot of oracle installation package is not less the same line, is one less. Open a terminal to run the root user:
# Rpm-qa | grep compat
Check the current system installed package compat whether:
compat-db-4.1.25-9
compat-gcc-32-3.2.3-47.3 4
compat-gcc-32-c + + -3.2.3-47.3 4
compat-libgcc-296-2.96-132.7.2 3
compat-libstdc + + -296-2.96-132.7.2 3
compat-libstdc + + -33-3.2.3-47.3 2
gcc-3.4.3-9.EL4
gcc-c + +-3.4.3-9.EL4
gnome-libs-1.4.1.2.90-44
gnome-libs-devel-1.4.1.2.90-44 4
libaio-devel-0.3.102-1 3
libaio-0.3.102-1 3
make-3.80-5
openmotif21-2.1.30-11 3
xorg-x11-deprecated-libs-devel-6.8.1-23.EL
xorg-x11-deprecated-libs-6.8.1-23.EL
compat-oracle-rhel4-1.0-3
compat-libcwait-2.0-1
Issued if the number of packets less, AS4 CD-ROM to install RPM package (the last two patches from Oralce have p4198954_21_linux.zip decompression)
rpm-ivh compat-oracle-rhel4-1.0-5.i386.rpm (p4198954_21_linux.zip)
rpm-ivh compat-libcwait-2.0-2.i386.rpm (p4198954_21_linux.zip)
Second, the creation of the relevant installation directory and environment variables
1, create a user / group;
# groupadd dba
# groupadd oinstall
# useradd oracle-g oinstall-G dba
# passwd oracle
2, the establishment of oracle installation folder;
# Mkdir-p / opt/ora9/product/9.2.0.4
# Mkdir / var / opt / oracle
# Chown oracle.dba / var / opt / oracle
# Chown-R oracle.dba / opt/ora9
3, configuration of environment variables;
The use of Oracle User Login:
# su - oracle
$ vi. bash_profile
The following is the contents of configuration files
#. Bash_profile
# Get the aliases and functions
if [-f ~ /. bashrc]; then
. ~ /. Bashrc
fi
# User specific environment and startup programs
PATH = $ PATH: $ HOME / bin
export ORACLE_BASE = / opt/ora9
export ORACLE_HOME = / opt/ora9/product/9.2.0.4
export PATH = $ PATH: $ ORACLE_HOME / bin: $ ORACLE_HOME / Apache / Apache / bin
export ORACLE_OWNER = oracle
export ORACLE_SID = oradb
export ORACLE_TERM = xterm
export LD_ASSUME_KERNEL = 2.4.19 ##********
export THREADS_FLAG = native
export LD_LIBRARY_PATH = $ LD_LIBRARY_PATH: $ ORACLE_HOME / lib
export NLS_LANG = "American_america.utf8"
export ORA_NLS33 = $ ORACLE_HOME / ocommon / nls / admin / data
export PATH
unset USERNAME
4, set the system parameters;
# su - root to switch to root user
a) modify # vi / etc / sysctl.conf, the following is the contents of configuration files (one red font for the added content):
# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl (8) and
# Sysctl.conf (5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 0
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
Modified to run # sysctl - p command allows the kernel to change with immediate effect;
(Translator's Note: Under normal circumstances you can set the maximum shared memory for half of physical memory, if physical memory is 2G, you can set the maximum shared memory for the 1,073,741,824, as indicated; such as the physical memory is 1G, you can set up the largest share memory for 512 * 1024 * 1024 = 536,870,912; and so on.)
Proposal to increase shmmax setting permanently.
sem 4 parameters were SEMMSL (each user has a maximum number of semaphore); SEMMNS (the largest number of signals); SEMOPM (for each system call semopm operand); SEMMNI (system hard maximum number of volume sets). Shmmax maximum shared memory, the official document is the memory recommended 1 / 2, Shmmni minimum shared memory size of all memory 4096KB.Shmall .
########################################### Not been
b) set the oracle of the documentation requirements:
Edit the document: # vi / etc / security / limits.conf by adding the following statement:
oracle soft nofile 65536
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
c) gcc downgrade
# su - root
# mv / usr / bin / gcc / usr/bin/gcc34
# ln-s / usr/bin/gcc32 / usr / bin / gcc
# mv / usr / bin / g + + / usr / bin / g + +34
# ln-s / usr / bin / g + +32 / usr / bin / g + +
############################################
Patch 3238244 beat
To download the three patches at the same time:
p4198954_21_linux.zip Before running the runInstaller play
p2617419_220_GENERIC.zip patch to repair the wrong agent
p3238244_9204_LINUX.zip Patch 3238244 beat
5, to install oracle patch
When you implement Oracle 9iR2 CD runInstaller appears when the error message:
Error occurred during initialization of VM
Unable to load native library:
/ tmp/OraInstall2003-10-25_03-14-57PM/jre/lib/i386
/ libjava.so symbol _libc_wait, version GLIBC_2.0 not
defined in file libc.so.6 with link time reference
In order to solve the problem _libc_wait symbols,
Download patch from http://oss.oracle.com/projects/compat-oracle/files/RedHat/
compat-libcwait-2.0-2.i386.rpm compat-oracle-rhel4-1.0-5.i386.rpm. In order to apply this patch, you can run:
$ su - root
# Cd / orasetup
# ls compat *. rpm
compat-libcwait-2.0-2.i386.rpm compat-oracle-rhel4-1.0-5.i386.rpm
# Rpm-Uvh compat *. rpm
Preparing ... ########################################### [100% ]
1: compat-libcwait-2.0-2.i386.rpm ##################################### [50%]
2: compat-oracle-rhel4-1.0-5.i386.rpm ################################### # [100%]
Third, the beginning of the installation of Oracle9i
1, extract the downloaded installation files:
zcat ship_9204_linux_disk1.cpio.gz | cpio-idmv or cpio-idcmv <ship_9202_ia64_lnx_Disk1.cpio
zcat ship_9204_linux_disk2.cpio.gz | cpio-idmv
zcat ship_9204_linux_disk3.cpio.gz | cpio-idmv
cpio-idmv <ship_9204_linux_disk1.cpio
Unpack and decompression process, the automatic creation of three documents containing the installation directory:
Disk1
Disk2
Disk3
. To oracle user sign-on system for Oracle installation:
$ Cd Disk1
$. / RunInstaller After a while there will be the installation of Oracle interface
- Welcome Screen: Click Next
- Inventory Location: Click Next
- Unix Group Name: Use "oinstall" and click Next
When asked to run / tmp / orainstRoot.sh, run it before you click Continue
- At the end of the installation, exit runInstaller.
2. Step by step to install it on the list!
3, after the patch is installed:
Switch to root: # su - root to install the first opatch.
# cd / orasetup
# unzip p2617419_210_GENERIC.zip
Archive: p2617419_210_GENERIC.zip
creating: OPatch /
creating: OPatch / docs /
inflating: Opatch / docs / FAQ
......
inflating: README.txt
# export PATH = $ PATH: / orasetup / OPatch: / sbin
(Modified to include the PATH to extract out of Opatch and sbin directory)
# Unzip p3238244_9204_LINUX.zip
# Cd 3238244
# Opatch apply
If the HOME variable error prompt executable statement:
# export ORACLE_BASE = / opt/ora9
# export ORACLE_HOME = / opt/ora9/product/9.2.0.4
Prompt appears on the success of all installed successfully.
After the patch finished, but also relinked one. Mk document window to switch to the oracle user
cd $ ORACLE_HOME / network / lib
make-f ins_oemagent.mk install
Agent will be able to start after the service.
4, the final implementation of oracle database build # dbca
Click OK, and then you can withdraw from the normal landing and start the database operation.
[oracle @ oracle oracle] $ lsnrctl start
[oracle @ oracle oracle] $ sqlplus / nolog
SQL * Plus: Release 9.2.0.4.0 - Production on Sat Mar 12 22:58:53 2005
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
SQL>; connect / as sysdba
Connected.
SQL>; shutdown immediate database closed
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>; startup; start database
ORACLE instance started.
Total System Global Area 236000356 bytes
Fixed Size 451684 bytes
Variable Size 201326592 bytes
Database Buffers 33554432 bytes
Redo Buffers 667648 bytes
Database mounted.
Database opened.
5, in order to facilitate the management, you can write a startup script ora9i:
Entered root in the preparation of the following script:
#! / bin / bash
# start and stop the oracle instance
# Chkconfig-level 5 - add ora9i
# chkconfig: 345 91 19
# Description: starts the oracle listener and instance
export ORACLE_HOME = "/ opt/ora9/product/9.2.0.4"
export PATH = $ ORACLE_HOME / bin: $ ORACLE_HOME / Apache / Apache / bin: $ PATH
export ORACLE_OWNER = "oracle"
export ORACLE_SID = oradb
if [!-f $ ORACLE_HOME / bin / dbstart-o!-d $ ORACLE_HOME]
then
echo "oracle startup: cannot start"
exit 1
fi
case "$ 1" in
start)
# startup the listener and instance
echo-n "oracle startup:"
su - $ ORACLE_OWNER-c "$ ORACLE_HOME / bin / lsnrctl start"
su - $ ORACLE_OWNER-c $ ORACLE_HOME / bin / dbstart
touch / var / lock / subsys / oracle
echo "finished"
;;
stop)
# Stop listener, apache and database
echo-n "oracle shutdown:"
su - $ ORACLE_OWNER-c "$ ORACLE_HOME / bin / lsnrctl stop"
su - $ ORACLE_OWNER-c $ ORACLE_HOME / bin / dbshut
rm-f / var / lock / subsys / oracle
echo "finished"
;;
reload | restart)
$ 0 stop
$ 0 start
;;
*)
echo "Usage: ora9i [start | stop | reload | restart]"
exit 1
esac
exit 0
Save as ora9i after, and then use chmod a + x ora9, may in the future to root Run / etc/rc.d/init.d/ora9i start | stop to manage the oracle of the start-up and stopped. If you want this script into the system so that it can be switched (although the official is not recommended for automatic operation of the boot), then to run the following command: chkconfig - level 3 (or 5) - add ora9i
Or, to use the root user to perform the following command:
# cp / orasetup/ora9i / etc / rc.d / init.d /
# chmod a + x / etc / rc.d / init.d / ora9
# cd / etc/rc.d/rc5.d
# ln-s / etc/rc.d/init.d/ora9i S99ora9i
# cd / etc/rc.d/rc0.d
# ln-s / etc/rc.d/init.d/ora9i K99ora9i
Can also be self-starting oracle9i!
Or in the / etc / rc.d / rc.local add the following:
su - oracle-c "/ opt/ora9/oracle/product/9.2.0.4/bin/lsnrctl start"
su - oracle-c "/ opt/ora9/oracle/product/9.2.0.4/bin/dbstart start"
6,
Re-installed on the database to delete the questions:
The ORACLE installation directory and delete the / etc / ora *.* to delete on the list
# rm-f / etc / ora *.*
ok, now it is almost everything, and you can already proposed its own database
There was a problem running dbca:
[oracle @ oracle bin] $. / dbca
/ u01/app/jre/1.1.8/bin/../lib/i686/green_threads/libzip.so: symbol errno,
version GLIBC_2.0 not defined in file libc.so.6 with link time reference
(libzip.so)
Unable to initialize threads: cannot find class java / lang / Thread
Could not create Java VM
Solutions:
vi ~ /. bash_profile
Add the following two lines:
export LD_ASSUME_KERNEL = 2.4.19
export THREADS_FLAG = native
Save and exit the entry into force of
source ~ /. bash_profile
Problem-solving
Intermediate database error:
ORA-29807
The software bug, first ignored, to be built after the database:
$ cd $ ORACLE_HOME / rdbms / admin
$ sqlplus
sql> @ utlrp.sql
Mentioned all of the patches have been downloaded in the machine
Related Posts of Red Hat AS4 install oracle9i
-
ORACLE10G full version centos5 installed (the installation has passed)
ORACLE10G full version centos5 installed (the installation has passed) 1. Centos 5.0 install rn GUI must be installed, it is best not to start selinux rn rn rn 2. . Ready to install the software: (this is very important, is the first installation fai ...
-
Oracle 10 client under linux installation instructions at
Oracle 10 client under linux installation instructions at 1. Preparation conditions: Environment: linux red linux5 64 bit and have the following rpm package to ensure that the installation binutils-2.15.92.0.2-10.EL4 compat-db - 4.1.25 -9 control-center-2
-
RedHat AS 3 at oracle10.2.1 install document
RedHat AS 3 at install oracle10.2.1 Installed in order to facilitate the next, according to the actual installation process, writing the document. First, configure RedHat AS 3 Operating system versions: Red Hat Enterprise Linux AS release 3 (Taroon) ...
-
Oracle XDB relax resolve port conflict of 8080
In this paper, carried: http://www.enet.com.cn/article/2008/0306/A20080306175452.shtml Oracle 9i from the start, Oracle includes the installation of the default XDB. After starting the database, Oracle XDB's http service will automatically take u ...
-
AX3.0 + Oracle 10G RAC installation
During these two days, you installed RAC, in a virtual machine inside, with a full day, there have been some questions on his way. Now have their own solution. In fact, it is loaded, it is easy, as long as planned, carefully point on OK, the trouble ...













Leave a Reply