久久精品人人爽,华人av在线,亚洲性视频网站,欧美专区一二三

Oracle 12C R2單節點GRID+DATABASE如何安裝

135次閱讀
沒有評論

共計 11190 個字符,預計需要花費 28 分鐘才能閱讀完成。

這篇文章給大家分享的是有關 Oracle 12C R2 單節點 GRID+DATABASE 如何安裝的內容。丸趣 TV 小編覺得挺實用的,因此分享給大家做個參考,一起跟隨丸趣 TV 小編過來看看吧。

具體安裝過程如下

軟件包檢查

yum install -y binutils

yum install -y compat-libcap1

yum install -y compat-libstdc++-33

yum install -y compat-libstdc++-33.i686

yum install -y e2fsprogs

yum install -y e2fsprogs-libs

yum install -y glibc

yum install -y glibc.i686

yum install -y glibc-devel

yum install -y glibc-devel.i686

yum install -y ksh

yum install -y glibc-devel

yum install -y glibc-devel.i686

yum install -y libaio.i686

yum install -y libaio.i686

yum install -y libX11

yum install -y libX11.i686

yum install -y libXau

yum install -y libXau.i686

yum install -y libXi

yum install -y libXi.i686

yum install -y libXtst

yum install -y libXtst.i686

yum install -y libgcc

yum install -y libgcc.i686

yum install -y libstdc++

yum install -y libstdc++.i686

yum install -y libstdc++-devel

yum install -y libstdc++-devel.i686

yum install -y libxcb

yum install -y libxcb.i686

yum install -y make

yum install -y net-tools

yum install -y nfs-utils

yum install -y smartmontools

yum install -y sysstat

yum install -y unixODBC

yum install -y unixODBC.i686

目錄和用戶創建:

mkdir -p /u01/app

[root@jing1 app]# chown -R oracle:oinstall /u01

[root@jing1 app]# chown -R grid:oinstall /u01/app/grid

[root@jing1 app]# chmod -R 775 /u01

[root@jing1 app]# chown -R grid:oinstall /u01/app/12.2.0/

[root@jing1 app]# groupadd -g 1000 oinstall

[root@jing1 app]# groupadd -g 1200 asmadmin

[root@jing1 app]# groupadd -g 1201 asmdba

[root@jing1 app]# groupadd -g 1202 asmoper

[root@jing1 app]# groupadd -g 1300 dba

[root@jing1 app]# groupadd -g 1301 oper

useradd -u 1101 -g oinstall -G dba,oper,asmdba -d /home/oracle -s /bin/bash -c Oracle Software Owner oracle

useradd -u 1100 -g oinstall -G asmadmin,asmdba,asmoper -d /home/grid -s /bin/bash -c grid Infrastructure Owner grid

修改 host 文件

[root@jing1 ~]# more /etc/hosts

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4

::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

10.135.2.236 jing1

配置 profile

[grid@jing1 ~]$ more .bash_profile

# .bash_profile

# Get the aliases and functions

if [-f ~/.bashrc]; then

. ~/.bashrc

fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

export ORACLE_HOME=/u01/app/12.2.0/grid

umask 022

配置 oraInventory

[root@jing1 app]# more /etc/oraInst.loc

inventory_loc=/u01/app/oraInventory

inst_group=oinstall

修改 limit:

cp /etc/security/limits.conf /etc/security/limits.conf.bak

echo oracle soft nproc 2047 /etc/security/limits.conf

echo oracle hard nproc 16384 /etc/security/limits.conf

echo oracle soft nofile 1024 /etc/security/limits.conf

echo oracle hard nofile 65536 /etc/security/limits.conf

echo oracle   soft   stack    10240 /etc/security/limits.conf

echo oracle   hard   stack    32768 /etc/security/limits.conf

echo grid soft nproc 2047 /etc/security/limits.conf

echo grid hard nproc 16384 /etc/security/limits.conf

echo grid soft nofile 1024 /etc/security/limits.conf

echo grid hard nofile 65536 /etc/security/limits.conf

echo grid  soft   stack    10240 /etc/security/limits.conf

echo grid  hard   stack    32768 /etc/security/limits.conf

存儲創建

此處要說明一下,本單節點服務器創建了一個卷組 vg_jing1, 為了使用 asm 創建了一個邏輯卷 lv_asmdisk, 如下:

[root@jing1 vg_jing1]# ll /dev/vg_jing1/

total 0

