ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Install Oracle 10gR2 64bit on RHEL5 x64

Install Oracle 10gR2 64bit on RHEL5 x64

原创 Linux操作系统 作者:ljm0211 时间:2012-06-20 11:45:49 0 删除 编辑

1.   Install RHEL5 with following software package

Install RHEL5 with following software package

Desktop

Gnome

Applications

Editor

Engineering and scientific

graphical internet

graphics

text-based internet

Development

Development Libraries

Development Tools

Java Development

Legacy Software Development(Default Option + GTK++)

Ruby

Servers

Ftp Server

Web Server

Windows File Server

Server Configuration Tools

Base System

Everything in Default Option

Language

Nothing

2.   Modify /etc/hosts, binding the IP for the host.

10.89.59.146 jungle

3.   Run the script. to Modify the kernel parameter and security option

Run rootprep.sh

#!/bin/sh groupadd dbagroupadd oinstall useradd -m ruby -g oinstall -G dbamkdir -p /disk/db/oracle/10gR2/ruby/rubychown -R ruby:oinstall /disk/db/oracle/10gR2/ruby #+--+ Modify Kernel Parameters +--+# cat >> /etc/sysctl.conf << EOF # Harvey - 2007/05/15 for Oracle 10gR2 Installation kernel.shmall = 2097152kernel.shmmax = 2147483648kernel.shmmni = 4096# semaphores: semmsl, semmns, semopm, semmnikernel.sem = 250 32000 100 128fs.file-max = 65536net.ipv4.ip_local_port_range = 1024 65000net.core.rmem_default=262144net.core.rmem_max=262144net.core.wmem_default=262144net.core.wmem_max=262144 ################################################### EOF /sbin/sysctl -p cat >> /etc/security/limits.conf << EOF # Harvey - 2007/05/15 for Oracle 10gR2 Installation *               soft    nproc   2047*               hard    nproc   16384*               soft    nofile 1024*               hard    nofile 65536 ################################################### EOF cat >> /etc/pam.d/login << EOF # Harvey - 2007/05/15 for Oracle 10gR2 Installation session    required     /lib/security/pam_limits.so ################################################### EOF echo "redhat-4" > /etc/redhat-release

4.   Disable secure linux

Set the SELINUX key to disabled in /etc/selinux/config

SELINUX=disabled

5.   Modify the profile of the oracle user “ruby”

Add the following row to /home/ruby/.bash_profile

# Harvey - 2007/05/15 for Oracle 10gR2 Installation

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

NLS_LANG=AMERICAN_AMERICA.AL32UTF8;

export NLS_LANG

ORACLE_BASE=/disk/db/oracle/10gR2/ruby;

export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/ruby;

export ORACLE_HOME

ORACLE_SID=ruby;

export ORACLE_SID

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:/lib:/usr/lib;

export LD_LIBRARY_PATH

CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;

export CLASSPATH

if [ $USER = "ruby" ]; then

if [ $SHELL = "/bin/ksh" ]; then

    ulimit -p 16384

    ulimit -n 65536

else

    ulimit -u 16384 -n 65536

fi

fi

###################################################

6.   Check the file modification

more /etc/sysctl.conf

more /etc/security/limits.conf

more /etc/pam.d/login

more /home/ruby/.bash_profile

more /etc/selinux/config

more /etc/redhat-release

7.   Confirm the package in-need is installed

Upload the ISO file to the linux server via ftp, to the path “/storage/RHEL5/x64”,

For the libaio and libXp, both x86_64 and i386 was needed.

如果在32位机上安装,只需Check i386的软件包,按照第一步选择安装,以下软件包中只有红色部分需要手动安装,其他的正常都已经安装。

