oracle 9204 on redhat as4 安装步骤摘要
Limits
|
1#
Limits 发表于 2007-11-23 00:00
oracle 9204 on redhat as4 安装步骤摘要
好久没在linux上安装过9i了,9i在linux上安装说复杂也复杂,说简单也简单,关键就是你要按照官方文档把准备工作做好。
今天客户要安装一台测试机,找了个英文官方文档照着做了一遍,下面是精简的命令步骤,如果您的环境和我都是oracle 9204 + redhat linux as4 u1 (32位),那么恭喜你,你直接照着下面的步骤做就行了,不用到处看文档了。 1.解压安装文件,至于oracle安装文件在哪里下载,我就不废话了,呵呵。 [root@localhost database]# gunzip ship_9204_linux_disk1.cpio.gz [root@localhost database]# gunzip ship_9204_linux_disk2.cpio.gz [root@localhost database]# gunzip ship_9204_linux_disk3.cpio.gz [root@localhost database]# cpio -idmv < ship_9204_linux_disk1.cpio [root@localhost database]# cpio -idmv < ship_9204_linux_disk2.cpio [root@localhost database]# cpio -idmv < ship_9204_linux_disk3.cpio or [root@localhost database]# gunzip ship_9204_linux_disk1.cpio.gz | cpio -idmv [root@localhost database]# gunzip ship_9204_linux_disk2.cpio.gz | cpio -idmv [root@localhost database]# gunzip ship_9204_linux_disk3.cpio.gz | cpio -idmv --2.设置操作系统 [root@localhost database]# free -m total used free shared buffers cached Mem: 1011 445 566 0 8 319 -/+ buffers/cache: 117 893 Swap: 2047 0 2047 [root@localhost database]# grep MemTotal /proc/meminfo MemTotal: 1035884 kB [root@localhost database]# cat /proc/swaps Filename Type Size Used Priority /dev/sda2 partition 2096472 244 -1 [root@localhost database]# vi /etc/sysctl.conf #added for oracle software kernel.shmmax = 2147483648 kernel.shmmni = 4096 kernel.shmall = 2097152 kernel.sem = 250 32000 100 128 fs.file-max = 65536 net.core.rmem_default = 262144 net.core.rmem_max = 262144 net.core.wmem_default = 262144 net.core.wmem_max = 262144 [root@localhost database]# sysctl -p net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 1 net.ipv4.conf.default.accept_source_route = 0 kernel.sysrq = 0 kernel.core_uses_pid = 1 kernel.shmmax = 2147483648 kernel.shmmni = 4096 kernel.shmall = 2097152 kernel.sem = 250 32000 100 128 fs.file-max = 65536 net.core.rmem_default = 262144 net.core.rmem_max = 262144 net.core.wmem_default = 262144 net.core.wmem_max = 262144 [root@localhost database]# --3.检查安装包rpm 需要以下安装包: compat-db-4.1.25-9 compat-gcc-32-3.2.3-47.3 compat-gcc-32-c++-3.2.3-47.3 compat-oracle-rhel4-1.0-3 compat-libcwait-2.0-1 compat-libgcc-296-2.96-132.7.2 compat-libstdc++-296-2.96-132.7.2 compat-libstdc++-33-3.2.3-47.3 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 libaio-devel-0.3.102-1 libaio-0.3.102-1 make-3.80-5 openmotif21-2.1.30-11 xorg-x11-deprecated-libs-devel-6.8.1-23.EL xorg-x11-deprecated-libs-6.8.1-23.EL 可用下面的命令检查: 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 检查完,发现ompat-oracle-rhel4-1.0-5.i386.rpm和compat-libcwait-2.1-1.i386.rpm没有,这两个包在oracle metalink网站上有,文件名为:p4198954_40_LINUX.zip. [root@localhost patch]# unzip p4198954_40_LINUX.zip [root@localhost patch]# rpm -ivh compat-oracle-rhel4-1.0-5.i386.rpm [root@localhost patch]# rpm -ivh compat-libcwait-2.1-1.i386.rpm --4.创建组,用户,目录,设置好环境变量 [root@localhost patch]# groupadd dba [root@localhost patch]# groupadd oinstall [root@localhost patch]# mkdir -p /opt/oracle/product/9.2.0 [root@localhost patch]# useradd -c "Oracle software owner" -g oinstall -G dba -d /opt/oracle/ oracle [root@localhost patch]# passwd oracle Changing password for user oracle. New UNIX password: BAD PASSWORD: it is based on a dictionary word Retype new UNIX password: passwd: all authentication tokens updated successfully. [root@localhost patch]# chown -R oracle.oinstall /opt/oracle [root@localhost patch]# mkdir /var/opt/oracle [root@localhost patch]# chown oracle.dba /var/opt/oracle [root@localhost patch]# chmod 755 /var/opt/oracle [root@localhost patch]# su - oracle [oracle@localhost ~]$ vi .bash_profile # Added Oracle Environment export ORACLE_BASE=/opt/oracle export ORACLE_HOME=$ORACLE_BASE/product/9.2.0 export ORACLE_SID=testdb2 export ORACLE_TERM=xterm export NLS_LANG=AMERICAN; export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data export PATH=$PATH:$ORACLE_HOME/bin LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib export LD_LIBRARY_PATH export LD_ASSUME_KERNEL=2.4.19 [oracle@localhost ~]$ source .bash_profile [oracle@localhost ~]$ env|grep ORA ORACLE_SID=testdb2 ORACLE_BASE=/opt/oracle ORACLE_TERM=xterm ORA_NLS33=/opt/oracle/product/9.2.0/ocommon/nls/admin/data ORACLE_HOME=/opt/oracle/product/9.2.0 export LC_ALL=C --5.安装软件,建库 su - oracle cd 安装目录 ./runInstaller 1)安装软件过程中,会提示执行两个脚本,照着做就可以了 2)建库过程中,报了ORA-29807: specified operator does not exist,这是Oracle 的bug , 可以忽略掉,安装完成后,在$ORACLE_HOME/rdbms/admin 目录下运行utlrp.sql ,用于修补ORA-29807 错误。 解释: ORA-29807: specified operator does not exist This is a known issue (bug 2925665). You can click on the "Ignore" button to continue. Once DBCA has completed database creation, remember to run the 'prvtxml.plb' script from $ORACLE_HOME/rdbms/admin independently, as the user SYS. It is also advised to run the 'utlrp.sql' script to ensure that there are no invalid objects in the database at this time. 据说在suse linux 9上安装9204还有其它要注意的问题。 |