rhel7.2安装oracle 12C
admin
2023-04-18 02:02:00
0

OS:RHEL7.2

ORACLE 12C


step1:安装必需的rpm包

yum install binutils libX11 compat-libcap1 libXau compat-libstdc++-33 libaio gcc libaio-devel gcc-c++ libdmx glibc-devel glibc ksh make libgcc sysstat libstdc++ xorg-x11-utils libstdc++-devel xorg-x11-xauth libXext libXv libXtst libXi libxcb libXt libXmu libXxf86misc libXxf86dga libXxf86vm nfs-utils smartmontools


step2:修改内核参数

vim /etc/sysctl.d/98-oracle-kernel.conf

vm.swappiness = 1

vm.dirty_background_ratio = 3

vm.dirty_ratio = 80

vm.dirty_expire_centisecs = 500

vm.dirty_writeback_centisecs = 100

kernel.sem = 250 32000 100 128

fs.aio-max-nr = 1048576

net.ipv4.ip_local_port_range = 9000 65500

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

kernel.msgmnb = 65536

kernel.msgmax = 65536

kernel.shmmax = 8589934590  ==8G,大于SGA即可

kernel.shmall = 2147483648     ==8G

kernel.shmmni = 4096

sysctl -p /etc/sysctl.d/98-oracle-kernel.conf


step3:设置用户限制

vim /etc/security/limits.d/99-grid-oracle-limits.conf

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

oracle soft stack 10240

oracle hard stack 32768


step4:添加用户

groupadd --gid 54321 oinstall

groupadd --gid 54322 dba

groupadd --gid 54326 oper

groupadd --gid 54327 backupdba

groupadd --gid 54328 dgdba

groupadd --gid 54329 kmdba

useradd --uid 54321 --gid oinstall --groups dba,oper,backupdba,dgdba,kmdba oracle

echo "oracle"|passwd --stdin oracle


step5:设置目录

mkdir -p /u01/app/12.2.0/grid

chown -R oracle.oinstall /u01

chmod -R 755 /u01


step6:设置环境变量

su - oracle

vim .bash_profile

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1

export ORACLE_SID=orcl

export PATH=$ORACLE_HOME/bin:$PATH; 


step7:开始安装

su - root

xhost +

su - oracle

[oracle@oracle12c database]$ ./runInstaller

Starting Oracle Universal Installer...

Checking Temp space: must be greater than 500 MB.   Actual 7211 MB    Passed

Checking swap space: must be greater than 150 MB.   Actual 1023 MB    Passed

Checking monitor: must be configured to display at least 256 colors

    >>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set.    Failed <<<<

Some requirement checks failed. You must fulfill these requirements before

continuing with the installation,

Continue? (y/n) [n] y

>>> Ignoring required pre-requisite failures. Continuing...

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2018-08-11_01-14-29AM. Please wait ...

DISPLAY not set. Please set the DISPLAY and try again.

Depending on the Unix Shell, you can use one of the following commands as examples to set the DISPLAY environment variable:

- For csh:              % setenv DISPLAY 192.168.1.128:0.0

- For sh, ksh and bash:     $ DISPLAY=192.168.1.128:0.0; export DISPLAY

Use the following command to see what shell is being used:

    echo $SHELL

Use the following command to view the current DISPLAY environment variable setting:

    echo $DISPLAY

- Make sure that client users are authorized to connect to the X Server.

To enable client users to access the X Server, open an xterm, dtterm or xconsole as the user that started the session and type the following command:

% xhost +

To test that the DISPLAY environment variable is set correctly, run a X11 based program that comes with the native operating system such as 'xclock':

    %

If you are not able to run xclock successfully, please refer to your PC-X Server or OS vendor for further assistance.

Typical path for xclock: /usr/X11R6/bin/xclock


之后尝试设置了多次$DISPLAY,都不行,如下

DISPLAY=192.168.107.155:0.0;export $DISPLAY

DISPLAY=192.168.107.155:1.0;export $DISPLAY

DISPLAY=192.168.107.155:0.1export $DISPLAY

DISPLAY=:0;export $DISPLAY

DISPLAY=:1;export $DISPLAY

之后我在root的一个窗口执行xclock,发现没有clock,之后安装了xorg-x11-apps(yum install xorg-x11-apps),使用root的xclock就可以看到clock了

之后su - oracle还是看不到clock

之后到root窗口echo $DISPLAY发现是:0,所以我在oracle窗口也设置

    DISPLAY=:0;export $DISPLAY

之后就可以正常的图形化安装了


安装过程截图:

rhel7.2安装oracle 12Crhel7.2安装oracle 12C

rhel7.2安装oracle 12C

rhel7.2安装oracle 12C

rhel7.2安装oracle 12C

rhel7.2安装oracle 12C

rhel7.2安装oracle 12C

rhel7.2安装oracle 12C

rhel7.2安装oracle 12C

这里用fix来修复一下

rhel7.2安装oracle 12C

rhel7.2安装oracle 12C

rhel7.2安装oracle 12C

忽略swap报警,我这里只给swap分了1G

rhel7.2安装oracle 12Crhel7.2安装oracle 12C

