In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article is about how to install Oracle 12C R2 single node GRID+DATABASE. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
The specific installation process is as follows
Software package check
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
Directory and user creation:
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
Modify the host file
[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
Configure 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
Configure oraInventory
[root@jing1 app] # more / etc/oraInst.loc
Inventory_loc=/u01/app/oraInventory
Inst_group=oinstall
Modify 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
Storage creation
To note here, this single-node server creates a volume group vg_jing1 and a logical volume lv_asmdisk to use asm, as follows:
[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
So that asm can recognize the disk.
Chown grid:asmadmin / dev/dm-3
But... no, no, no. This permission will automatically be changed back to the following:
[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] #
It's not done. Refer to the following documentation for inspiration.
Http://www.itpub.net/thread-2070853-1-1.html
Reference:
Http://blog.163.com/yanenshun@126/blog/static/1283881692014818902668/
The specific methods are as follows:
Use udev to modify dm file permissions:
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} "
And then
/ sbin/start_udev
View permissions after:
[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
Successfully modified
Configure the kernel
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 = 32000 100128" > > / 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
Close selinux
[root@rac01 ntp] # setenforce 0
[root@rac01 ntp] # vim / etc/selinux/config
SELINUX=disabled
Turn off the firewall
[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.
09:55:53 on 2017-12-01 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
After completing the grid installation, the interface is as follows:
[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
Add the following environment variables to .bash _ profile, where Oracle home is set before installation:
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
Install the Oracle database:
Edit the profile of the oracle user, add
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
Start installation
[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)
Installation process
[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
Create a database
Use oracle users
Treatment method:
According to the document
Database Creation in Oracle Restart Environment Fails With "ORA-01017: Invalid Username/password" (document 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)
To rerun dbca, to delete the previously created YCR12C database, select delete database in dbca
You can rerun according to the infidelity in the screenshot above, and the options do not need to be covered. This is a success.
After the installation is completed, check that the monitoring is normal:
[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] $
Thank you for reading! This is the end of the article on "how to install Oracle 12C R2 single-node GRID+DATABASE". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
Gc buffer busyThis wait event, also known as global cache buffer busy prior to Oracle 10g,specifies
© 2024 shulou.com SLNews company. All rights reserved.