RHEL4上安装oracle9i-9.2.0.4

1、默认安装RHEL4。
2、安装telnet与rsh服务,并设置。
3、安装系统所差的RPM。
[@more@]
1、默认安装RHEL4。
2、安装telnet与rsh服务,并设置。
3、安装系统所差的RPM。
查年需要的以下RPM包有没有安装,未安装的用rpm -Uvh 安装。
rpm -q make
compat-db
compat-gcc-32
compat-gcc-32-c++
compat-oracle-rhel4
compat-libcwait
compat-libgcc-296
compat-libstdc++-296
compat-libstdc++-33
gcc
gcc-c++
gnome-libs
gnome-libs-devel
libaio-devel
libaio
make
openmotif21
xorg-x11-deprecated-libs-devel
xorg-x11-deprecated-libs
除compat-oracle-rhel4-1.0-5.i386.rpm、compat-libcwait-2.0-2.i386.rpm在ORACLE的p4198954_21_LINUX.zip补丁包里。其它都在Linux系统安装盘的Disk3与Disk4里。
4、安装JDK
I successfully installed Oracle9iR2 without installing JDK on the system. Oracle comes now with its own Java. This means that you don't have to execute the
following steps which were required for older Oracle versions:
Download JDK 1.3.1 or Blackdown 1.1.8_v3: (I usually used Blackdown)
http://www.blackdown.org/
http://java.sun.com/
According to the JDK documentation, install JDK under /usr/local. Then create a symbolic link to the JDK under /usr/local/java:
su - root
bzip2 -dc jdk118_v3-glibc-2.1.3.tar.bz2 | tar xf - -C /usr/local
ln -s /usr/local/jdk118_v3 /usr/local/java
或者用Sun公司的JDK:j2sdk-1_3_1-linux-i386.bin。将j2sdk-1_3_1-linux-i386.bin拷贝至/usr/local,执行/usr/local/j2sdk-1_3_1-linux-i386.bin。
ln -s /usr/local/jdk1.3.1 /usr/local/java
5、修改配置文件# vi /etc/sysctl.conf,添加
# Set kernel for Oracle
kernel.shmall=2097152
kernel.shmmax=268435456
kernel.shmmni=4096
kernel.sem=250 32000 100 128
fs.file-max=65536
net.ipv4.ip_local_port_range=1024 65000
退出后运行# /sbin/sysctl -p
修改#vi /etc/security/limits.conf文件,添加:
oracle soft nofile 4096
oracle hard nofile 63536
oracle soft nproc 2047
oracle hard nproc 16384
6、新建用户组和用户oracle并设置密码:
groupadd dba
groupadd oinstall
useradd -g oinstall -G dba oracle
passwd oracle
7、准备oracle的安装及数据存储:
例如:我创建了一个dagavg(包含三个LV--/dev/datavg/software /dev/datavg/data /dev/datavg/app)
修改/etc/fstab,添加
/dev/datavg/software /software ext3 defaults 1 2
/dev/datavg/app /u02 ext3 defaults 1 2
/dev/datavg/data /u01 ext3 defaults 1 2
su - root
mkdir -p /u01/oradata
mkdir -p /u02/app/oracle/product/9.2.0
chown -R oracle.oinstall /u02
chown -R oracle.dba /u01
chmod 755 /u01
8、设置oracle环境变量:
su - oracle
cd
vi .bash_profile
添加:
# Set the LD_ASSUME_KERNEL environment variable only for RHEL AS 4 !!
# Use the "Linuxthreads with floating stacks" implementation instead of NPTL:
export LD_ASSUME_KERNEL=2.4.19 # for RHEL AS 4
# Oracle Environment
export ORACLE_BASE=/u02/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/9.2.0
export ORACLE_SID=test
export ORACLE_TERM=xterm
# export TNS_ADMIN= Set if sqlnet.ora, tnsnames.ora, etc. are not in $ORACLE_HOME/network/admin
export NLS_LANG=AMERICAN_AMERICA.zhs16gbk;
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
export ORACLE_OWNER=oracle
# Set shell search paths
export PATH=$PATH:$ORACLE_HOME/bin
# Set the following CLASSPATH environment variable:
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH

9、解压Oracle安装文件。
zcat ship_9204_linux_disk1.cpio.gz | cpio -idmv
zcat ship_9204_linux_disk2.cpio.gz | cpio -idmv
zcat ship_9204_linux_disk3.cpio.gz | cpio -idmv
10、oracle进入桌面环境,运行runInstaller进行安装。
安装过程中可能要求root运行一些脚本。
11、oracle安装补丁:
Download the patch 3948480 (Oracle9i Patch Set Release 2 (9.2.0.6) Patch Set 5) from http://metalink.oracle.com/ and execute the following commands:
su - oracle
$ cp p3948480_9206_LINUX.zip /tmp
$ cd /tmp
$ unzip p3948480_9206_LINUX.zip
Archive: p3948480_9206_LINUX.zip
creating: Disk1/
creating: Disk1/stage/
creating: Disk1/stage/Patches/
...

