Oracle10g(二)- CentOS6图形安装

一、约定

安装在Centos 6.10中通过。

二、启动图形界面,登录oracle账号

如果远程登录图形界面,需要安装vnc server  

终端安装

startx

登录oracle 用户(不建议使用root su oracle 方式,会产生各种问题)

centos6安装repo centos6.10安装_centos

三、在图形界面终端运行

  1. 运行./runInstaller
  2. centos6安装repo centos6.10安装_centos_02

  3. 选择高级安装
  4. centos6安装repo centos6.10安装_centos_03

  5. 添加中文
  6. centos6安装repo centos6.10安装_centos6安装repo_04

  7. 安装目录
  8. centos6安装repo centos6.10安装_centos_05

  9. 检查约束
  10. centos6安装repo centos6.10安装_oracle_06

  11. 创建数据库
  12. centos6安装repo centos6.10安装_oracle_07

  13. 安装类型
  14. centos6安装repo centos6.10安装_oracle_08

  15. 修改数据库字符集
  16. centos6安装repo centos6.10安装_centos6安装repo_09

  17. 设置数据库管理
  18. centos6安装repo centos6.10安装_oracle_10

  19. 选择存储类型
  20. centos6安装repo centos6.10安装_centos6安装repo_11

  21. 不启用自动备份
  22. centos6安装repo centos6.10安装_数据库_12

  23. 设置数据库密码
  24. centos6安装repo centos6.10安装_oracle_13

  25. 安装摘要
  26. centos6安装repo centos6.10安装_centos_14

  27. 安装异常处理
    遇到异常优先考虑是否遗漏*.686的包,参见“Oracle10g(一)中安装先决条件检查”
    遇到异常安装patch-for-10g_install.tar补丁包
tar -xvf patch-for-10g-install.tar
cd path
./patch-for-10g-install.sh /data/database/oracle/product/10.2.0/dbhome_1/

centos6安装repo centos6.10安装_linux_15

  1. 安装异常处理
  2. centos6安装repo centos6.10安装_centos6安装repo_16

  3. 安装异常处理
  4. centos6安装repo centos6.10安装_centos6安装repo_17

  5. 因为已经配置/etc/hosts中hostname,所以上述错误不一定出现
  6. 安装异常处理
  7. centos6安装repo centos6.10安装_centos_18

  8. 因为提前配置了/etc/sysctl.conf中vm.hugetlb_shm_group,所以上述错误不一定出现
  9. 安装异常处理
重新安装oracle时,没有orainstRoot.sh文件 
重新安装RAC时,到excute configuration scripts时,只提示运行:/opt/ora10g/product/10.2.0/crs_1/root.sh这个文件,
不提示/opt/ora10g/oraInventory/orainstRoot.sh;这个文件,是为什么?

原因:
没删除/etc/oraInst.loc文件

centos6安装repo centos6.10安装_centos_19

// 执行 orainstRoot.sh
[root@linux7-100 patch]# cd /data/database/oracle/oraInventory
[root@linux7-100 oraInventory]# ls
Contents  ContentsXML  install.platform  logs  oraInstaller.properties  oraInst.loc  orainstRoot.sh  oui  sessionContext.ser
[root@linux7-100 oraInventory]# sh orainstRoot.sh 
Changing permissions of /data/database/oracle/oraInventory to 770.
Changing groupname of /data/database/oracle/oraInventory to oinstall.
The execution of the script is complete
// 执行 root.sh,因为是重装所以/usr/local/bin下已经有文件
[root@linux7-100 dbhome_1]# cd /data/database/oracle/product/10.2.0/dbhome_1
[root@linux7-100 dbhome_1]# ls root.sh
root.sh
[root@linux7-100 dbhome_1]# sh root.sh
Running Oracle10 root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /data/database/oracle/product/10.2.0/dbhome_1

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
The file "dbhome" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: y
   Copying dbhome to /usr/local/bin ...
The file "oraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: y
   Copying oraenv to /usr/local/bin ...
The file "coraenv" already exists in /usr/local/bin.  Overwrite it? (y/n) 
[n]: y
   Copying coraenv to /usr/local/bin ...

Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
[root@linux7-100 dbhome_1]#
  1. 安装完成
  2. 安装测试

====

