3.创建安装Oracle的用户组
[root@oel-01 ~]# groupadd -g 1000 oinstall
[root@oel-01 ~]# groupadd -g 1031 dba
[root@oel-01 ~]# groupadd -g 1032 oper
[root@oel-01 ~]# useradd oracle
[root@oel-01 ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionaryword
Retype new UNIX password:
passwd: all authentication tokens updatedsuccessfully.
[root@oel-01 ~]# usermod -g oinstall -Gdba,oper oracle
[root@oel-01 ~]# mkdir -p/u01/app/oracle/product/11.2.0/dbhome_1
[root@oel-01 ~]# chown -R oracle:oinstall/u01/
[root@oel-01 ~]# chmod 775 /u01/
[root@oel-01 app]# pwd
/u01/app
[root@oel-01 app]# ls -al
total 16
drwxrwxr-x 4 oracle oinstall 4096 Jun 5 10:56 .
drwxrwxr-x 3 oracle oinstall 4096 Jun 5 10:55 ..
drwxrwxr-x 2 oracle oinstall 4096 Jun 5 10:55 oracle
4.挂载光盘,安装软件
[root@oel-01 ~]# cd /etc/yum.repos.d/
[root@oel-01 yum.repos.d]# ls
[root@oel-01 yum.repos.d]# viOEL_CDROM.repo
[root@oel-01 yum.repos.d]# catOEL_CDROM.repo
[OEL5.8]
name=oracle linux
baseurl=file:///mnt/cdrom/Server
enabled=1
gpgcheck=0
[root@oel-01 yum.repos.d]# cd /mnt/
[root@oel-01 mnt]# mkdir cdrom
[root@oel-01 mnt]# mount /dev/cdrom/mnt/cdrom
mount: block device /dev/cdrom iswrite-protected, mounting read-only
[root@oel-01 mnt]# ls
cdrom
[root@oel-01 mnt]# cd cdrom/
[root@oel-01 cdrom]# ls
blafdoc.css eula.py README-en.html Server
Cluster GPL RELEASE-NOTES-en supportinfo
ClusterStorage images RELEASE-NOTES-en.html TRANS.TBL
EULA isolinux RPM-GPG-KEY VT
eula.en_US README-en RPM-GPG-KEY-oracle
[[root@oel-01 Server]# pwd
/mnt/cdrom/Server
[root@oel-01 Server]# ls /etc/pki/rpm-gpg/
RPM-GPG-KEY RPM-GPG-KEY-Fedora RPM-GPG-KEY-oracle
RPM-GPG-KEY-EL4 RPM-GPG-KEY-fedora-test
[root@oel-01 Server]# rpm --import/etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
开始安装软件
方法一:
[root@oel-01 Server]# yum -y installoracleasm-support-2.1.7-1.el5.i386.rpm
[root@oel-01 Server]# yum -y installreadline-devel-5.1-3.el5.i386.rpm
[root@oel-01 Server]# yum -y installunixODBC
[root@oel-01 Server]# yum -y install make* gcc* glibc* compat-db* compat-gcc*compat-gcc* compat-libstdc++* compat-libstdc* openmotif* setarch*
[root@oel-01 Server]# yum -y installelfutils-libelf-devel-* libaio-devel-0.3.106-5.i386.rpm sysstat-7.0.2-11.el5.i386.rpm unixODBC-devel-2.2.11-10.el5.i386.rpm
安装rlwrap-0.37.tar.gz,这里我也是上传上去的,这个软件可以在网上自己找。
[root@oel-01 ~]# ls
anaconda-ks.cfg install.log rlwrap-0.37
Desktop install.log.syslog rlwrap-0.37.tar.gz
[root@oel-01 ~]# tar -zxvfrlwrap-0.37.tar.gz
[root@oel-01 rlwrap-0.37]# pwd
/root/rlwrap-0.37
[root@oel-01 rlwrap-0.37]# ./configure
[root@oel-01 rlwrap-0.37]# make
[root@oel-01 rlwrap-0.37]# make install
方法二:批量安装
挂载光盘后
[root@oel-01 mnt]#mkdir cdrom
[root@oel-01 mnt]# mount /dev/cdrom/mnt/cdrom/
mount: block device /dev/cdrom is write-protected, mounting read-only
[root@oel-01 mnt]# cd /etc/yum.repos.d/
[root@oel-01 yum.repos.d]# vi public-yum-el5.repo
[oel5]
name = Enterprise Linux 5.7 DVD
baseurl=file:///mnt/cdrom/Server/
gpgcheck=0
enabled=1
[root@oel-01 yum.repos.d]# yum installoracle-validated
如果是OEL5: yum install oracle-validated
如果是OEL6: yum install oracle-rdbms-server-11gR2-preinstall
