Oracle Enterprise Linux 5.2安装Oracle 10g数据库


1、安装操作系统Oracle Enterprise Linux 5.2

2、创建用户

创建oracle用户,创建dba组和oinstall组
[root@oel_11g ~]# groupadd oinstall
[root@oel_11g ~]# groupadd dba
然后在这个根目录下建立一个目录 /u01/app/oracle;计划是把Oracle11G的软件安装在/u01/app/oracle这个目录
创建用户和密码
增加一个oracle用户,密码:oracle。它的这个首要的组是oinstall;辅助的组是dba;缺省的根目录是/u01/oracle
[root@oel_11g ~]# useradd -g oinstall -G dba oracle
设置密码以及确认
[root@oel_11g ~]# passwd oracle
[root@oel_11g ~]# cd /
[root@oel_11g ~]# ls –l
改变成了oracle这个用户了
[root@oel_11g /]# chown -R oracle:oinstall /u01/app/oracle
[oracle@oel_11g /]$ chmod -R 775  /u01/app/oracle
[root@oel_11g /]# ls -l
要检验nobody这个用户是否存在
[root@oracle11g /]# id nobody
uid=99(nobody) gid=99(nobody) groups=99(nobody)

3、检查安装oracle11g数据库的包是否齐全
 
Oracle Enterprise Linux 5.2的操作系统需要如下的包:
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
e
lfutils-libelf-0.125
elfutils-libelf-devel-0.125
elfutils-libelf-devel-static-0.125
gcc-4.1.2
g
cc-c++-4.1.2
g
libc-2.5-24
glibc-common-2.5
g
libc-devel-2.5
ksh-20060214
libaio-0.3.106
l
ibaio-devel-0.3.106
l
ibgcc-4.1.2
libgomp-4.1.2
l
ibstdc++-4.1.2
l
ibstdc++-devel-4.1.2
make-3.81
sysstat-7.0.2
 
[root@oel_11g ~]:rpm -q
可以使用rpm -q的方式进行检测,但是有时由于太过繁琐,个人觉得还是配置yum进行安装为好,一下提供yum的配置手法
 
4、配置yum
配置网络yum服务器 【帮客之家 http://www.bkjia.com 】
 
1)安装vsftpd包与createrepo包
使用rpm -q 指令检测vsftpd和createrepo包是否安装
需要安装的两个包名为:
createrepo-0.4.11-3.el5.noarch.rpm
vsftpd-2.0.5-12.el5.i386.rpm
使用rpm -ivh 指令进行安装
 
2)把系统安装光盘里的文件全部copy到/var/ftp/pub/OEL5U2下 (假设光盘挂载在/mnt目录下,其实只拷贝Server和TV两个文件中的内容就好)
[root@oel_11g ~]#cp -rf /mnt/* /var/ftp/pub/OEL5U2
3)在OEL5U2目录下运行createrepo命令
[root@oel_11g OEL5U2]# createrepo ./
4 )启动vsftpd服务
[root@oel_11g ~]# service vsftpd start
Starting vsftpd for vsftpd:                              [  OK  ]
或者
[root@oel_11g ~] /etc/init.d/vsftpd restart
 
5 )要连接yum服务器的使用端(以本机为例)编辑yum使用配置文件
# vi /etc/yum.repos.d/rhel-debuginfo.repo
[rhel-debuginfo]
name=Red Hat Enterprise Linux $releasever - $basearch - Debug
baseurl=ftp://127.0.0.1/pub/OEL5U2
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-RedHat-release
 
5、配置环境变量
[oracle@oel_11g ~]$ pwd  /home/oracle
[oracle@oel_11g ~]$ vi  .bash_profile
 
填写如下内容:
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/
export ORACLE_SID=oracle11g
export PATH=$ORACLE_HOME/bin:$PATH:$HOME/bin
 
6、安装数据库软件
[oracle@oel_11g ~]$ ./runinstall
 
完成安装,以root用户运行脚本
[root@oel_11g ~]# sh /u01/oraInventory/orainstRoot.sh
[root@oel_11g ~]# sh /u01/app/oracle/root.sh

相关内容