Oracle11gR2在RHEL5.4上安装记录

1、检查系统所需软件包:

[root@RedhatSVR ~]# mount /dev/cdrom /mnt/cdrom

[root@RedhatSVR ~]# cd /mnt/cdrom/Server

[root@RedhatSVR Server]# rpm -ivh binutils-2.17.50.0.6-12.el5.i386.rpm

[root@RedhatSVR Server]# rpm -ivh compat-libstdc++-33-3.2.3-61.i386.rpm

[root@RedhatSVR Server]# rpm -Uvh elfutils-libelf*

[root@RedhatSVR Server]# rpm -Uvh libgomp-4.4.0-6.el5.i386.rpm

[root@RedhatSVR Server]# rpm -Uvh kernel-headers-2.6.18-164.el5.i386.rpm

[root@RedhatSVR Server]# rpm -Uvh glibc-headers-2.5-42.i386.rpm

[root@RedhatSVR Server]# rpm -Uvh glibc-devel-2.5-42.i386.rpm

[root@RedhatSVR Server]# rpm -Uvh gcc-4.1.2-46.el5.i386.rpm

[root@RedhatSVR Server]# rpm -Uvh libstdc++-devel-4.1.2-46.el5.i386.rpm

[root@RedhatSVR Server]# rpm -Uvh gcc-c++-4.1.2-46.el5.i386.rpm

[root@RedhatSVR Server]# rpm -Uvh glibc-2.5-42.i386.rpm

[root@RedhatSVR Server]# rpm -Uvh glibc-common-2.5-42.i386.rpm

[root@RedhatSVR Server]# rpm -Uvh ksh-20080202-14.el5.i386.rpm

[root@RedhatSVR Server]# rpm -Uvh libaio-0.3.106-3.2.i386.rpm

[root@RedhatSVR Server]# rpm -Uvh libaio-devel-0.3.106-3.2.i386.rpm

[root@RedhatSVR Server]# rpm -Uvh libgcc-4.1.2-46.el5.i386.rpm

[root@RedhatSVR Server]# rpm -Uvh libgomp-4.4.0-6.el5.i386.rpm

[root@RedhatSVR Server]# rpm -Uvh libstdc++*

[root@RedhatSVR Server]# rpm -Uvh make-3.81-3.el5.i386.rpm

[root@RedhatSVR Server]# rpm -Uvh sysstat-7.0.2-3.el5.i386.rpm

[root@RedhatSVR Server]# rpm -Uvh unixODBC-2.2.11-7.1.i386.rpm

[root@RedhatSVR Server]# rpm -Uvh unixODBC-devel-2.2.11-7.1.i386.rpm

注:安装的时候可以把这些所需要的包上传至Linux中,然后使用如下命令全部安装:

本人所需的包:
libaio-devel
unixODBC
unixODBC-devel

rpm -ivh *.rpm

2  添加oinstall,dba组和oracle用户

[root@RedhatSVR ~]# groupadd oinstall
[root@RedhatSVR ~]# groupadd dba
[root@RedhatSVR ~]# groupadd oper
[root@RedhatSVR ~]# useradd -g oinstall -G dba,oper oracle
[root@RedhatSVR ~]# passwd oracle



3  vi /etc/sysctl.conf 添加以下内容

fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586

保存后执行# /sbin/sysctl -p



4 限制进程和文件vi /etc/security/limits.conf:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536


5 控制为用户分配的资源
vi /etc/pam.d/login
session    required     /lib/security/pam_limits.so
session    required     pam_limits.so


6 为系统用户设置全局变量信息
vi /etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi

创建oracle安装目录设置权限
[root@AlanOracle ~]# mkdir -p /u01/app/oracle
[root@AlanOracle ~]# mkdir -p /u01/Database
[root@AlanOracle ~]# chown -R oracle:oinstall /u01
[root@AlanOracle ~]# chmod -R 775 /u01


7 修改selinux参数文件config
# vi /etc/selinux/config
注销其他的,仅留下面的内容
SELINUX=disabled
SELINUXTYPE=disabled


8 修改oracle用户配置文件:
su - oracle
vi /home/oracle/.bash_profile

#alias settings
alias la='ls -a'
alias lm='ls -l | more'
alias lam='ls -al | more'
alias cls='clear'
#注:安装rlwrap方可用下面两条:
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'

ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
ORACLE_SID=orcl11r2
PATH=$PATH:$ORACLE_HOME/bin
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export ORACLE_BASE ORACLE_SID ORACLE_HOME PATH LD_LIBRARY_PATH
stty erase ^H
DISPLAY=192.168.0.30:0; export DISPLAY

9、修改hosts文件:
   root:
   #vi /etc/hosts
   把IP与主机名对应起来;

10、安装oracle11gr2:
   a 首先启动xmanager
   b #su - oracle
   c $./runInstaller

11、创建侦听
   $netca

12、创建数据库
    $dbca


你可能感兴趣的:(oracle)