您好,欢迎来到三六零分类信息网!老站,搜索引擎当天收录,欢迎发信息
三六零分类信息网 > 曲靖分类信息网,免费分类信息发布

CentOS 5.3安装Oracle过程讲解与创建软件账户

2025/9/5 16:23:13发布12次查看
经过长时间学习centos 5.3安装oracle,你可能会遇到centos 5.3安装oracle问题,这里将介绍centos 5.3安装oracle问题的解决方法,c
经过长时间学习centos 5.3安装oracle,你可能会遇到centos 5.3安装oracle问题,这里将介绍centos 5.3安装oracle问题的解决方法,centos linux与rhel产品有着严格的版本对应关系,例如使用rhel 4源代码重新编译发布的是centos linux 4.0,与rhel 5对应的是centos linux 5.0。 centos 5.3安装oracle 10g总结文档 .
一.前言
之前听坊间传闻说centos 5.3安装oracle很bt,今日一试,果然如此:
二.centos 5.3安装oracle基本配置   
在centos 5.3安装oracle之前,我想先说一下机器配置的问题,因为单机器的问题,就可能会浪费你1天多的时间!
1)硬盘剩余空间:10g以上
虽然oracle 10g的安装文件只有800多mb,但安装后的oracle+orainventory目录会用差不多4g空间,再加上安装时oracle生成的临时文件(/tmp目录需要至少400mb)...所以10g的硬盘空间已经是最低配置了,因为你可能还需要应付一些特殊情况。
2)内存1.5g以上
官方文档说512m内存也可以安装。是的,确实如此,但安装后能不能正常运行,我就不敢保证了...之前我用一台1g内存的虚拟机安装oracle 10g,正要启动的时候提示:剩余内存不足。为了避免不必要的麻烦,请把内存加多一些。
3)swap交换区2g
三.在centos 5.3安装oracle 10g
1.预备资源
1】《oracel 10g官方安装文档》
2】 安装包:10201_database_linux_x86_64.cpio.gz
2.centos 5.3安装oracle 10g
1】准备安装
为了避免缺包导致的error,请在安装oracle之前执行以下命令:
yum install yum-fastestmirror -yyum install compat-db*yum install compat-libc*yum install compat-gcc*yum install libxp.so.6yum install libc-*yum install libaio*yum install openmotifyum install glibc-devel*yum install libgcc*yum install gnome-lib*
2】centos 5.3安装oracle包解压
zcat /tmp/10201_database_linux_x86_64.cpio.gz /data/setupfiles/oracle/ | cpio -idmv
3】创建 centos 5.3安装oracle 组和用户帐户
创建用于安装和维护oracle 10g 软件的账户。用户帐户将称为oracle,而组将称为oinstall和dba。以root用户身份执行以下命令:
# /usr/sbin/groupadd oinstall# /usr/sbin/groupadd dba# /usr/sbin/useradd -m -g oinstall -g dba oracle# id oracleuid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba)
设置oracle帐户的口令
# passwd oraclechanging password for user oracle.new password:retype new password:passwd:all authentication tokens updated successfully.
4】创建目录
创建oracle 10g及其数据库文件的目录,以root用户身份执行以下命令:
# mkdir -p /data1/oracle# mkdir -p /data1/oradata# chown -r oracle:oinstall /data1/oracle /data1/oradata# chmod -r 775 /data1/oracle /data1/oradata
5】修改内核参数
centos 5.3安装oracle 10g需修改内核参数,否则安装检测时会报failed,甚至导致安装时出现error。以root身份执行以下命令:
cat >> /etc/sysctl.conf 如果检查没有问题后,即可以开始装oralce 10g。
6】centos 5.3安装oracle 10g
1)先以centos 5.3安装oracle用户身份登陆xwindow。因为oracle安装会弹出界面让你配置,如果使用putty登陆安装的话,你是没有办法操作弹出框的,所以一定要登录xwindow,然后在terminal里启动安装程序。
另外一个问题就是,必须要用oracle用户登陆xwindow,并以oracle用户在terminal中启动安装程序。为什么不用root权限呢?首先,以root用户登录xwindow并启动安装程序会出错,提示“the user is root. oracle universal installer cannot continue installation if the user is root.”。如果以root登陆xwindow,以oracle用户在terminal中启动安装程序,可能会出现某些对话框弹不出来,导致安装卡死的情况,这种情况之前我就遇到过,虽然不能百分百确定是root登陆xwindow导致的问题,但为了避免不必要的问题,还是以oracle用户登录xwindow,并用oracle身份启动安装程序。
2)如果你的系统语言为中文,请把他设置为英文,否则安装的时候会出现乱码。
3)terminal中启动oracle 10g安装程序:
[oracle@vmlincn80ce5 /]$ ./data/setupfiles/oracle/database/runinstaller如果一切正常,界面会弹出如下对话框:
如果在terminal启动runinstaller时遇到“checking operating system version: must be redhat-2.1, redhat-3, suse-9, suse-8 or unitedlinux-1.0 failed ”这种问题,表明oracle不能识别你的系统内核,这个问题可以通过修改内核配置文件解决,,如下:
cat > /etc/redhat-release 4)centos 5.3安装oracle 10g配置
修改oralce home localtion,填写database password后,按“next”。如图:
5)数据库配置
修改inventory directory,specify operating system group name选:oinstall,然后“next”,如图:
6)centos 5.3安装oracle前检查
检查一下有什么不符合安装要求,看是否需要修改配置,如果按照上面步骤下来,这里的warning应该为0,然后“next”。
7)install oracle 10g
直接按“install”。
8)installing...
现在你可以去泡壶乌龙茶了......如果在虚拟机上安装,会花时间会更长些......zzzzzzz
9)configuration assistant
在软件centos 5.3安装oracle完成之后,会自动进行configuration assistant的配置。
包括了oracle net configuration assistant,oracle database configuration assistant,isql*plus configuration assistant的配置。
当oracle database configuration assistant配置完成时,会弹出一个确认框,里面记录了一些比较重要的信息,包括:sid,server parameter filename以及database control url等,这些信息以后比较有用,可以记录下来,然后“ok”。
10)以root权限运行脚本
当isql*plus configuration assistant配置完成时,会弹出一下框,里面有两个srcipt需要你用root权限运行。
在terminel中以root权限执行以上两个脚本:
[root@vmlincn80ce5 oradata]# ./orainstroot.shchanging permissions of /data1/oradata to 770.changing groupname of /data1/oradata to oinstall.the execution of the script is complete[root@vmlincn80ce5 oracle]# ./root.shrunning oracle10 root.sh script...the following environment variables are set as:    oracle_owner= oracle    oracle_home=  /data1/oracleenter the full pathname of the local bin directory: [/usr/local/bin]:    copying dbhome to /usr/local/bin ...   copying oraenv to /usr/local/bin ...   copying coraenv to /usr/local/bin ...creating /etc/oratab file...entries will be added to the /etc/oratab file as needed bydatabase configuration assistant when a database is createdfinished running generic part of root.sh script.now product-specific root actions will be performed.
然后按“ok”。
11)oracle 10g安装完成
恭喜,centos 5.3安装oracle 10g完成了:>,按“exit”退出安装。
三.后记
其实现在看来,centos 5.3安装oracle 10g其实也并不是那么难搞,主要是在安装途中,可能会报出各种各样的warnning/error,这多数是系统缺少某些包导致的,如果把“【2.1】准备安装”中的提到的包都装了,这类的问题应该基本上解决了(实在不行就google吧...)。然后就是硬盘空间问题,每次oracle安装都会在/tmp下生成400mb左右的临时文件,如果安装中途出错退出的话,这些文件好像是不会自动删除的,所以记得把这些垃圾清掉,否则很容易导致硬盘空间不足。
曲靖分类信息网,免费分类信息发布

VIP推荐

免费发布信息,免费发布B2B信息网站平台 - 三六零分类信息网 沪ICP备09012988号-2
企业名录 Product