Linux (CenteOS 4.7)平台安装Oracle 9i的过程详细记录

1 Linux 开启telnet:
vi /etc/xinetd.d/telnet
disable = no;
2 开启ftp
vi /etc/xinetd.d/gssftp
disable = no;
 redhat linux 4.7 中是
  /etc/xinetd.d/gssftp
 完成还是不能ftp,问题如下:
 530 Must perform authentication before identifying USER 解决办法
Connected to 192.168.0.99.
220 hmpserver FTP server (Version 5.60) ready.
User (192.168.0.99none)): zhurx
530 Must perform authentication before identifying USER.
Login failed.
ftp> quit
进入/etc/xinetd.d/gssftp 文件. 找到
server_args = -l -a 
把-a 选项移除.
然后:service xinetd restart

就解决了。
  
3 启动服务
/etc/init.d/xinetd restart
4 创建用户
  useradd oracle
  passwd oracle
 
[root@mylinux ~]# useradd oracle
[root@mylinux ~]# passwd oracle oracle99
passwd: On ly on e user name may be specified.
[root@mylinux ~]# 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.
5 验证操作系统安装
如果完成了以上步骤,您应该具备 Oracle  所需的所有程序包和更新。您可以执行以下步骤验证您的安装。
所需内核版本:2.4.9-e.25(或更高版本)
通过运行以下命令检查内核版本:
[root@localhost ~]# uname -r
2.6.9-78.ELsmp

其他所需程序包的版本(或更高版本):
gcc-2.96-124
make-3.79
binutils-2.11
openmotif-2.1.30-11
glibc-2.2.4-31
要查看系统上安装了这些程序包的哪些版本,运行以下命令:
[root@localhost ~]# rpm -q gcc make binutils openmotif glibc
gcc-3.4.6-10
make-3.80-7.EL4
binutils-2.15.92.0.2-25
package openmotif is not installed
glibc-2.3.4-2.41
如果系统上缺少任何程序包版本,或版本比以上指定的版本旧,则可以从 Red Hat Network 下载并安装更新。
发现缺少openmotif-2.1.30-11 ,所以下载了 openmotif-2.2.4-0.1.i386.rpm。
 安装补丁包:
 rpm -U 升级一个系统中已有的软件包,如果不存在就进行安装。
 rpm -F 更新一个软件包,如果软件包不存在就不进行安装。
 安装新的包:
 [root@localhost ~]# rpm -Uvh openmotif-2.2.4-0.1.i386.rpm
   Preparing...                ########################################### [100%]
   1:openmotif              ########################################### [100%]
 安装完毕:
 [root@localhost ~]# rpm -q gcc make binutils openmotif glibc
gcc-3.4.6-10
make-3.80-7.EL4
binutils-2.15.92.0.2-25
openmotif-2.2.4-0.1
glibc-2.3.4-2.41
还要检查下列的所需程序包:
gcc-3.2.3-2
make-3.79
binutils-2.11
openmotif-2.2.2-16
setarch-1.3-1
compat-gcc-7.3-2.96.122
compat-gcc-c++-7.3-2.96.122
compat-libstdc++-7.3-2.96.122
compat-libstdc++-devel-7.3-2.96.122
compat-db-4.0.14.5(Oracle 10g 数据库安装指南 中将其列为是必需的,但此处并不需要)
检查命令:
[root@localhost oracle]# rpm -q gcc make binutils openmotif setarch compat-db compat-gcc compat-gcc-c++ compat-libstdc++ compat-libstdc++-devel
gcc-3.4.6-10
make-3.80-7.EL4
binutils-2.15.92.0.2-25
openmotif-2.2.4-0.1
setarch-1.6-1
compat-db-4.1.25-9
package compat-gcc is not installed
package compat-gcc-c++ is not installed
package compat-libstdc++ is not installed
package compat-libstdc++-devel is not installed
差的包:
gnome-libs-devel-1.4.1.2.90-44************OK
libaio-devel-0.3.102-1**********OK
libaio-0.3.102-1***********OK
compat-oracle-rhel4-1.0-3*************OK
compat-libcwait-2.0-1************OK报个错:
cat: /etc/ld.so.preload: No such file or directory
xorg-x11-deprecated-libs-devel-6.8.1-23.EL*****OK
xorg-x11-deprecated-libs-6.8.1-23.EL********OK
openmotif21-2.1.30-11.RHEL4.6.i386.rpm****************OK
gcc-3.4.3-9.EL4替换gcc-3.4.6-10.i386.rpm*********
gcc-c++-3.4.3-9.EL4替换gcc-c++-3.4.6-10.i386.rpm********
 