lrwxrwxrwx 1 root root 7 Nov 30 16:34 lv_asmdisk – ../dm-3

lrwxrwxrwx 1 root root 7 Nov 30 16:22 lv_home – ../dm-2

lrwxrwxrwx 1 root root 7 Nov 30 16:22 lv_root – ../dm-0

lrwxrwxrwx 1 root root 7 Nov 30 16:22 lv_swap – ../dm-1

為了是 asm 能識別到該盤

chown grid:asmadmin /dev/dm-3

但是。。。這個權限會自動變回去如下:

[root@jing1 dev]# ll /dev/dm*

brw-rw—- 1 root disk 253, 0 Nov 30 16:22 /dev/dm-0

brw-rw—- 1 root disk 253, 1 Nov 30 16:22 /dev/dm-1

brw-rw—- 1 root disk 253, 2 Nov 30 16:22 /dev/dm-2

brw-rw—- 1 root disk 253, 3 Nov 30 16:42 /dev/dm-3

[root@jing1 dev]#

沒搞定,參考下面文檔,找找靈感

http://www.itpub.net/thread-2070853-1-1.html

參考:

http://blog.163.com/yanenshun@126/blog/static/1283881692014818902668/

具體方法如下:

使用 udev 修改 dm 文件權限:

vim /etc/udev/rules.d/12-dm-permissions.rules

[root@jing1 vg_jing1]# more /etc/udev/rules.d/12-dm-permissions.rules

ENV{DM_NAME}== vg_jing1-lv_asmdisk , OWNER:= grid , GROUP:= asmadmin , MODE:= 660 , SYMLINK+= iscsi/oraasm-$env{DM_NAME}

然后

/sbin/start_udev

后查看權限:

[root@jing1 vg_jing1]# ll /dev/dm*

brw-rw—- 1 root disk     253, 0 Nov 30 17:45 /dev/dm-0

brw-rw—- 1 root disk     253, 1 Nov 30 17:45 /dev/dm-1

brw-rw—- 1 root disk     253, 2 Nov 30 17:45 /dev/dm-2

brw-rw—- 1 grid asmadmin 253, 3 Nov 30 17:45 /dev/dm-3

成功修改

配置內核

cp /etc/sysctl.conf /etc/sysctl.conf.bak

echo fs.aio-max-nr = 1048576 /etc/sysctl.conf

echo fs.file-max = 6815744 /etc/sysctl.conf

echo kernel.shmall = 3288424 /etc/sysctl.conf

echo kernel.shmmax = 16836732928 /etc/sysctl.conf

echo kernel.shmmni = 4096 /etc/sysctl.conf

echo kernel.sem = 250 32000 100 128 /etc/sysctl.conf

echo net.ipv4.ip_local_port_range = 9000 65500 /etc/sysctl.conf

echo net.core.rmem_default = 262144 /etc/sysctl.conf

echo net.core.rmem_max = 4194304 /etc/sysctl.conf

echo net.core.wmem_default = 262144 /etc/sysctl.conf

echo net.core.wmem_max = 1048576 /etc/sysctl.conf

echo net.ipv4.tcp_wmem = 4096 16384 4194304 /etc/sysctl.conf

echo net.ipv4.tcp_rmem = 4096 87380 4194304 /etc/sysctl.conf

sysctl -p

關閉 selinux

[root@rac01 ntp]# setenforce 0

[root@rac01 ntp]# vim /etc/selinux/config

SELINUX=disabled

關閉防火墻

[root@storage ~]# service iptables stop

[root@storage ~]# chkconfig  iptables off

[grid@jing1 grid]$ ./gridSetup.sh

[root@jing1 grid]# ./root.sh

Performing root user operation.

The following environment variables are set as:

ORACLE_OWNER= grid

ORACLE_HOME=  /u01/app/12.2.0/grid

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 script.

Now product-specific root actions will be performed.

Using configuration parameter file: /u01/app/12.2.0/grid/crs/install/crsconfig_params

The log of current session can be found at:

/u01/app/grid/crsdata/jing1/crsconfig/roothas_2017-12-01_09-55-22AM.log

2017/12/01 09:55:24 CLSRSC-363: User ignored prerequisites during installation

LOCAL ADD MODE

Creating OCR keys for user grid , privgrp oinstall ..

Operation successful.

LOCAL ONLY MODE

Successfully accumulated necessary OCR keys.

Creating OCR keys for user root , privgrp root ..

Operation successful.

