问题:由于部分新购服务器,只支持安装linux 6.X
矛盾:应用服务只支持Oracle 10g,而Oracle 10g官方只支持 Linux 4
迷茫:Linux 6.X安装Oracle 10g过程中会遇到较多异常
破解:现整理《安装oracle 10g on Redhat 6.8》,帮助大家快速安装Oracle 10g。
操作系统 : Redhat 6.8
数据库版本: Oracle 10.2.0.1>>升级到Oracle 10.2.0.5
虚拟机 : VMware-workstation-full-11.1.2.61471.1437365244

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

环境搭建部分请参考star之前的文章 《star带你玩转Oracle-零基础openfiler共享存储安装Oracle 11G RAC》
Redhat 6.8操作系统_安装 : http://blog.itpub.net/31442014/viewspace-2138822/
Red Hat Enterprise Linux Server release 4.0 (Santiago) 将6.8修改为4.0
[root@oracle10g ~]# mount /dev/cdrom /mnt
mount: you must specify the filesystem type

[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

root执行脚本
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
root执行脚本
cat >> /etc/security/limits.conf
<<EOF
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF
cat >> /etc/pam.d/login <<EOF
#for oracle
session required pam_limits.so
EOF
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
/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/useradd -g oinstall -G dba oracle
/bin/echo "oracle"
|/usr/bin/passwd --stdin oracle
root执行脚本
mkdir -p /u01/app/oracle
chown -R oracle:oinstall
/u01/app/oracle
chmod -R 775 /u01/app/oracle
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
将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
创建软件上传目录
[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
安装数据库前重启数据库服务器
reboot
以oracle账号登陆操作系统(不要使用su oracle或su – oracle,直接使用oracle登陆)
[oracle@oracle10g soft]$ export DISPLAY=192.168.1.11:0.0
[oracle@oracle10g database]$ ./runInstaller







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账号,执行以下脚本

[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


请参考star同学以下文档,
http://blog.itpub.net/31442014/viewspace-2138838/ 21、创建数据库实例来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31442014/viewspace-3142950/ ,如需转载,请注明出处,否则将追究法律责任。