這篇文章給大家分享的是有關(guān)Oracle 12C R2單節(jié)點GRID+DATABASE如何安裝的內(nèi)容。小編覺得挺實用的,因此分享給大家做個參考,一起跟隨小編過來看看吧。
創(chuàng)新互聯(lián)堅持“要么做到,要么別承諾”的工作理念,服務(wù)領(lǐng)域包括:做網(wǎng)站、網(wǎng)站建設(shè)、企業(yè)官網(wǎng)、英文網(wǎng)站、手機端網(wǎng)站、網(wǎng)站推廣等服務(wù),滿足客戶于互聯(lián)網(wǎng)時代的邯山網(wǎng)站設(shè)計、移動媒體設(shè)計的需求,幫助企業(yè)找到有效的互聯(lián)網(wǎng)解決方案。努力成為您成熟可靠的網(wǎng)絡(luò)建設(shè)合作伙伴!具體安裝過程如下
軟件包檢查
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
目錄和用戶創(chuàng)建:
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
存儲創(chuàng)建
此處要說明一下,本單節(jié)點服務(wù)器創(chuàng)建了一個卷組vg_jing1,為了使用asm創(chuàng)建了一個邏輯卷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
但是。。。這個權(quán)限會自動變回去如下:
[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文件權(quán)限:
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
后查看權(quán)限:
[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
成功修改
配置內(nèi)核
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
關(guān)閉selinux
[root@rac01 ntp]# setenforce 0
[root@rac01 ntp]# vim /etc/selinux/config
SELINUX=disabled
關(guān)閉防火墻
[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
完成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中添加如下環(huán)境變量,其中Oracle home在安裝前已設(shè)置:
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數(shù)據(jù)庫:
編輯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]$
[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@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
創(chuàng)建數(shù)據(jù)庫
使用oracle用戶
處理方法:
根據(jù)文檔
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,要刪除之前創(chuàng)建的YCR12C數(shù)據(jù)庫,在dbca中選擇delete database即可
按照上面截圖的不忠重新運行即可,選項不必蓋面,本次成功
安裝完成后查看監(jiān)聽正常:
[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]$
感謝各位的閱讀!關(guān)于“Oracle 12C R2單節(jié)點GRID+DATABASE如何安裝”這篇文章就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,讓大家可以學(xué)到更多知識,如果覺得文章不錯,可以把它分享出去讓更多的人看到吧!
分享文章:Oracle12CR2單節(jié)點GRID+DATABASE如何安裝-創(chuàng)新互聯(lián)
網(wǎng)址分享:http://jinyejixie.com/article24/cshsje.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站維護、做網(wǎng)站、手機網(wǎng)站建設(shè)、面包屑導(dǎo)航、網(wǎng)站收錄、響應(yīng)式網(wǎng)站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)