CRS-4664: Node jing1 successfully pinned.

2017/12/01 09:55:53 CLSRSC-330: Adding Clusterware entries to file oracle-ohasd.conf

CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on jing1

CRS-2673: Attempting to stop ora.evmd on jing1

CRS-2677: Stop of ora.evmd on jing1 succeeded

CRS-2793: Shutdown of Oracle High Availability Services-managed resources on jing1 has completed

CRS-4133: Oracle High Availability Services has been stopped.

CRS-4123: Oracle High Availability Services has been started.

jing1     2017/12/01 09:57:13     /u01/app/12.2.0/grid/cdata/jing1/backup_20171201_095713.olr     0

2017/12/01 09:57:19 CLSRSC-327: Successfully configured Oracle Restart for a standalone server

Oracle 12C R2 單節點 GRID+DATABASE 如何安裝

完成 grid 安裝,界面顯示如下:

[grid@jing1 grid]$ ./gridSetup.sh

Launching Oracle Grid Infrastructure Setup Wizard…

You can find the log of this install session at:

/u01/app/oraInventory/logs/GridSetupActions2017-12-01_09-32-38AM/gridSetupActions2017-12-01_09-32-38AM.log

在.bash_profile 中添加如下環境變量,其中 Oracle home 在安裝前已設置:

export ORACLE_SID=+ASM

export ORACLE_BASE=/u01/app/grid

export ORACLE_HOME=/u01/app/12.2.0/grid

export NLS_DATE_FORMAT= yyyy/mm/dd hh34:mi:ss

export TNS_ADMIN=$ORACLE_HOME/network/admin

export PATH=/usr/sbin:$PATH

export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/perl/bin/:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

umask 022

安裝 Oracle 數據庫:

編輯 oracle 用戶的 profile,添加

export ORACLE_SID=YCR12C

export ORACLE_BASE=/u01/app/oracle

export ORACLE_HOME=$ORACLE_BASE/product/12.2.0/db_1

export TNS_ADMIN=$ORACLE_HOME/network/admin

export PATH=/usr/sbin:$PATH

export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/perl/bin/:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib

export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

export NLS_DATE_FORMAT= yyyy/mm/dd hh34:mi:ss

umask 022

開始安裝

[oracle@jing1 database]$ ./runInstaller

Starting Oracle Universal Installer…

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

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

Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-12-01_10-12-43AM. Please wait …[oracle@jing1 database]$
Oracle 12C R2 單節點 GRID+DATABASE 如何安裝
Oracle 12C R2 單節點 GRID+DATABASE 如何安裝

Oracle 12C R2 單節點 GRID+DATABASE 如何安裝

Oracle 12C R2 單節點 GRID+DATABASE 如何安裝
Oracle 12C R2 單節點 GRID+DATABASE 如何安裝
Oracle 12C R2 單節點 GRID+DATABASE 如何安裝
Oracle 12C R2 單節點 GRID+DATABASE 如何安裝
Oracle 12C R2 單節點 GRID+DATABASE 如何安裝

[root@jing1 db_1]# ./root.sh

Performing root user operation.

The following environment variables are set as:

ORACLE_OWNER= oracle

ORACLE_HOME=  /u01/app/oracle/product/12.2.0/db_1

Enter the full pathname of the local bin directory: [/usr/local/bin]:

The contents of dbhome have not changed. No need to overwrite.

The contents of oraenv have not changed. No need to overwrite.

The contents of coraenv have not changed. No need to overwrite.

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 script.

Now product-specific root actions will be performed.

Do you want to setup Oracle Trace File Analyzer (TFA) now ? yes|[no] :

yes

Installing Oracle Trace File Analyzer (TFA).

Log File: /u01/app/oracle/product/12.2.0/db_1/install/root_jing1_2017-12-01_10-21-20-447877904.log

Finished installing Oracle Trace File Analyzer (TFA)

Oracle 12C R2 單節點 GRID+DATABASE 如何安裝

安裝過程

[oracle@jing1 database]$ ./runInstaller

Starting Oracle Universal Installer…

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

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

Checking monitor: must be configured to display at least 256 colors.    Actual 16777216    Passed

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-12-01_10-12-43AM. Please wait …[oracle@jing1 database]$ You can find the log of this install session at:

/u01/app/oraInventory/logs/installActions2017-12-01_10-12-43AM.log

創建數據庫

使用 oracle 用戶

