star带你玩转Oracle_2_安装oracle 10g on Redhat 6.8_orastar

1、实验目标


问题:由于部分新购服务器,只支持安装linux 6.X

矛盾:应用服务只支持Oracle 10g,Oracle 10g官方只支持 Linux 4

迷茫Linux 6.X安装Oracle 10g过程中会遇到较多异常

破解:现整理《安装oracle 10g on Redhat 6.8》,帮助大家快速安装Oracle 10g

2、环境介绍


   操作系统 Redhat 6.8

   数据库版本: Oracle 10.2.0.1>>升级到Oracle 10.2.0.5

   虚拟机         VMware-workstation-full-11.1.2.61471.1437365244

3、讲师介绍




安装过程如有疑问,欢迎添加微信咨询。

4、软件下载



链接:http://pan.baidu.com/s/1qYAsEFM 密码:ok1o

5、环境搭建


环境搭建部分请参考star之前的文章 《star带你玩转Oracle-零基础openfiler共享存储安装Oracle 11G RAC

Redhat 6.8操作系统_安装  http://blog.itpub.net/31442014/viewspace-2138822/

 

6、操作系统配置


6.1    修改/etc/hosts

root执行脚本


  1. cat >> /etc/hosts <<EOF
  2. #Public
  3. 192.168.1.121 oracle10g
  4. EOF


6.2    修改/etc/redhat-release

Red Hat Enterprise Linux Server release 4.0 (Santiago)   6.8修改为4.0

6.3    配置YUM

6.3.1   首次挂载报错

[root@oracle10g ~]# mount /dev/cdrom /mnt

mount: you must specify the filesystem type

6.3.2   处理报错方法


[root@htdb1 ~]# mount /dev/cdrom /mnt

mount: block device /dev/sr0 is write-protected, mounting read-only

 

#vi /etc/yum.repos.d/rhel-source.repo  --说明: 先清空该文件,再添加以下内容。   有同学反应,yum无法正常安装rpm包,因为没有正常该文件造成。

[rhel-oracle-lib]

name=oracle

baseurl=file:///mnt

enabled=1

gpgcheck=0

 

#yum clean all

#yum list |head



6.4    安装RPM

root执行脚本



  1. yum install -y binutils compat-db control-center gcc gcc-c++ glibc glibc-common libstdc++ libstdc++-devel make pdksh sysstat

  2. yum install libXp-1.0.2-2.1.el6.i686.rpm
  3. yum install libXp-devel.i686
  4. yum install glibc-devel-2.12-1.192.el6.i686.rpm

  5. [root@oracle10g ~]# cd /mnt/Packages/
  6. [root@oracle10g Packages]# rpm -ivh --force libXp-1.0.2-2.1.el6.i686.rpm
  7. [root@oracle10g Packages]# yum install –y libXt.i686
  8. [root@oracle10g Packages]# yum install –y libXtst.i686
  9. [root@oracle10g Packages]# yum install -y libgcc-4.4.7-17.el6.i686.rpm
  10. [root@oracle10g soft]# rpm -ivh pdksh-5.2.14-30.x86_64.rpm
  11. [root@oracle10g Packages]# yum install -y binutils-devel-2.20.51.0.2-5.44.el6.x86_64.rpm
  12. [root@oracle10g Packages]# yum install -y binutils-devel-2.20.51.0.2-5.44.el6.i686.rpm
  13. [root@oracle10g Packages]# yum install -y compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm [root@oracle10g Packages]# yum install -y compat-libstdc++-33-3.2.3-69.el6.i686.rpm

6.5    关闭防火墙及selinux

root执行脚本


  1. /sbin/iptables -F; /sbin/ip6tables -F
  2. /sbin/chkconfig iptables off; /sbin/chkconfig ip6tables off

  3. /bin/sed -i s/SELINUX=enforcing/SELINUX=disabled/ /etc/selinux/config
  4. /usr/sbin/setenforce 0

6.6    修改/etc/sysctl.conf参数

 

cat >> /etc/sysctl.conf <<EOF

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 = 262144

net.core.rmem_max = 262144

net.core.wmem_default = 262144

net.core.wmem_max = 262144

EOF


 

6.7    修改/etc/security/limits.conf参数

root执行脚本


cat >> /etc/security/limits.conf <<EOF

oracle           soft    nproc   2047

oracle           hard    nproc   16384

oracle           soft    nofile  1024

oracle           hard    nofile  65536

EOF


