实验环境:redhat5.4     地址为:192.168.2.100
镜像文件:ora102forlinux.iso   (可到oracle官网http://www.oracle.com下载)
需要安装的包:
binutils-2.17.50.0.6-12.el5
compat-db-4.2.52-5.1
compat-libstdc++-296-2.96-138
control-center-2.16.0-16.el5
gcc-4.1.2-46.el5
gcc-c++-4.1.2-46.el5
glibc-2.5-42
glibc-common-2.5-42
gnome-libs-1.4.1.2.90-44.1     #该包不影响实验,可不装
libstdc++-4.1.2-46.el5
libstdc++-devel-4.1.2-46.el5
make-3.81-3.el5
pdksh-5.2.14-36.el5
sysstat-7.0.2-3.el5
xscreensaver-4.18-5.rhel4.2    #该包不影响实验,可不装
setarch-2.0-1.1
libXp-1.0.0-8.1.el5                  #后面可能会出现问题,所以我们直接在这儿先安装
挂载光盘将这些包安装,有的包可能已经安装过了,就不需要再安装了。
[root@cms ~]# mount /dev/cdrom /mnt/cdrom/
[root@cms ~]# cd /mnt/cdrom/Server/
这部分安装省略
实验步骤如下:
1. [root@cms Server]# vim /etc/hosts
linux下安装oracle_安装
2.添加用户和组
[root@cms Server]# groupadd dba
[root@cms Server]# groupadd oinstall
[root@cms Server]# groupadd oper
[root@cms Server]# useradd -g oinstall -G dba,oper oracle
[root@cms Server]# passwd oracle     #设置密码
Changing password for user oracle.
New UNIX password:                          #设置为123456
BAD PASSWORD: it is too simplistic/systematic
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@cms Server]#
3.[root@cms Server]# vim /etc/sysctl.conf
添加下面的内容到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 = 1048576
net.core.rmem_max = 1048576
net.core.wmem_default = 262144
net.core.wmem_max = 262144
4.[root@cms Server]# vim /etc/security/limits.conf
添加下面的内容
oracle              soft    nproc   2047
oracle              hard    nproc   16384
oracle              soft    nofile  1024
oracle              hard    nofile  65536
5.[root@cms Server]# vim  /etc/pam.d/login
添加下面的内容
session    required     /lib/security/pam_limits.so
session    required     pam_limits.so
6.[root@cms Server]# vim /etc/profile
找到类似的地方添加下面的内容
if [ $USER = "oracle" ]; then
        if [ $SHELL = "/bin/ksh" ]; then
              ulimit -p 16384
              ulimit -n 65536
        else
              ulimit -u 16384 -n 65536
        fi
fi
7.编辑并设置权限
[root@cms Server]# mkdir -p /u01/app/oracle
[root@cms Server]# chown -R oracle:oinstall /u01/app/oracle
[root@cms Server]# chmod -R 775 /u01/app/oracle
[root@cms Server]#
8.切换到oracle下执行
[root@cms Server]# su - oracle
(1)[oracle@cms ~]$ vim .bash_profile
添加下面的内容
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/10.2.0
export ORACLE_SID=cms
(2)[oracle@cms ~]$ . .bash_profile
[oracle@cms ~]$ env |grep ORA
linux下安装oracle_oracle_02
(3)切换到光盘ora102forlinux.iso在虚拟机界面下操作
linux下安装oracle_安装_03
linux下安装oracle_oracle_04
出现这样的界面,操作如下
linux下安装oracle_oracle_05
linux下安装oracle_安装_06
linux下安装oracle_安装_07
linux下安装oracle_oracle_08
linux下安装oracle_oracle_09
 
该图片由于未知原因不予显示,我们可以点击图片就能看到
 
linux下安装oracle_oracle_10
linux下安装oracle_安装_11
linux下安装oracle_安装_12
linux下安装oracle_oracle_13
linux下安装oracle_安装_14
(6)创建监听器
[root@cms ~]# su – oracle                          #切换到oracle下
[oracle@cms ~]$ vim .bash_profile
export PATH=$ORACLE_HOME/bin:$PATH    #添加这样的一行
[oracle@cms ~]$ . .bash_profile
[oracle@cms ~]$ lsnrctl status
(7)建库
[oracle@cms ~]$ dbca
linux下安装oracle_安装_15
linux下安装oracle_安装_16
linux下安装oracle_安装_17
点击exit安装完成