Oracle 12C R2 單節點 GRID+DATABASE 如何安裝
Oracle 12C R2 單節點 GRID+DATABASE 如何安裝
Oracle 12C R2 單節點 GRID+DATABASE 如何安裝
Oracle 12C R2 單節點 GRID+DATABASE 如何安裝
Oracle 12C R2 單節點 GRID+DATABASE 如何安裝
Oracle 12C R2 單節點 GRID+DATABASE 如何安裝
Oracle 12C R2 單節點 GRID+DATABASE 如何安裝
Oracle 12C R2 單節點 GRID+DATABASE 如何安裝
Oracle 12C R2 單節點 GRID+DATABASE 如何安裝
Oracle 12C R2 單節點 GRID+DATABASE 如何安裝
Oracle 12C R2 單節點 GRID+DATABASE 如何安裝
Oracle 12C R2 單節點 GRID+DATABASE 如何安裝
Oracle 12C R2 單節點 GRID+DATABASE 如何安裝
Oracle 12C R2 單節點 GRID+DATABASE 如何安裝

處理方法:

根據文檔

Database Creation in Oracle Restart Environment Fails With ORA-01017: Invalid Username/password (文檔 ID 2108268.1)

[root@jing1 db_1]# id grid

uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1200(asmadmin),1201(asmdba),1202(asmoper)

[root@jing1 db_1]# usermod -a -G dba grid

[root@jing1 db_1]# id grid

uid=1100(grid) gid=1000(oinstall) groups=1000(oinstall),1200(asmadmin),1201(asmdba),1202(asmoper),1300(dba)

重新運行 dbca,要刪除之前創建的 YCR12C 數據庫,在 dbca 中選擇 delete database 即可

按照上面截圖的不忠重新運行即可,選項不必蓋面,本次成功

Oracle 12C R2 單節點 GRID+DATABASE 如何安裝

安裝完成后查看監聽正常:

[oracle@jing1 admin]$ lsnrctl status

LSNRCTL for Linux: Version 12.2.0.1.0 – Production on 01-DEC-2017 11:07:31

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                01-DEC-2017 09:58:42

Uptime                    0 days 1 hr. 8 min. 49 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   /u01/app/12.2.0/grid/network/admin/listener.ora

Listener Log File         /u01/app/grid/diag/tnslsnr/jing1/listener/alert/log.xml

Listening Endpoints Summary…

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

(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Services Summary…

Service +ASM has 1 instance(s).

Instance +ASM , status READY, has 1 handler(s) for this service…

Service +ASM_DATA has 1 instance(s).

Instance +ASM , status READY, has 1 handler(s) for this service…

Service 5f3f946fc4442e02e053ec02870a3fb7 has 1 instance(s).

Instance YCR12C , status READY, has 1 handler(s) for this service…

Service YCR12C has 1 instance(s).

Instance YCR12C , status READY, has 1 handler(s) for this service…

Service YCR12CXDB has 1 instance(s).

Instance YCR12C , status READY, has 1 handler(s) for this service…

Service ycr12cpdb has 1 instance(s).

Instance YCR12C , status READY, has 1 handler(s) for this service…

The command completed successfully

[oracle@jing1 admin]$

Oracle 12C R2 單節點 GRID+DATABASE 如何安裝

感謝各位的閱讀!關于“Oracle 12C R2 單節點 GRID+DATABASE 如何安裝”這篇文章就分享到這里了,希望以上內容可以對大家有一定的幫助,讓大家可以學到更多知識,如果覺得文章不錯,可以把它分享出去讓更多的人看到吧!

正文完
 
丸趣
版權聲明:本站原創文章,由 丸趣 2023-07-24發表,共計11190字。
轉載說明:除特殊說明外本站除技術相關以外文章皆由網絡搜集發布,轉載請注明出處。
評論(沒有評論)
主站蜘蛛池模板: 广水市| 曲阳县| 肇东市| 万载县| 商洛市| 岢岚县| 安达市| 晋宁县| 梁山县| 德惠市| 会宁县| 台中县| 宜州市| 武隆县| 威宁| 卢氏县| 西充县| 隆安县| 瑞金市| 乐业县| 钟山县| 方城县| 夏河县| 海城市| 三都| 左权县| 如皋市| 永德县| 临沧市| 彰武县| 云浮市| 高台县| 景泰县| 明溪县| 舟曲县| 子长县| 天等县| 旬邑县| 谢通门县| 赤城县| 平山县|