ITPub博客

首页 > 数据库 > Oracle > 在64位redhat5.5上面安装oracle 11g

在64位redhat5.5上面安装oracle 11g

原创 Oracle 作者:sky_dizzy001 时间:2014-02-01 15:16:56 0 删除 编辑
1.修改参数:
vi /etc/selinux/config
SELINUX=disabled 

[root@www oracle]# tail -n 6 /etc/security/limits.conf         
oracle              soft    nproc   2047
oracle              hard    nproc   16384
oracle              soft    nofile  1024
oracle              hard    nofile  65536
oracle              soft    stack   1024  

vi /etc/pam.d/login
# pam_selinux.so open should only be followed by sessions to be executed in the user context
session    required     pam_selinux.so open
session    required     pam_limits.so

Enabling Core File Creatio:
/etc/profile        ulimit –S –c 0 > /dev/null 2>&1   ==> ulimit -S -c unlimited > /dev/null 2>&
      
vi /etc/sysctl.conf                                          
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 104858
kernel.core_uses_pid = 1
fs.suid_dumpable = 1

使用/sbin/sysctl -p命令来让系统参数修改生效

2.模拟操作系统版本降级(欺骗oracle):
vi /etc/redhat-release
Red Hat Enterprise Linux Server release 4.2 (Tikanga)

3.安装相应包
用Yum安装一下包:
修改/etc/yum.repos.d/rhel-debuginfo.repo为如下格式:
[oracle@scdb admin]$ cat /etc/yum.repos.d/rhel-debuginfo.repo 
[Cluster]
name=Red Hat Enterprise
baseurl=file:///software/oracle/temp/Cluster
enabled=1
gpgcheck=0
[ClusterStorage]
name=Red Hat Enterprise  ClusterStorage
baseurl=file:///software/oracle/temp/ClusterStorage
enabled=1
gpgcheck=0
[Server]
name=Red Hat Enterprise  Server
baseurl=file:///software/oracle/temp/Server
enabled=1
gpgcheck=0
[VT]
name=Red Hat Enterprise Linux $releasever - $basearch - VT
baseurl=file:///software/oracle/temp/VT
enabled=1
gpgcheck=0  

其中/software/oracle/temp为系统盘对应目录
yum -y install  binutils   compat*    elfutils*    gcc*   glibc*   ksh   libaio*   libstdc*     make    numactl*  sysstat*   libXp* 
      
4.增加oracle用户和组
groupadd -g 501 oinstall
groupadd -g 500 dba
useradd -g oinstall -G dba oracle
passwd oracle
     
5.修改oracle配置文件
su - oracle
vi .bash_profile 增加以下几行:
[oracle@scdb ~]$ cat .bash_profile 
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
LANG=C; export LANG
ORACLE_BASE=/software/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10g; export ORACLE_HOME
ORACLE_SID=zsdsdb; export ORACLE_SID
NLS_LANG=AMERICAN_AMERICA.zhs16gbk; export NLS_LANG
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

6.使用vncserver来图形界面安装
在root执行  
[root@scdb ~]# xhost +

7.安装完毕后需修改listener.ora文件
修改listener.ora为如下:
[oracle@scdb admin]$ cat listener.ora 
# listener.ora Network Configuration File: /software/oracle/product/10g/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /software/oracle/product/10g)
      (PROGRAM = extproc)
    )
  (SID_DESC =
      (ORACLE_HOME = /software/oracle/product/10g)
      (SID_NAME = zsdsdb)
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = 150.17.20.202)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
    )
  )

备注:
1. 使用裸设备创建ASM磁盘方法:
1.1 修改裸设备属性:
chown oracle:oinstall /dev/sdf
[root@scdb oracle]# ls -la /dev/sdf
brw-r----- 1 oracle oinstall 8, 81 Jun 30 18:39 /dev/sdf
1.2 在ASM实例里面修改如下属性为你创建裸设备的名称
SQL> alter system set asm_diskstring='/dev/sdf';

System altered.
1.3 在ASM实例里面创建磁盘组:
CREATE DISKGROUP DGZSDS  EXTERNAL REDUNDANCY  DISK '/dev/sdf'; 
1.4.修改/etc/rc.local里面裸设备的属性,避免重启后属组变化:
[oracle@scdb admin]$ cat /etc/rc.local 
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.

chown oracle:oinstall /dev/sdf
touch /var/lock/subsys/local 

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

上一篇: oracle11g增加profile
请登录后发表评论 登录
全部评论

注册时间:2014-02-01

  • 博文量
    27
  • 访问量
    129617