下载网址:
http://oss.oracle.com/projects/compat-oracle/files/RedHat/
这个网站很好,下载补丁的: http://dir.filewatcher.com/packages-directory.html
其实,后来发现,补丁也不需要从网上下载,操作系统的安装包里就有所有需要的补丁。
安装过程以及问题:
[root@localhost oracle]# rpm -qa | grep gcc
libgcc-3.4.6-10
gcc-3.4.6-10
compat-gcc-32-3.2.3-47.3
gcc-c++-3.4.6-10
gcc-java-3.4.6-10
compat-libgcc-296-2.96-132.7.2
compat-gcc-32-c++-3.2.3-47.3
gcc-g77-3.4.6-10
[root@localhost oracle]# rpm -qa | grep gnome-libs
gnome-libs-1.4.1.2.90-44.1
[root@localhost oracle]# rpm -qa | grep libaio-
[root@localhost oracle]# rpm -qa | grep make
automake14-1.4p6-12
automake16-1.6.3-5
make-3.80-7.EL4
automake17-1.7.9-5
automake15-1.5-13
automake-1.9.2-3
[root@localhost oracle]# rpm -qa | grep openmo
[root@localhost oracle]# rpm -qa | grep xorg-x11
xorg-x11-Mesa-libGL-6.8.2-1.EL.52
xorg-x11-xfs-6.8.2-1.EL.52
xorg-x11-libs-6.8.2-1.EL.52
xorg-x11-font-utils-6.8.2-1.EL.52
xorg-x11-deprecated-libs-6.8.2-1.EL.52
xorg-x11-6.8.2-1.EL.52
xorg-x11-tools-6.8.2-1.EL.52
xorg-x11-xauth-6.8.2-1.EL.52
xorg-x11-Mesa-libGLU-6.8.2-1.EL.52
xorg-x11-twm-6.8.2-1.EL.52
[root@localhost oracle]# cd /root
[root@localhost ~]# ll
total 144
-rw-r--r--  1 root root  1215 Jul 14 09:44 anaconda-ks.cfg
drwxr-xr-x  2 root root  4096 Jul 14 09:48 Desktop
-rw-r--r--  1 root root 57831 Jul 14 09:44 install.log
-rw-r--r--  1 root root 50563 Jul 14 09:44 install.log.syslog
[root@localhost ~]# mkdir rpms
[root@localhost ~]# cd rpms
[root@localhost rpms]# ll
total 0
[root@localhost rpms]# ll
total 1148
-rw-r-----  1 root root 1167196 Jul 14 11:09 gnome-libs-devel-1.4.1.2.90-44.1.i386.rpm
[root@localhost rpms]# rpm -Uvh gnome-libs-devel-1.4.1.2.90-44.1.i386.rpm
warning: gnome-libs-devel-1.4.1.2.90-44.1.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
error: Failed dependencies:
        ORBit-devel is needed by gnome-libs-devel-1.4.1.2.90-44.1.i386
        esound-devel is needed by gnome-libs-devel-1.4.1.2.90-44.1.i386
        gtk+-devel is needed by gnome-libs-devel-1.4.1.2.90-44.1.i386
        imlib-devel is needed by gnome-libs-devel-1.4.1.2.90-44.1.i386
    Suggested resolutions:
        /home/buildcentos/CENTOS/en/4.0/i386/CentOS/RPMS/ORBit-devel-0.5.17-14.i386.rpm
        /home/buildcentos/CENTOS/en/4.0/i386/CentOS/RPMS/esound-devel-0.2.35-2.i386.rpm
        /home/buildcentos/CENTOS/en/4.0/i386/CentOS/RPMS/gtk+-devel-1.2.10-36.i386.rpm
        /home/buildcentos/CENTOS/en/4.0/i386/CentOS/RPMS/imlib-devel-1.9.13-23.i386.rpm