# From RedHat AS5 Disk 1mount -t iso9660 /storage/RHEL5/x64/rhel-5-server-x86_64-disc1.iso /mnt/ -o loopcd /mnt/Serverrpm -Uvh setarch-2.0-1.1.x86_64.rpm               #rpm -Uvh setarch-2*rpm -Uvh make-3.81-1.1.x86_64.rpm                              #rpm -Uvh make-3*rpm -Uvh glibc-2.5-12.x86_64.rpm                   #rpm -Uvh glibc-2*rpm -Uvh libaio-0.3.106-3.2.x86_64.rpm             #rpm -Uvh libaio-0*rpm -Uvh libaio-0.3.106-3.2.i386.rpm                #rpm -Uvh libaio-0* cd /umount /mnt # From RedHat AS5 Disk 2mount -t iso9660 /storage/RHEL5/x64/rhel-5-server-x86_64-disc2.iso /mnt/ -o loopcd /mnt/Serverrpm -Uvh gcc-4.1.1-52.el5.x86_64.rpm                                             #rpm -Uvh gcc-4* cd /umount /mnt# From RedHat AS5 Disk 3mount -t iso9660 /storage/RHEL5/x64/rhel-5-server-x86_64-disc3.iso /mnt/ -o loopcd /mnt/Serverrpm -Uvh compat-libstdc++-33-3.2.3-61.x86_64.rpm       #rpm -Uvh compat-libstdc++-33-3*rpm -Uvh compat-gcc-34-3.4.6-4.x86_64.rpm                   #rpm -Uvh compat-gcc-34-3*rpm -Uvh compat-gcc-34-c++-3.4.6-4.x86_64.rpm           #rpm -Uvh compat-gcc-34-c++-3*rpm -Uvh libXp-1.0.0-8.x86_64.rpm                                    #rpm -Uvh libXp-1*rpm -Uvh libXp-1.0.0-8.i386.rpm                                        #rpm -Uvh libXp-1*rpm -Uvh openmotif-2.3.0-0.3.el5.x86_64.rpm                  #rpm -Uvh openmotif-2*rpm -Uvh compat-db-4.2.52-5.1.x86_64.rpm                     #rpm -Uvh compat-db-4* cd /umount /mnt


8.   Install Oracle

Login as ruby, install oracle with OUI, the universal oracle database installer, platform. independence.

#Check the environment variables

echo -e "ORACLE_SID"{$ORACLE_SID}"\nORACLE_BASE"{$ORACLE_BASE}"\nORACLE_HOME"{$ORACLE_HOME}"\nNLS_LANG"{$NLS_LANG}

#run oracle installer

./runInstaller

9.   Adjust the listener

The default listener cannot work stable. Adjust the listener as following and restart.

# listener.ora Network Configuration File: /disk/db/oracle/10gR2/ruby/ruby/network/admin/listener.ora

# Generated by Oracle configuration tools.

SID_LIST_LISTENER =

(SID_LIST =

    (SID_DESC =

      (SID_NAME = ruby)

      (ORACLE_HOME = /disk/db/oracle/10gR2/ruby/ruby)

#      (PROGRAM = extproc)       #Marked

    )

)

LISTENER =

(DESCRIPTION_LIST =

    (DESCRIPTION =

      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))

      (ADDRESS = (PROTOCOL = TCP)(HOST = jungle)(PORT = 1521))

    )

)

10.   Start the oracle 10g web tools.

Start the web enterprise manager then you can manage the oracle with web forms.

$ORACLE_HOME/bin/emctl start dbconsole

Start the web isql*plus then you can execute the SQL with web forms.

$ORACLE_HOME/bin/isqlplusctl start

进入iSQL*Plus/DBA的方法:

1、 进入目录:$ORACLE_HOME/oc4j/j2ee/isqlplus/application-deployments/isqlplus (不进入该目录,以后命令执行会报错)

2、 执行如下命令进入JAZN命令环境:

$ORACLE_HOME/jdk/bin/java -Djava.security.properties=$ORACLE_HOME/sqlplus/admin/iplus/provider -jar $ORACLE_HOME/oc4j/j2ee/home/jazn.jar -user "iSQL*Plus DBA/admin" -password welcome –shell

Admin 和 welcome 分别为iSQL*Plus DBA的默认帐号和密码

3、 新建用户,设置密码
   JAZN:> adduser "iSQL*Plus DBA" username password

4、 用listusers列出用户,看看你的用户是否存在
  JAZN:> listusers

5、 授予用户赋予webDba角色
  JAZN:> grantrole webDba "iSQL*Plus DBA" username

6、 退出JAZN命令环境
JAZN:> exit

7、 再进入网址http://host:port/isqlplus/dba,在弹出的对话框中输入你新建的username和password,就可以进入到数据库登陆界面了,选择以sysdba或sysoper身份登陆。
注意这里不是数据库用户,而是isqlplus应用服务器要求的用户和密码(要求具有webDba角色)

如果你不想让这个用户继续登陆或存在,可以进入JAZN命令环境(执行1、2步操作),执行
JAZN:> revokerole webDba "iSQL*Plus DBA" username    #撤销用户webDba角色
JAZN:> remuser "iSQL*Plus DBA" username                      #删除用户
也可以用
JAZN:> setpasswd "iSQL*Plus DBA" username old_password new_password 修改用户密码

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

请登录后发表评论 登录
全部评论

注册时间:2009-05-14

  • 博文量
    272
  • 访问量
    436821