Now download the patch 4188455 from http://metalink.oracle.com/.
This patch is needed for launching the runInstaller that came with the patch 3948480 we just downloaded above.
su - oracle
$ cp p4188455_10103_LINUX.zip /tmp
$ cd /tmp
$ unzip p4188455_10103_LINUX.zip
Archive: p4188455_10103_LINUX.zip
inflating: oraparam.ini
inflating: README.txt
$
The /tmp/oraparam.ini file will now be used for launching the runInstaller that came with the patch 3948480.
To patch the runInstaller itself, run:
su - oracle
$ echo $LD_ASSUME_KERNEL
2.4.19
$ /tmp/Disk1/install/runInstaller -paramFile /tmp/oraparam.ini
- Welcome Screen: Click Next
- File Locations: Use default values (in my example: /tmp/Disk1/stage/products.xml)
- Available Products: Select "Oracle Universial Installer 10.1.0.3.0 !"
- Summary: Click Install
- At the end of the installation, you must exit runInstaller!

Ensure that no Oracle processes are running:
ps -ef | grep ora

Now to patch Oracle9iR2, run:
su - oracle
$ echo $LD_ASSUME_KERNEL # it is important that this variable is set!
2.4.19
$ /tmp/Disk1/install/runInstaller -paramFile /tmp/oraparam.ini
- Welcome Screen: Click Next
- File Locations: Use default values (in my example: /tmp/Disk1/stage/products.xml)
- Available Products: Select "Oracle 9iR2 Patchset 9.2.0.6.0"
- Summary: Click Install
When are asked to run root.sh, run it before you click Continue
- At the end of the installation, exit runInstaller.

After the 9.2.0.6 patchset has been applied, download the patch 4190568 from http://metalink.oracle.com/. Also, download the opatch utility for release
10.1.0.2 (patch 2617419) from http://metalink.oracle.com/.
To install opatch, run:
su - oracle
$ cp p2617419_10102_GENERIC.zip /tmp
$ cd /tmp
$ unzip p2617419_10102_GENERIC.zip
$ cp -a /tmp/OPatch/ $ORACLE_HOME

To apply the 4190568 patch, run
su - oracle
$ unzip p4190568_9206_LINUX.zip
$ cd 4193454
$ export PATH=$PATH:$ORACLE_HOME/OPatch
$ opatch apply
最新的补丁已经到了p4547809_92080_LINUX.zip,download the opatch from http://metalink.oracle.com/.
$ cp p4547809_92080_LINUX.zip /tmp
$ unzip p4547809_92080_LINUX.zip
$ /tmp/Disk1/runInstaller
- Welcome Screen: Click Next
- File Locations: Use default values (in my example: /tmp/Disk1/stage/products.xml)
- Available Products: Select "Oracle 9iR2 Patchset 9.2.0.8.0"
- Summary: Click Install
When are asked to run root.sh, run it before you click Continue
- At the end of the installation, exit runInstaller.
Startup and Shutdown of the Oracle 9i Database
sqlplus:
svrmgrl is not supported any more. You can now do everything with sqlplus.
For instance, to startup the database, run the following commands:
oracle$ agentctl start
oracle$ lsnrctl start
oracle$ $ORACLE_HOME/Apache/Apache/apachectl start
oracle$ sqlplus /nolog
SQL> connect / as sysdba
SQL> startup
The slash connects you to the schema owned by SYS. So in this example you will be connected to the schema owned by SYS with the privilege SYSDBA. SYSDBA
gives you the following privileges:
- sysoper privileges WITH ADMIN OPTION
- create database
- recover database until
$ORACLE_HOME/bin/dbstart and $ORACLE_HOME/bin/dbshut
You can also use $ORACLE_HOME/bin/dbstart to startup the database, and $ORACLE_HOME/bin/dbshut to shutdown the database. You can place
$ORACLE_HOME/bin/dbstart into the /etc/rc.d/rc.local boot script to automatically bring up the database at system boot time. To get $ORACLE_HOME/bin/dbstart
and $ORACLE_HOME/bin/dbshut working, you need to change the third field for your Oracle SID in /etc/oratab from "N" to "Y".
For example, for the Oracle SID "test" I changed the line in /etc/oratab from:
test:/u01/app/oracle/product/9.2.0:N
to read:
test:/u01/app/oracle/product/9.2.0:Y
In some cases for 9.2.0 I also had to copy the init file for my SID "test" from /u01/app/oracle/admin/test/pfile to $ORACLE_HOME/dbs to get dbstart and
dbshut working:
cp /u01/app/oracle/admin/test/pfile/inittest.ora.642002224936 $ORACLE_HOME/dbs/inittest.ora

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/743764/viewspace-929901/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/743764/viewspace-929901/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值