[root@localhost rpms]# rpm -Uvh ORBit-devel-0.5.17-14.i386.rpm
warning: ORBit-devel-0.5.17-14.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
error: Failed dependencies:
        glib-devel is needed by ORBit-devel-0.5.17-14.i386
    Suggested resolutions:
        /home/buildcentos/CENTOS/en/4.0/i386/CentOS/RPMS/glib-devel-1.2.10-15.i386.rpm
[root@localhost rpms]# rpm -Uvh glib-devel-1.2.10-15.i386.rpm
warning: glib-devel-1.2.10-15.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing...                ########################################### [100%]
   1:glib-devel             ########################################### [100%]
[root@localhost rpms]# rpm -Uvh ORBit-devel-0.5.17-14.i386.rpm
warning: ORBit-devel-0.5.17-14.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing...                ########################################### [100%]
   1:ORBit-devel            ########################################### [100%]
[root@localhost rpms]# rpm -Uvh esound-devel-0.2.35-2.i386.rpm
warning: esound-devel-0.2.35-2.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
error: Failed dependencies:
        alsa-lib-devel is needed by esound-devel-0.2.35-2.i386
        audiofile-devel is needed by esound-devel-0.2.35-2.i386
    Suggested resolutions:
        /home/buildcentos/CENTOS/en/4.0/i386/CentOS/RPMS/alsa-lib-devel-1.0.6-5.RHEL4.i386.rpm
        /home/buildcentos/CENTOS/en/4.0/i386/CentOS/RPMS/audiofile-devel-0.2.6-1.el4.1.i386.rpm
[root@localhost rpms]# rpm -Uvh alsa-lib-devel-1.0.6-5.RHEL4.i386.rpm
error: open of alsa-lib-devel-1.0.6-5.RHEL4.i386.rpm failed: No such file or directory
[root@localhost rpms]# rpm -Uvh alsa-lib-devel-1.0.6-5.RHEL4.i386.rpm
warning: alsa-lib-devel-1.0.6-5.RHEL4.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing...                ########################################### [100%]
   1:alsa-lib-devel         ########################################### [100%]
[root@localhost rpms]# rpm -Uvh audiofile-devel-0.2.6-1.el4.1.i386.rpm
warning: audiofile-devel-0.2.6-1.el4.1.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing...                ########################################### [100%]
   1:audiofile-devel        ########################################### [100%]
[root@localhost rpms]# rpm -Uvh esound-devel-0.2.35-2.i386.rpm
warning: esound-devel-0.2.35-2.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing...                ########################################### [100%]
   1:esound-devel           ########################################### [100%]
[root@localhost rpms]# rpm -Uvh gtk+-devel-1.2.10-36.i386.rpm
warning: gtk+-devel-1.2.10-36.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
error: Failed dependencies:
        XFree86-devel is needed by gtk+-devel-1.2.10-36.i386
    Suggested resolutions:
        /home/buildcentos/CENTOS/en/4.0/i386/CentOS/RPMS/xorg-x11-devel-6.8.2-1.EL.52.i386.rpm
[root@localhost rpms]# rpm -Uvh xorg-x11-devel-6.8.2-1.EL.52.i386.rpm
warning: xorg-x11-devel-6.8.2-1.EL.52.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
error: Failed dependencies:
        fontconfig-devel >= 2.1 is needed by xorg-x11-devel-6.8.2-1.EL.52.i386
    Suggested resolutions:
        /home/buildcentos/CENTOS/en/4.0/i386/CentOS/RPMS/fontconfig-devel-2.2.3-13.el4.i386.rpm