[root@linux7-100 shijin]# ll
总用量 2296564
-rw-r--r-- 1 root root 1239269270 11月 19 23:15 linux.x64_11gR2_database_1of2.zip
-rw-r--r-- 1 root root 1111416131 11月 19 22:45 linux.x64_11gR2_database_2of2.zip
-rw-r--r-- 1 root root     665600 4月   6 11:42 patch-for-10g-install.tar
drwxrwxr-x 8 1000 1000       4096 11月 25 10:04 rlwrap-0.43
-rw-r--r-- 1 root root     313139 11月 25 10:03 rlwrap-0.43.tar.gz
[root@linux7-100 shijin]# tar -xvf patch-for-10g-install.tar 
patch/
patch/libirc.a
patch/libnmadbg.a
patch/libnmcbuf.a
patch/libnmccol.a
patch/snmccolm.o
patch/patch-for-10g-install.sh
[root@linux7-100 shijin]# cd patch
[root@linux7-100 patch]# ll
总用量 652
-rw-r--r-- 1 oracle oinstall 380188 7月  26 2019 libirc.a
-rw-r--r-- 1 oracle oinstall  36628 7月  26 2019 libnmadbg.a
-rw-r--r-- 1 oracle oinstall 148152 7月  26 2019 libnmcbuf.a
-rw-r--r-- 1 oracle oinstall  77056 7月  26 2019 libnmccol.a
-rwxr-xr-x 1 oracle oinstall    372 7月  26 2019 patch-for-10g-install.sh
-rw-r--r-- 1 oracle oinstall  12976 7月  26 2019 snmccolm.o
[root@linux7-100 patch]# ./patch-for-10g-install.sh /data/database/oracle/product/10.2.0/dbhome_1/
/data/database/oracle/product/10.2.0/dbhome_1/
processing : libnmadbg.a
processing : libnmcbuf.a
processing : libnmccol.a
processing : snmccolm.o
processing : libirc.a
done!
[root@linux7-100 patch]# ll /data/database/oracle/product/10.2.0/dbhome_1/lib/libirc.a*
-rw-rw---- 1 oracle oinstall 380188 4月   6 23:20 /data/database/oracle/product/10.2.0/dbhome_1/lib/libirc.a
-rw-r----- 1 root   root     380188 4月   6 23:20 /data/database/oracle/product/10.2.0/dbhome_1/lib/libirc.a.bak
[root@linux7-100 patch]# ll /data/database/oracle/product/10.2.0/dbhome_1/sysman/lib/*.bak
-rw-r--r-- 1 root root  36628 4月   6 23:20 /data/database/oracle/product/10.2.0/dbhome_1/sysman/lib/libnmadbg.a.bak
-rw-r----- 1 root root 148152 4月   6 23:20 /data/database/oracle/product/10.2.0/dbhome_1/sysman/lib/libnmcbuf.a.bak
-rw-r----- 1 root root  77056 4月   6 23:20 /data/database/oracle/product/10.2.0/dbhome_1/sysman/lib/libnmccol.a.bak
-rw-r----- 1 root root  12976 4月   6 23:20 /data/database/oracle/product/10.2.0/dbhome_1/sysman/lib/snmccolm.o.bak
[root@linux7-100 patch]#

centos6安装repo centos6.10安装_oracle_20

[root@linux7-100 patch]# id oracle
uid=502(oracle) gid=502(oinstall) 组=502(oinstall),503(dba),504(oper)
[root@linux7-100 patch]# more /proc/sys/vm/hugetlb_shm_group
0
[root@linux7-100 patch]# echo 503 > /proc/sys/vm/hugetlb_shm_group
[root@linux7-100 patch]# more /proc/sys/vm/hugetlb_shm_group
503
[root@linux7-100 patch]#

==可以在/etc/sysctl.conf中优先配置vm.hugetlb_shm_group=503 ==

centos6安装repo centos6.10安装_centos6安装repo_21


centos6安装repo centos6.10安装_centos6安装repo_22

cd /data/database/oracle/database
./runInstaller -ignoreSysPrereqs

异常现象:./runInstaller 弹出框很小或为一条竖线(CentOS7)
使用./runInstaller -jreLoc /etc/alternatives/jre_1.8.0方法,会报无法找到JAVA运行环境

解决办法“runInstaller -ignoreSysPrereqs” 方式运行,弹出框虽然也很小,但可以拖拽变大

图形安装Oracle10g

  1. 忽略警告,直接跳过,选择安装数据库软件
  2. centos6安装repo centos6.10安装_centos_23

  3. 选择安装数据库软件
  4. centos6安装repo centos6.10安装_oracle_24

  5. 选择安装语言(待确认)
  6. centos6安装repo centos6.10安装_centos6安装repo_25

  7. 指定安装路径
  8. centos6安装repo centos6.10安装_数据库_26

  9. 验证检查
  10. centos6安装repo centos6.10安装_linux_27


  11. centos6安装repo centos6.10安装_linux_28

  12. 选择创建并配置数据库
  13. centos6安装repo centos6.10安装_数据库_29

  14. 选择用途和字符集
  15. centos6安装repo centos6.10安装_数据库_30


  16. centos6安装repo centos6.10安装_centos6安装repo_31

  17. 选择 Server Class
  18. centos6安装repo centos6.10安装_linux_32

    centos6安装repo centos6.10安装_数据库_33

  19. 不启用备份
  20. centos6安装repo centos6.10安装_centos_34

  21. 选择使用同样的密码
  22. centos6安装repo centos6.10安装_centos6安装repo_35

  23. 开始安装
  24. centos6安装repo centos6.10安装_数据库_36

[root@centos7-18 lib]# cd /data/database/oraInventory/
[root@centos7-18 oraInventory]# ll orainstRoot.sh 
-rwxrwx--- 1 oracle oinstall 1677 12月 21 19:51 orainstRoot.sh
[root@centos7-18 oraInventory]# ./orainstRoot.sh 
Changing permissions of /data/database/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /data/database/oraInventory to oinstall.
The execution of the script is complete.
[root@centos7-18 oraInventory]#
[root@centos7-18 oraInventory]# cd /data/database/oracle/product/11.2.0/
[root@centos7-18 11.2.0]# ll root.sh
-rwxr-x--- 1 oracle oinstall 500 12月 21 19:51 root.sh
[root@centos7-18 11.2.0]# ./root.sh
Running Oracle 11g root.sh script...

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /data/database/oracle/product/11.2.0

Enter 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 by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.

安装完成