A Preparatory work
1.1 Install the required RPM package
Binutils-2.20.51.0.2-5.11.el6 (x86_64)
Glibc-2.12-1.7.el6 (x86_64)
Libgcc-4.4.4-13.el6 (x86_64)
Libstdc++-4.4.4-13.el6 (x86_64)
Libaio-0.3.107-10.el6 (x86_64)
libXext-1.1 (x86_64)
libXtst-1.0.99.2 (x86_64)
libx11-1.3 (x86_64)
libXau-1.0.5 (x86_64)
libxcb-1.5 (x86_64)
libXi-1.3 (x86_64)
Make-3.81-19.el6
Sysstat-9.0.4-11.el6 (x86_64)
Compat-libcap1-1.10-1 (x86_64)
Compat-libstdc++-33-3.2.3-69.el6 (x86_64)
Gcc-4.4.4-13.el6 (x86_64)
Gcc-c++-4.4.4-13.el6 (x86_64)
Glibc-devel-2.12-1.7.el6 (x86_64)
Ksh <== Any version of Ksh is available.
Libstdc++-devel-4.4.4-13.el6 (x86_64)
Libaio-devel-0.3.107-10.el6 (x86_64)
Compat-libstdc++-33-3.2.3-69.el6 (i686)
Glibc-2.12-1.7.el6 (i686)
Glibc-devel-2.12-1.7.el6 (i686)
Libgcc-4.4.4-13.el6 (i686)
Libstdc++-4.4.4-13.el6 (i686)
Libstdc++-devel-4.4.4-13.el6 (i686)
Libaio-0.3.107-10.el6 (i686)
Libaio-devel-0.3.107-10.el6 (i686)
libXext-1.1 (i686)
libXtst-1.0.99.2 (i686)
libx11-1.3 (i686)
libXau-1.0.5 (i686)
libxcb-1.5 (i686)
libXi-1.3 (i686)
It is recommended to configure Yum and install it with Yum.
1.2 Modifying kernel parameters/etc/sysctl.conf
Add the following to the sysctl.conf:
Kernel.shmmni = 4096
Kernel.sem = 250 32000 100 128
Fs.file-max = 6815744
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.panic_on_oops = 30
The following 2 parameters directly use the default values:
Kernel.shmmax = 68719476736
Kernel.shmall = 4294967296
Execute the sysctl-p with the root user to make the changes effective.
1.3 Setting the shell limit for Oracle users
in/etc/security/limits.conf , add the following:
Oracle Soft Nproc 2047
Oracle Hard Nproc 16384
Oracle Soft Nofile 1024
Oracle Hard Nofile 65536
Oracle Soft Stack 10240
Oracle Hard Stack 10240
Note: These changes take effect immediately when the limits.conf file changes. However, if an Oracle user is logged on, these changes will take effect after logging off these users and logging back in. You must complete this operation before you use these accounts for installation.
1.4 Setting up Pam
Make sure that the latest version of PAM is loaded, and then add or edit the following lines in the/etc/pam.d/login file:
Session Required Pam_limits.so
1.5 Setting Ulimit
Validates the current ulimit and increases if needed. This can be done in a number of ways, and the recommended method is to add the following line in/etc/profile:
if [$USER = "Oracle"]; Then
if [$SHELL = "/bin/ksh"]; Then
Ulimit-u 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Fi
1.6 Creating Oracle Users and Groups
Groupadd Oinstall
Groupadd dba
Groupadd Oper
USERADD-G oinstall-g dba Oracle
passwd Oracle
1.7 Creating a Directory
Mkdir-p/u01/app/oracle/product/12.1.0/db_1
Chown-r oracle.oinstall/u01
Chmod-r 777/u01
1.8 Setting environment variables for Oracle users
Modify the/home/oracle/.bash_profile file to add the following:
tmp=/tmp; Export TMP
Tmpdir= $TMP; Export TMPDIR
Oracle_base=/u01/app/oracle; Export Oracle_base
Oracle_home= $ORACLE _base/product/12.1.0/db_1; Export Oracle_home
Oracle_sid=dave; Export Oracle_sid
Shlib_path= $LD _library_path;export Shlib_path
Nls_lang=american_america.zhs16gbk;export Nls_lang
ora_nls10= $ORACLE _home/nls/data;export Ora_nls10
tns_admin= $ORACLE _home/network/admin;export Tns_admin
Oracle_term=xterm; Export Oracle_term
Path=/usr/sbin: $PATH; Export PATH
Path= $ORACLE _home/bin: $PATH; Export PATH
Ld_library_path= $ORACLE _home/lib:/lib:/usr/lib; Export Ld_library_path
Classpath= $ORACLE _home/jre: $ORACLE _home/jlib: $ORACLE _home/rdbms/jlib;export CLASSPATH
The Source parameter takes effect:
[Email protected] ~]$ source ~/.bash_profile
Two Start installation
Run Runinstaller.
[Email protected] database]#/u01/app/orainventory/orainstroot.sh
changing permissions of/u01/app/orainventory.
Adding read,write permissions for group.
Removing Read,write,execute permissions for the world.
changing groupname of/u01/app/orainventory Tooinstall.
The execution of the script is complete.
[Email protected] database]#/u01/app/oracle/product/12.1.0/db_1/root.sh
Performing root user operation for Oracle 12c
The following environment variables is set as:
Oracle_owner= Oracle
Oracle_home=/u01/app/oracle/product/12.1.0/db_1
Enter the full pathname of the local bin Directory:[/usr/local/bin]:
Copyingdbhome To/usr/local/bin ...
Copyingoraenv To/usr/local/bin ...
Copyingcoraenv To/usr/local/bin ...
Creating/etc/oratab file ...
Entries'll be added to The/etc/oratab file asneeded by
Database Configuration Assistant when a database iscreated
Finished running generic part of root script.
Now product-specific root actions would beperformed.
[Email protected] database]#
Three. Querying database information
[Email protected] ~]$ Sqlplus/as SYSDBA
Sql*plus:release 12.1.0.1.0 Production on Thu Apr24 12:00:39 2014
Copyright (c) 1982, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition release12.1.0.1.0-64bit Production
With the partitioning, OLAP, advanced Analytics andreal Application Testing Options
Sql> Set Lin 140
Sql> select * from V$version;
BANNER con_id
------------------------------------------------------------------------------------------
Oracledatabase 12c Enterprise Edition Release 12.1.0.1.0-64bit Production 0
Pl/sqlrelease 12.1.0.1.0-production 0
CORE 12.1.0.1.0 Production 0
Tnsfor linux:version 12.1.0.1.0-production 0
Nlsrtlversion 12.1.0.1.0-production 0
Sql> SELECT CDB from V$database;
CDB
---
YES
sql> Select Pdb_name,con_uid,pdb_id,status Fromdba_pdbs;
Pdb_name Con_uid pdb_id STATUS
-------------------- ---------- -----------------------
PDBCNDBA 426143573 3 NORMAL
Pdb$seed 4088301206 2 NORMAL
sql> Select Con_id,dbid,name,open_mode Fromv$pdbs;
con_id DBID NAME Open_mode
---------- ---------- ----------------------------------------
24088301206 Pdb$seed READ only
3 426143573 pdbcndba READ WRITE
Sql> Show Con_name
Con_name
------------------------------
Cdb$root
Sql> alter session set CONTAINER=PDBCNDBA;
Session altered.
Sql> Show Con_name
Con_name
------------------------------
Pdbcndba
Sql> Show Con_name
Con_name
------------------------------
Pdbcndba
Sql> CREATE TABLE CNDBA as SELECT * fromall_users;
Table created.
Sql> alter session set Container=cdb$root;
Session altered.
Sql> Select COUNT (1) from CNDBA;
Select COUNT (1) from CNDBA
*
ERROR at line 1:
Ora-00942:table or view does not exist
--------------------------------------------------------------------------------------------
Copyright, the article allows reprint, but must be linked to the source address, otherwise investigate legal responsibility!
About Dave:
--------------------------------------------------------------------------------------------
qq:251097186
Email: [email protected]
Blog:http://blog.csdn.net/tianlesoftware
Weibo:http://weibo.com/tianlesoftware
Twitter:http://twitter.com/tianlesoftware
Facebook:http://www.facebook.com/tianlesoftware
Linkedin:http://cn.linkedin.com/in/tianlesoftware
Dave's QQ Group:
--------------------------------------------------------------------------------------------
Note: Add group must indicate tablespace and data file relationship | Do not repeat the addition group
cndba_1:104207940 (Full) cndba_2:62697716 (full) cndba_3:283816689
cndba_4:391125754 cndba_5:62697850 cndba_6:62697977 cndba_7:142216823 (full)
Oracle 12c Single-instance installation manual under Linux 6.4 platform