[root@localhost rpms]# rpm -Uvh fontconfig-devel-2.2.3-13.el4.i386.rpm
error: open of fontconfig-devel-2.2.3-13.el4.i386.rpm failed: No such file or directory
[root@localhost rpms]# rpm -Uvh fontconfig-devel-2.2.3-13.el4.i386.rpm
warning: fontconfig-devel-2.2.3-13.el4.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
error: Failed dependencies:
        freetype-devel >= 2.1.4 is needed by fontconfig-devel-2.2.3-13.el4.i386
    Suggested resolutions:
        /home/buildcentos/CENTOS/en/4.0/i386/CentOS/RPMS/freetype-devel-2.1.9-8.el4.6.i386.rpm
[root@localhost rpms]# rpm -Uvh freetype-devel-2.1.9-8.el4.6.i386.rpm
warning: freetype-devel-2.1.9-8.el4.6.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing...                ########################################### [100%]
   1:freetype-devel         ########################################### [100%]
[root@localhost rpms]# rpm -Uvh fontconfig-devel-2.2.3-13.el4.i386.rpm
warning: fontconfig-devel-2.2.3-13.el4.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing...                ########################################### [100%]
   1:fontconfig-devel       ########################################### [100%]
[root@localhost rpms]# rpm -Uvh xorg-x11-devel-6.8.2-1.EL.52.i386.rpm
warning: xorg-x11-devel-6.8.2-1.EL.52.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing...                ########################################### [100%]
   1:xorg-x11-devel         ########################################### [100%]
[root@localhost rpms]# rpm -Uvh gtk+-devel-1.2.10-36.i386.rpm
warning: gtk+-devel-1.2.10-36.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing...                ########################################### [100%]
   1:gtk+-devel             ########################################### [100%]
[root@localhost rpms]# rpm -Uvh imlib-devel-1.9.13-23.i386.rpm
warning: imlib-devel-1.9.13-23.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
error: Failed dependencies:
        libjpeg-devel is needed by imlib-devel-1.9.13-23.i386
        libtiff-devel is needed by imlib-devel-1.9.13-23.i386
        libungif-devel is needed by imlib-devel-1.9.13-23.i386
    Suggested resolutions:
        /home/buildcentos/CENTOS/en/4.0/i386/CentOS/RPMS/libjpeg-devel-6b-33.i386.rpm
        /home/buildcentos/CENTOS/en/4.0/i386/CentOS/RPMS/libtiff-devel-3.6.1-12.i386.rpm
        /home/buildcentos/CENTOS/en/4.0/i386/CentOS/RPMS/libungif-devel-4.1.3-1.el4.2.i386.rpm
[root@localhost rpms]# rpm -Uvh libjpeg-devel-6b-33.i386.rpm
warning: libjpeg-devel-6b-33.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing...                ########################################### [100%]
   1:libjpeg-devel          ########################################### [100%]
[root@localhost rpms]# rpm -Uvh libtiff-devel-3.6.1-12.i386.rpm
warning: libtiff-devel-3.6.1-12.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing...                ########################################### [100%]
   1:libtiff-devel          ########################################### [100%]
[root@localhost rpms]# rpm -Uvh libungif-devel-4.1.3-1.el4.2.i386.rpm
warning: libungif-devel-4.1.3-1.el4.2.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing...                ########################################### [100%]
   1:libungif-devel         ########################################### [100%]
[root@localhost rpms]# rpm -Uvh imlib-devel-1.9.13-23.i386.rpm
warning: imlib-devel-1.9.13-23.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing...                ########################################### [100%]
   1:imlib-devel            ########################################### [100%]
[root@localhost rpms]# rpm -Uvh gnome-libs-devel-1.4.1.2.90-44.1.i386.rpm
warning: gnome-libs-devel-1.4.1.2.90-44.1.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing...                ########################################### [100%]
   1:gnome-libs-devel       ########################################### [100%]
[root@localhost rpms]#
[root@localhost rpms]# rpm -Uvh libaio-0.3.105-2.i386.rpm
warning: libaio-0.3.105-2.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing...                ########################################### [100%]
   1:libaio                 ########################################### [100%]
