redhat5上 安装oracle10g 步骤

来源:互联网 发布:linux中sem wait函数 编辑:程序博客网 时间:2024/05/16 06:56

挂在光驱:mount /dev/cdrom /media/

1. 确保selinux中的值如下
SELINUX=disabled
SELINUXTYPE=disabled      

2. 添加oracle用户和组
groupadd oinstall 
groupadd dba
useradd -m -g oinstall -G dba oracle

passwd oracle 
 
3. 创建安装目录并赋予oracle相应权限
mkdir -p /u01/app/oracle/product/10.2.0/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
  
4. 安装系统缺失的包
确保如下包都有安装
      gcc-4.1.1-52.el5
      make-3.81-1.1
      binutils-2.17.50.0.6-2.el5
      openmotif 
      setarch-2.0-1.1
      compat-db 
      compat-gcc 
      compat-gcc-c++ 
      compat-libstdc++ 
      compat-libstdc++-devel

如果没有安装请从光盘安装,由于缺失的包之间有严格的依赖关系,所以必须按照如下顺序安装缺失的包   
        rpm -Uvh compat-db-4*
        rpm -Uvh libaio-0*
        rpm -Uvh compat-libstdc++-33-3*
        rpm -Uvh glibc-headers-2.5-12.i386.rpm
        rpm -Uvh glibc-devel-2.5-12.i386.rpm
        rpm -Uvh compat-gcc-34-3*
        rpm -Uvh compat-gcc-34-c++-3*
        rpm -Uvh libXp-1*
        rpm -Uvh openmotif-2*
        rpm -Uvh gcc-4*
        rpm -Uvh glibc-2.5-12.i686.rpm
        rpm -Uvh libgomp-4.1.1-52.el5.i386.rpm
        rpm -Uvh gcc-4.1.1-52.el5.i386.rpm
        rpm -Uvh compat-readline43-4.3-3.x86_64.rpm

如果安装完成后仍然提示部分包没有安装,不过不影响使用
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

5.修改系统参数
      vi /etc/sysctl.conf 增加如下参数
      kernel.shmall = 2097152
      kernel.shmmax = 2147483648
      kernel.shmmni = 4096
      kernel.sem = 250 32000 100 128
      fs.file-max = 65536
      net.ipv4.ip_local_port_range = 1024 65000
      net.core.rmem_default=262144
      net.core.rmem_max=262144
      net.core.wmem_default=262144
      net.core.wmem_max=262144
运行下面命令使设置生效/sbin/sysctl -p

      vi /etc/security/limits.conf 增加如下参数
      oracle soft nproc 2047
      oracle hard nproc 16384
      oracle soft nofile 1024
      oracle hard nofile 65536

6、修改操作系统的版本
vi /etc/redhat-release 
Red Hat Enterprise Linux Server release 5 (Tikanga) 替换成 redhat-4

7.设置主机名和IP
vi /etc/hosts    
删除文件内容,添加如下两行
127.0.0.1    localhost
IP地址      主机名称
如果不添加第一行,安装以后数据库可以打开,通过http://ip:1158/em访问  控制台发现数据库和监听器均无法启动(箭头指向下)以管理员帐号进入em


8.  修改oracle的环境变量
su - oracle 
vi ~/.bash_profile
export DISPLAY="192.168.2.81:0.0" 
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
export ORACLE_SID=wlvm
export ORACLE_TERM=xterm
export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
#export LD_ASSUME_KERNEL=2.6.9
export LANG=en_US.utf8
export LANGUAGE=en_US.utf8
export NLS_LANG="Simplified Chinese_China.UTF8"
export LC_ALL=en_US.utf8

if [ $USER = "oracle" ]; then
  if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
  else
    ulimit -u 16384 -n 65536
  fi
fi
umask 022

9.  安装oracle
以oracle用户登录系统,打开终端将当前位置定位到database中
Unset LANG
./runInstaller.sh
如果之前的包按照要求安装完成,安装过程应该很顺利
 sqlplus ‘/as sysdba'
 启动数据库
 startup
 启动控制台
emctl start dbconsole
启动监听器
 lsnrctl start
http://ip:1158/em
启停isqlplus应用服务器
isqlplusctl stop
isqlplusctl start

10. 后修改vi /etc/redhat-release 内容为Red Hat Enterprise Linux Server release 5 (Tikanga)

11.  设置开机启动
vi /etc/oratab
wlvm:/u01/app/oracle/product/10.2.0/db_1:Y

 


以下为web页面使用isqlplus与em的网址
The following J2EE Applications have been deployed and are accessible at the URLs listed below.

iSQL*Plus URL:
http://wlvm:5560/isqlplus

iSQL*Plus DBA URL:
http://wlvm:5560/isqlplus/dba

Enterprise Manager 10g Database Control URL:
http://wlvm:1158/em

0 0
原创粉丝点击