6.8    修改/etc/pam.d/login参数(root执行脚本)

cat >> /etc/pam.d/login <<EOF

#for oracle

session    required     pam_limits.so

EOF


6.9    修改/etc/profile参数

root执行脚本


cat >> /etc/profile <<EOF

#for oracle

if [ \$USER = "oracle" ] || [ \$USER = "grid" ]; then

if [ \$SHELL = "/bin/ksh" ]; then

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

fi

EOF


 

 

6.10    创建用户


/usr/sbin/groupadd oinstall

/usr/sbin/groupadd dba

/usr/sbin/useradd -g oinstall -G dba oracle              

/bin/echo "oracle" |/usr/bin/passwd --stdin oracle


 

6.11    创建目录

root执行脚本


mkdir -p /u01/app/oracle

chown -R oracle:oinstall /u01/app/oracle

chmod -R 775 /u01/app/oracle


 

 

 

6.12    修改环境变量

root执行脚本


ORACLE用户:

cat >> /home/oracle/.bash_profile <<EOF

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=\$ORACLE_BASE/product/11.2.0/db_1

export ORACLE_SID=oracle10g

export NLS_LANG=AMERICAN_AMERICA.AL32UTF8

export LD_LIBRARY_PATH=\$ORACLE_HOME/lib

export PATH=\$ORACLE_HOME/OPatch:\$ORACLE_HOME/bin:\$PATH

umask=022

EOF



6.13    修改hugetlb_shm_group

将oracle的dba组的gid写入/proc/sys/vm/hugetld_shm_group文件中

[root@oracle10g Packages]# id oracle

uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba)

[root@oracle10g Packages]# cat /proc/sys/vm/hugetlb_shm_group

0

[root@oracle10g Packages]# echo vm.hugetlb_shm_group=500 >> /etc/sysctl.conf

[root@oracle10g Packages]# sysctl -p

7、上传解压安装文件


创建软件上传目录

[root@oracle10g u01]# mkdir -p /u01/soft

[root@oracle10g u01]# chown -R oracle:oinstall /u01/soft

 

查看上传软件

[oracle@oracle10g soft]$ ls -ltr

total 1961236

-rw-r--r--. 1 oracle oinstall  758433170 May 17 11:17 10201_database_linux_x86_64.cpio.gz

-rw-r--r--. 1 oracle oinstall 1249857866 May 17 11:19 p8202632_10205_Linux-x86-64.zip

 

解压安装文件

1. gunzip 10201_database_linux_x86_64.cpio.gz

得到10201_database_linux_x86_64.cpio文件

2. cpio -idmv <10201_database_linux_x86_64.cpio

 

 

8、重启数据库服务器


安装数据库前重启数据库服务器

reboot

9、安装10.2.0.1


以oracle账号登陆操作系统(不要使用su oracle或su – oracle,直接使用oracle登陆)

[oracle@oracle10g soft]$ export DISPLAY=192.168.1.11:0.0

[oracle@oracle10g database]$ ./runInstaller


9.1    问题解决'collector' ins_emdb.mk

Exception String: Error in invoking target 'collector' of makefile '/u01/app/oracle/product/11.2.0/db_1/sysman/lib/ins_emdb.mk'

 

1. The popup error concerning the linking of target "collector" at about 83% of the linking process of the 10.2.0.1 base-release install should be ignored.
2. Apply 10.2.0.4 or 10.2.0.5 patchset

参考文档:

Install Of 10.2.0.1 On SLES 11 X86-64 Fails with Error:"Error In Invoking Target 'Collector' Of Makefile '$ORACLE_HOME/sysman/lib/ins_emdb.mk'" (Doc ID 957982.1)

 

分别使用root账号, 执行以下脚本


10、升级10.2.0.5


[root@oracle10g soft]# chown oracle:oinstall p8202632_10205_Linux-x86-64.zip

[oracle@oracle10g soft]$ unzip p8202632_10205_Linux-x86-64.zip

[oracle@oracle10g soft]$ cd Disk1/

[oracle@oracle10g Disk1]$ ls

install  patch_note.htm  response  runInstaller  stage

[oracle@oracle10g Disk1]$ ./runInstaller

使用root账号,执行以下脚本

点击exit

11、创建实例


请参考star同学以下文档,

http://blog.itpub.net/31442014/viewspace-2138838/                21、创建数据库实例

恭喜大家,顺利在linux 6  上安装oracle 10G。


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31442014/viewspace-2139266/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/31442014/viewspace-2139266/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值