[root@localhost rpms]# rpm -Uvh libaio-devel-0.3.105-2.i386.rpm
warning: libaio-devel-0.3.105-2.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing...                ########################################### [100%]
   1:libaio-devel           ########################################### [100%]
[root@localhost rpms]# rpm -Uvh compat-libcwait-2.1-1.i386.rpm
Preparing...                ########################################### [100%]
cat: /etc/ld.so.preload: No such file or directory
   1:compat-libcwait        ########################################### [100%]
[root@localhost rpms]# rpm -Uvh compat-oracle-rhel4-1.0-5.i386.rpm
error: Failed dependencies:
        openmotif21 is needed by compat-oracle-rhel4-1.0-5.i386
        xorg-x11-deprecated-libs-devel is needed by compat-oracle-rhel4-1.0-5.i386
    Suggested resolutions:
        /home/buildcentos/CENTOS/en/4.0/i386/CentOS/RPMS/openmotif21-2.1.30-11.RHEL4.6.i386.rpm
        /home/buildcentos/CENTOS/en/4.0/i386/CentOS/RPMS/xorg-x11-deprecated-libs-devel-6.8.2-1.EL.52.i386.rpm
[root@localhost rpms]# rpm -Uvh openmotif21-2.1.30-11.RHEL4.6.i386.rpm
error: open of openmotif21-2.1.30-11.RHEL4.6.i386.rpm failed: No such file or directory
[root@localhost rpms]# rpm -Uvh openmotif21-2.1.30-11.RHEL4.6.i386.rpm
warning: openmotif21-2.1.30-11.RHEL4.6.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing...                ########################################### [100%]
   1:openmotif21            ########################################### [100%]
[root@localhost rpms]# rpm -Uvh xorg-x11-deprecated-libs-devel-6.8.2-1.EL.52.i386.rpm
warning: xorg-x11-deprecated-libs-devel-6.8.2-1.EL.52.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing...                ########################################### [100%]
   1:xorg-x11-deprecated-lib########################################### [100%]
[root@localhost rpms]# rpm -Uvh compat-oracle-rhel4-1.0-5.i386.rpm
Preparing...                ########################################### [100%]
   1:compat-oracle-rhel4    ########################################### [100%]
[root@localhost rpms]# rpm -Uvh xorg-x11-deprecated-libs-6.8.2-1.EL.52.i386.rpm
warning: xorg-x11-deprecated-libs-6.8.2-1.EL.52.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing...                ########################################### [100%]
        package xorg-x11-deprecated-libs-6.8.2-1.EL.52 is already installed
[root@localhost rpms]# rpm rpm -Uvh openmotif21-2.1.30-11.RHEL4.6.i386.rpm
error: open of rpm failed: No such file or directory
warning: openmotif21-2.1.30-11.RHEL4.6.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
[root@localhost rpms]# rpm -Uvh openmotif21-2.1.30-11.RHEL4.6.i386.rpm
warning: openmotif21-2.1.30-11.RHEL4.6.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing...                ########################################### [100%]
        package openmotif21-2.1.30-11.RHEL4.6 is already installed
[root@localhost rpms]# rpm -Uvh gcc-3.4.6-10.i386.rpm
warning: gcc-3.4.6-10.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing...                ########################################### [100%]
        package gcc-3.4.6-10 is already installed
[root@localhost rpms]# rpm -Uvh gcc-c++-3.4.6-10.i386.rpm
warning: gcc-c++-3.4.6-10.i386.rpm: V3 DSA signature: NOKEY, key ID 443e1821
Preparing...                ########################################### [100%]
        package gcc-c++-3.4.6-10 is already installed
[root@localhost rpms]#
一共装了24个rpm补丁。
安装完确认:
rpm -qa|grep compat
统计补丁个数:ls -l *.rpm |grep "^-" |wc -l
6.安装oracle9204
1)解压安装文件
zcat ship_9204_linux_disk1.cpio.gz | cpio �Cidmv &&
zcat ship_9204_linux_disk2.cpio.gz | cpio �Cidmv &&
zcat ship_9204_linux_disk3.cpio.gz | cpio �Cidmv
2)建立用户oracle 组 dba
   usermod -g dba oracle
   或者
   #groupadd dba 
