Windows 7上VMWare Server 2.0安装CentOS 5.6+ Oracle 11g R2
我使用操作系统 , CentOS release 5.5(Final) Kernel 2.6.18-194.el5
======================================
检查相关的开发工具和一些包
The following or later version of packages for Asianux 3, Oracle Enterprise Linux 5, and Red Hat Enterprise Linux 5 should be installed:
检查命令格式如下:
rpm -qa | grep 名字
binutils-2.17.50.0.6 ok
compat-libstdc++-33-3.2.3 ok
elfutils-libelf-0.125 ok
elfutils-libelf-devel-0.125 ok
elfutils-libelf-devel-static-0.125 ok
gcc-4.1.2 ok
gcc-c++-4.1.2 ok
glibc-2.5-24 ok
glibc-common-2.5 ok
glibc-devel-2.5 ok
glibc-headers-2.5 ok
kernel-headers-2.6.18 ok
ksh-20060214 ok
libaio-0.3.106 ok
libaio-devel-0.3.106 --
libgcc-4.1.2 ok
libgomp-4.1.2 ok
libstdc++-4.1.2 ok
libstdc++-devel-4.1.2 ok
make-3.81 ok
numactl-devel-0.9.8.i386 --
sysstat-7.0.2 --
unixODBC-2.2.11 --
unixODBC-devel-2.2.11 --
pcre-devel-6.6-2.el5_1.7 --
从CentOS-5.5-i386-bin-DVD.iso\CentOS 文件找到缺少的包, 用FTP上传到 linux 上去,
[root@leixianp ~]# groupadd oinstall
[root@leixianp ~]# groupadd dba
[root@leixianp ~]# mkdir -p /u01/oracle
添加一个oracle用户, 根目录是 /u01/oracle, 主的组是 oinstall 副的组是dba
useradd -g oinstall -G dba -d /u01/oracle oracle
[root@july /]# cp /etc/skel/.bash_profile /u01/oracle
[root@july /]# cp /etc/skel/.bashrc /u01/oracle
[root@july /]# cp /etc/skel/.bash_logout /u01/oracle
为oracle用户设置密码
passwd oracle
[root@leixianp ~]# ls -l
[root@leixianp ~]# chown -R oracle:oinstall u01
[root@leixianp ~]# ls -l
检查 nobody 是否存在 , id nobody
缺省存在的。如果不存在 # /usr/sbin/useradd -g nobody
[root@leixianp ~]# 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 = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
添加以上内容
[root@leixianp ~]# vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
[root@leixianp ~]# vi /etc/pam.d/login
session required pam_limits.so
设置oracle 用户环境变量
[root@leixianp ~]# su - oracle
ORACLE_SID=lei
ORACLE_BASE=/u01
ORACLE_HOME=/u01/oracle
PATH=$ORACLE_HOME/bin:$PATH
LD_ASSUME_KERNEL=2.4.19
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
PATH=$ORACLE_HOME/bin:$PATH
#DISPLAY=192.168.137.1:0.0
export ORACLE_SID ORACLE_BASE ORACLE_HOME LD_LIBRARY_PATH PATH DISPLAY
stty erase ^h
alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'
使用命令:unzip ...........(这一步在此就不多做介绍了)
解压完以后会有名为database的目录
mv database /u01/
[root@leixianp ~]# su - oracle
[oracle@leixianp ~]$ env |grep ORA
ORACLE_SID=lei
ORACLE_BASE=/u01
ORACLE_HOME=/u01/oracle
[oracle@leixianp ~]$ export DISPLAY
[oracle@leixianp ~]$ xhost +
[oracle@leixianp ~]$ cd /u01/database/
[oracle@leixianp ~]$ ./runinstaller
Netca
Dbca
[oracle@oradb ~]$ rlwrap sqlplus "/ as sysdba"
数据库安装完毕