rhel7.2安装oracle 12Crhel7.2安装oracle 12C

rhel7.2安装oracle 12C

rhel7.2安装oracle 12C


step8:DBCA建库

rhel7.2安装oracle 12Crhel7.2安装oracle 12C


在这里你可以选择典型配置,也可以选择自定义配置,我选择的是自定义(advanced configuration)

rhel7.2安装oracle 12Crhel7.2安装oracle 12C

rhel7.2安装oracle 12C

rhel7.2安装oracle 12Crhel7.2安装oracle 12C

rhel7.2安装oracle 12C

rhel7.2安装oracle 12Crhel7.2安装oracle 12C


rhel7.2安装oracle 12C


rhel7.2安装oracle 12C


创建listner,叫listner1

rhel7.2安装oracle 12Crhel7.2安装oracle 12C

rhel7.2安装oracle 12Crhel7.2安装oracle 12C


给SGA分6G,pga 500M,这是测试库,就我一个人用

rhel7.2安装oracle 12Crhel7.2安装oracle 12C

rhel7.2安装oracle 12Crhel7.2安装oracle 12C

rhel7.2安装oracle 12Crhel7.2安装oracle 12C

rhel7.2安装oracle 12C

rhel7.2安装oracle 12C

安装sample

rhel7.2安装oracle 12Crhel7.2安装oracle 12C

rhel7.2安装oracle 12C

rhel7.2安装oracle 12Crhel7.2安装oracle 12C

rhel7.2安装oracle 12Crhel7.2安装oracle 12C

rhel7.2安装oracle 12C

rhel7.2安装oracle 12Crhel7.2安装oracle 12C

rhel7.2安装oracle 12C


rhel7.2安装oracle 12C


安装完成

SYS@orcl> select host_name,version from v$instance;

HOST_NAME                 VERSION

---------------------------------------- -----------------

oracle12c                 12.2.0.1.0


SYS@orcl> !lsnrctl status

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 14-AUG-2018 00:59:07

Copyright (c) 1991, 2016, Oracle.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))

STATUS of the LISTENER

------------------------

Alias                     LISTENER

Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production

Start Date                14-AUG-2018 00:12:27

Uptime                    0 days 0 hr. 46 min. 44 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /u01/app/oracle/product/12.1.0/db_1/network/admin/listener.ora

Listener Log File         /u01/app/oracle/diag/tnslsnr/oracle12c/listener/alert/log.xml

Listening Endpoints Summary...

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle12c)(PORT=1521)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=oracle12c)(PORT=5500))(Security=(my_wallet_directory=/u01/app/oracle/admin/orcl/xdb_wallet))(Presentation=HTTP)(Session=RAW))

Services Summary...

Service "7351e8ae5372218ee0539b6ba8c08d05" has 1 instance(s).

  Instance "orcl", status READY, has 1 handler(s) for this service...

Service "orcl" has 1 instance(s).

  Instance "orcl", status READY, has 1 handler(s) for this service...

Service "orclXDB" has 1 instance(s).

  Instance "orcl", status READY, has 1 handler(s) for this service...

Service "orclpdb" has 1 instance(s).

  Instance "orcl", status READY, has 1 handler(s) for this service...

The command completed successfully


rhel7.2安装oracle 12C

相关内容

热门资讯

徐巧芯剖析赖清德:最怕自己丢掉... 海峡导报综合报道 大罢免投票一周年纪念活动26日举行,台北市长蒋万安出席并怒轰,民进党一年过后仍没有...
中国红十字会总会紧急向广东调拨... 记者从中国红十字会总会了解到,针对台风“红霞”给广东造成的灾情,中国红十字会总会启动四级应急响应,紧...
这些少年,正被“毒蛋”围猎 李梦抽了几口电子烟,吐出了白色的烟雾,有一股浓烈的水果香味。随后,她看着自己握电子烟的手,跟身边人说...
蒋万安号召“倒阁”,卢秀燕认为... 海峡导报综合报道 台北市长蒋万安27日抛出震撼议题,表示多名民代向他提议推动“倒阁”,要求台行政机构...
特朗普将在白宫会见两位重要客人 俄乌战争仍未结束,美伊冲突又有升级风险。在此背景下,美国总统特朗普将在白宫接见乌克兰和以色列领导人。...
新租客打扫卧室柜子上掉落4万元... 近日,莲前西路某小区内,张倩签下一套房子的租赁合同。当天上午,她带着12岁的大女儿周馨怡和11岁的小...
六部门通告:禁止涉军队退役报废... 关于禁止涉军队退役报废装备销售活动的通告近年来,部分经营者在线上线下公开销售涉及我军退役报废装备(指...
九寨沟景区发生泥石流,部分道路... 7月26日,九寨沟风景名胜区管理局发布泥石流灾害通报:2026年7月26日15时50分,九寨沟景区局...
空调26度不凉是什么原因 从空调内部元器件来说,不凉的原因有可能是温度传感器出现故障了,也有可能是空调压缩机或者铜管出现问题,...
鲸鸿动能携手香港国际机场、鸿蒙...   2026 年 7 月 25 日,十余位鸿蒙车主组成的车队从珠海出发,经港珠澳大桥通关抵达香港国际...