#groupadd oinstall 
#useradd oracle -g oinstall -G dba 
#passwd oracle
3)建立oracle安装文件夹

[root@localhost rpms]# mkdir -p /app/oracle/product/9.2.0.4
[root@localhost rpms]# mkdir /app/cwdata
[root@localhost rpms]# chmod 777 /app/cwdata
[root@localhost rpms]# chown oracle.dba /app/cwdata
[root@localhost rpms]# chown -R oracle.dba /app/oracle/product/9.2.0.4
[root@localhost rpms]# chmod -R 777 /app/oracle/product/9.2.0.4
 
4)设置环境变量
使用Oracle用户登陆:
#su �C oracle
$vi .bash_pro file
以下是配置文件的内容# .bash_pro file
 
export ORACLE_BASE=/app/oracle 
export ORACLE_HOME=/app/oracle/product/9.2.0.4
export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin
export ORACLE_OWNER=oracle
export ORACLE_SID=btdb1
export LD_ASSUME_KERNEL=2.4.19
export PATH
unset USERNAME
5)安装oracle 补丁,这一步在“验证操作系统”中已经完成
当你从 Oracle 9iR2 光盘执行 runInstaller 时,会出现错误信息: 
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
为了解决 _libc_wait 符号问题,
从 http://oss.oracle.com/projects/compat-oracle/files/RedHat/ 下载补丁 
compat-libcwait-2.0-2.i386.rpm  compat-oracle-rhel4-1.0-5.i386.rpm.为了应用这个补丁,可以运行:
$su �C 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%]
6)设置系统参数
#su �C root切换到root用户
a) 修改#vi /etc/sysctl.conf, 以下是配置文件的内容(其中红色字体为添加的内容):
kernel.shmmax = 536870912 / 268435456
kernel.shmmni = 4096
kernel.shmall = 2097152
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
修改后运行#sysctl �Cp命令使得内核改变立即生效;
译者注:一般情况下可以设置最大共享内存为物理内存的一半,如果物理内存是 2G,则可以设置最大共享内存为 1073741824,如上;如物理内存是 1G,则可以设置最大共享内存为 512 * 1024 * 1024 = 536870912;以此类推。) 
建议永久地增加 shmmax 设置。
sem 4个参数依次为SEMMSL(每个用户拥有信号量最大数);SEMMNS(系统信号量最大数);SEMOPM(每次semopm系统调用操作 数);SEMMNI(系统辛苦量集数最大数).Shmmax 最大共享内存,官方文档建议是内存的1/2,Shmmni 最小共享内存 4096KB.Shmall 所有内存大小
7)设置oracle对文件的要求:
编辑文件:#vi /etc/security/limits.conf 加入以下语句:
oracle    soft    nofile    65536
oracle    hard    nofile   65536
oracle    soft    nproc    16384
oracle    hard    nproc    16384
8) gcc降级
#mv /usr/bin/gcc /usr/bin/gcc34
#ln �Cs /usr/bin/gcc32 /usr/bin/gcc
#mv /usr/bin/g++ /usr/bin/g++34
#ln �Cs /usr/bin/g++32 /usr/bin/g++

9)开始安装数据库
解压
zcat ship_9204_linux_disk1.cpio.gz | cpio �Cidmv &&
zcat ship_9204_linux_disk2.cpio.gz | cpio �Cidmv &&
zcat ship_9204_linux_disk3.cpio.gz | cpio �Cidmv
cd DISK1
./runInstall
会有个报错:
java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable
jasper 安装在windows环境运行正常,但是在linux环境中出现错误:java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable.
解决方法:
root下执行
xhost + /usr/openwin/bin/xhost +
安装过程依照向导进行即可。
10)装完以后要打个补丁:
切换到root:#su �C root 首先安装 opatch.
#cd /home/oracle
这个目录下是所有要安装的文件,如下
drwxr-xr-x  7 oracle oinstall      4096 Mar  9  2004 Disk1
drwxrwxr-x  3 oracle oinstall      4096 Mar  9  2004 Disk2
drwxrwxr-x  3 oracle oinstall      4096 Mar  9  2004 Disk3
-rw-r-----  1 root   root        225374 Jul 14 15:44 p2617419_220_GENERIC.zip
-rw-r-----  1 root   root        286639 Jul 14 15:44 p3238244_9204_LINUX.zip
-rw-r--r--  1 root   root           349 Mar  8  2004 README.txt
-rw-r-----  1 oracle oinstall 538906295 Jul 14 14:25 ship_9204_linux_disk1.cpio.gz
-rw-r-----  1 oracle oinstall 632756922 Jul 14 14:28 ship_9204_linux_disk2.cpio.gz
-rw-r-----  1 oracle oinstall 296127243 Jul 14 14:28 ship_9204_linux_disk3.cpio.gz
#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
(修改PATH时要要包括解压缩出来的Opatch 和 sbin目录)
# unzip p3238244_9204_LINUX.zip
# cd 3238244
# opatch apply
[root@localhost 3238244]# export ORACLE_HOME=/app/oracle/product/9.2.0.4
[root@localhost 3238244]# opatch apply
PERL5LIB=/app/oracle/product/9.2.0.4/Apache/perl/lib/5.00503:/home/oracle/OPatch/perl_modules; export PERL5LIB
/app/oracle/product/9.2.0.4/Apache/perl/bin/perl /home/oracle/OPatch/opatch.pl apply
OPatch Version 1.0.0.0.48
Perl Version 5.00503
Oracle Home = /app/oracle/product/9.2.0.4
Location of Oracle Inventory = /app/oracle/oraInventory
Oracle Universal Installer shared library = /app/oracle/oui/bin/linux/liboraInstaller.so
Path to Java = /app/oracle/jre/1.3.1/bin/java
Location of Oracle Inventory Pointer = /etc/oraInst.loc
Location of Oracle Universal Installer components = /app/oracle/oui
Required Jar File under Oracle Universal Installer = jlib/OraInstaller.jar

Please shut down Oracle instances running out of this ORACLE_HOME
(Oracle Home = /app/oracle/product/9.2.0.4)
Is this system ready for updating?
Please respond Y|N >
y
Patching...
Updating inventory...
/home/oracle/OPatch/opatch.pl version: 1.0.0.0.48
Copyright (c) 2001,2002,2003 Oracle Corporation. All Rights Reserved.

OPatch succeeded.
补丁打完后,还要relinked一个.mk文件,切换到oracle用户窗口
cd $ORACLE_HOME/network/lib
make �Cf ins_oemagent.mk install
输出很长一段东西,这里就不贴了
之后就可以启动Agent服务了.
把数据库重启一下
 sqlplus "/as sysdba"
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
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.
 
查看监听状态
[oracle@localhost lib]$ lsnrctl status
LSNRCTL for Linux: Version 9.2.0.4.0 - Production on 14-JUL-2009 16:30:10
Copyright (c) 1991, 2002, Oracle Corporation.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 9.2.0.4.0 - Production
Start Date                14-JUL-2009 15:20:55
Uptime                    0 days 1 hr. 9 min. 15 sec
Trace Level               off
Security                  OFF
SNMP                      OFF
Listener Parameter File   /app/oracle/product/9.2.0.4/network/admin/listener.ora
Listener Log File         /app/oracle/product/9.2.0.4/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=8080))(Presentation=HTTP)(Session=RAW))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=2100))(Presentation=FTP)(Session=RAW))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "btdb1" has 2 instance(s).
  Instance "btdb1", status UNKNOWN, has 1 handler(s) for this service...
  Instance "btdb1", status READY, has 1 handler(s) for this service...
Service "btdb1XDB" has 1 instance(s).
  Instance "btdb1", status READY, has 1 handler(s) for this service...
The command completed successfully
数据库创建完成后,修改/etc/oratab,把boss那一行最后的N改成Y

转自:http://fm928.blog.163.com/blog/static/748135200962063112588/

你可能感兴趣的:(oracle,linux,记录,平台,CenteOS)