0% found this document useful (0 votes)
133 views30 pages

1.Oracle12cR1SE2 InstallationGuide

The document provides instructions for installing Oracle 12cR1 Standard Edition 2 software on Linux. It outlines downloading the installation files, unpacking them, configuring the host file and kernel parameters, setting security limits for the oracle user, and installing prerequisite packages. The instructions are divided into sections for the software-only installation, listener setup, and database installation components.

Uploaded by

Nick Santos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
133 views30 pages

1.Oracle12cR1SE2 InstallationGuide

The document provides instructions for installing Oracle 12cR1 Standard Edition 2 software on Linux. It outlines downloading the installation files, unpacking them, configuring the host file and kernel parameters, setting security limits for the oracle user, and installing prerequisite packages. The instructions are divided into sections for the software-only installation, listener setup, and database installation components.

Uploaded by

Nick Santos
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 30

Oracle 12cR1 – (STANDARD EDITION 2)

Installation Guide for Oracle 12c R1


 Software Only Installation (runInstaller)
 Listener Setup (netca)
 Database Installation (DBCA)

Software Only Installation


0 Download Files Access and Download Oracle 12cR1
https://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

1 Unpack Files unzip linuxamd64_12102_database_1of2.zip


unzip linuxamd64_12102_database_2of2.zip

2 Hosts File Example:


The "/etc/hosts" file must contain a fully qualified name for the server. [root@sand01 ~]# more /etc/hosts
<IP-address> <fully-qualified-machine-name> <machine-name> 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.56.101 sand01 sand01.personal.wf.com

3 Manual Setup Example:


Sysctl [root@sand01 ~]# sysctl -p
fs.file-max = 6815744
Add or amend the following lines in the "/etc/sysctl.conf" file. kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
fs.file-max = 6815744 kernel.shmall = 1073741824
kernel.sem = 250 32000 100 128 kernel.shmmax = 4398046511104
kernel.shmmni = 4096 kernel.panic_on_oops = 1
kernel.shmall = 1073741824 net.core.rmem_default = 262144
kernel.shmmax = 4398046511104 net.core.rmem_max = 4194304
net.core.rmem_default = 262144 net.core.wmem_default = 262144
net.core.rmem_max = 4194304 net.core.wmem_max = 1048576
net.core.wmem_default = 262144 net.ipv4.conf.all.rp_filter = 2
net.core.wmem_max = 1048576 net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576 fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500 net.ipv4.ip_local_port_range = 9000 65500

Run the following command to change the current kernel parameters.

/sbin/sysctl -p

4 Security Limits
Add the following lines to the "/etc/security/limits.conf" file. [root@sand01 ~]# more /etc/security/limits.conf
# /etc/security/limits.conf
oracle soft nofile 1024 .
oracle hard nofile 65536 .
oracle soft nproc 16384 .
oracle hard nproc 16384
oracle soft stack 10240 #* soft core 0
oracle hard stack 32768 #* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#@student - maxlogins 4

#Oracle Limits
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
5 Install the following packages if they are not already present. [root@sand01 ~]# yum list binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-
33.i686 gcc gcc-c++ glibc glibc.i686 glibc-devel glibc-devel.i686 ksh libgcc libgcc.i686
# From Public Yum or ULN libstdc++ libstdc++.i686 libstdc++-devel libstdc++-devel.i686 libaio libaio.i686 libaio-devel
yum install binutils -y libaio-devel.i686 libXext libXext.i686 libXtst libXtst.i686 libX11 libX11.i686 libXau
yum install compat-libcap1 -y libXau.i686 libxcb libxcb.i686 libXi libXi.i686 make sysstat unixODBC unixODBC-devel
yum install compat-libstdc++-33 -y Loaded plugins: fastestmirror, langpacks
yum install compat-libstdc++-33.i686 -y Loading mirror speeds from cached hostfile
yum install gcc -y * base: mirror.pregi.net
yum install gcc-c++ -y * extras: mirror.pregi.net
yum install glibc -y * updates: mirror.pregi.net
yum install glibc.i686 -y Installed Packages
yum install glibc-devel -y binutils.x86_64 : 2.27-34.base.el7 : @base
yum install glibc-devel.i686 -y compat-libcap1.x86_64 : 1.10-7.el7 : @base
yum install ksh -y compat-libstdc++-33.x86_64 : 3.2.3-72.el7 : @base
yum install libgcc -y gcc.x86_64 : 4.8.5-36.el7_6.1 : @updates
yum install libgcc.i686 -y gcc-c++.x86_64 : 4.8.5-36.el7_6.1 : @updates
yum install libstdc++ -y glibc.x86_64 : 2.17-260.el7_6.3 : @updates
yum install libstdc++.i686 -y glibc-devel.x86_64 : 2.17-260.el7_6.3 : @updates
yum install libstdc++-devel -y ksh.x86_64 : 20120801-139.el7 : @base
yum install libstdc++-devel.i686 -y libX11.x86_64 : 1.6.5-1.el7 : @anaconda
yum install libaio -y libXau.x86_64 : 1.0.8-2.1.el7 : @anaconda
yum install libaio.i686 -y libXext.x86_64 : 1.3.3-3.el7 : @anaconda
yum install libaio-devel -y libXi.x86_64 : 1.7.9-1.el7 : @anaconda
yum install libaio-devel.i686 -y libXtst.x86_64 : 1.2.3-1.el7 : @anaconda
yum install libXext -y libaio.x86_64 : 0.3.109-13.el7 : @anaconda
yum install libXext.i686 -y libaio-devel.x86_64 : 0.3.109-13.el7 : @base
yum install libXtst -y libgcc.x86_64 : 4.8.5-36.el7_6.1 : @updates
yum install libXtst.i686 -y libstdc++.x86_64 : 4.8.5-36.el7_6.1 : @updates
yum install libX11 -y libstdc++-devel.x86_64 : 4.8.5-36.el7_6.1 : @updates
yum install libX11.i686 -y libxcb.x86_64 : 1.12-1.el7 : @anaconda
yum install libXau -y make.x86_64 : 1:3.82-23.el7 : @anaconda
yum install libXau.i686 -y sysstat.x86_64 : 10.1.5-17.el7 : @base
yum install libxcb -y Available Packages
yum install libxcb.i686 -y compat-libcap1.i686 : 1.10-7.el7 : base
yum install libXi -y compat-libstdc++-33.i686 : 3.2.3-72.el7 : base
yum install libXi.i686 -y glibc.i686 : 2.17-260.el7_6.3 : updates
yum install make -y glibc-devel.i686 : 2.17-260.el7_6.3 : updates
yum install sysstat -y libX11.i686 : 1.6.5-2.el7 : base
yum install unixODBC -y libX11.x86_64 : 1.6.5-2.el7 : base
yum install unixODBC-devel -y libXau.i686 : 1.0.8-2.1.el7 : base
libXext.i686 : 1.3.3-3.el7 : base
libXi.i686 : 1.7.9-1.el7 : base
libXtst.i686 : 1.2.3-1.el7 : base
libaio.i686 : 0.3.109-13.el7 : base
libaio-devel.i686 : 0.3.109-13.el7 : base
libgcc.i686 : 4.8.5-36.el7_6.1 : updates
libstdc++.i686 : 4.8.5-36.el7_6.1 : updates
libstdc++-devel.i686 : 4.8.5-36.el7_6.1 : updates
libxcb.i686 : 1.13-1.el7 : base
libxcb.x86_64 : 1.13-1.el7 : base
unixODBC.i686 : 2.3.1-11.el7 : base
unixODBC.x86_64 : 2.3.1-11.el7 : base
unixODBC-devel.i686 : 2.3.1-11.el7 : base
unixODBC-devel.x86_64 : 2.3.1-11.el7 : base

6 Create the new groups and users. History


110 groupadd -g 54321 oinstall
groupadd -g 54321 oinstall 111 groupadd -g 54322 dba
groupadd -g 54322 dba 112 groupadd -g 54323 oper
113 useradd -u 54321 -g oinstall -G dba,oper oracle
groupadd -g 54323 oper
#groupadd -g 54324 backupdba
#groupadd -g 54325 dgdba
#groupadd -g 54326 kmdba
#groupadd -g 54327 asmdba
#groupadd -g 54328 asmoper
#groupadd -g 54329 asmadmin
useradd -u 54321 -g oinstall -G dba,oper oracle

7 Additional Setup Example:


The following steps must be performed, whether you did the manual or automatic setup.
Set the password for the "oracle" user. [root@sand01 ~]# passwd oracle
Changing password for user oracle.
passwd oracle New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.

8a Set secure Linux to permissive by editing the "/etc/selinux/config" file, making sure [root@sand01 ~]# getenforce
the SELINUX flag is set as follows. Disabled
[root@sand01 ~]# more /etc/selinux/config
SELINUX=permissive
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=permissive
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted

8b ERROR on reboot To Reboot:


edit the grub file upon startup
selinux=0
8c Possible errors for SELINUX (the server might not start because of selinux-policy- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
targeted )
[root@sand01 ~]# yum reinstall selinux-policy-targeted
reinstall the package so that this error does no come up Loaded plugins: fastestmirror, langpacks
No Match for argument: selinux-policy-targeted
Loading mirror speeds from cached hostfile
* base: mirror.pregi.net
* extras: mirror.pregi.net
* updates: mirror.pregi.net
base | 3.6 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
Package(s) selinux-policy-targeted available, but not installed.
Error: Nothing to do
[root@sand01 ~]# yum install selinux-policy-targeted
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.pregi.net
* extras: mirror.pregi.net
* updates: mirror.pregi.net
Resolving Dependencies
--> Running transaction check
---> Package selinux-policy-targeted.noarch 0:3.13.1-229.el7_6.9 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================
Package Arch Version Repository Size
=============================================================================================
Installing:
selinux-policy-targeted noarch 3.13.1-229.el7_6.9 updates 6.9 M

Transaction Summary
=============================================================================================
Install 1 Package

Total download size: 6.9 M


Installed size: 19 M
Is this ok [y/d/N]: y
Downloading packages:
selinux-policy-targeted-3.13.1-229.el7_6.9.noarch.rpm | 6.9 MB 00:00:28
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : selinux-policy-targeted-3.13.1-229.el7_6.9.noarch 1/1
Verifying : selinux-policy-targeted-3.13.1-229.el7_6.9.noarch 1/1

Installed:
selinux-policy-targeted.noarch 0:3.13.1-229.el7_6.9

Complete!

9 Create the directories in which the Oracle software will be installed. [root@sand01 ~]# ll -d /u01/app/oracle/product/12.1.0.2/db_1
drwxrwxr-x. 2 oracle oinstall 6 Mar 26 23:56 /u01/app/oracle/product/12.1.0.2/db_1
mkdir -p /u01/app/oracle/product/12.1.0.2/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
10 Setup Env script; setup and export display [oracle@sand01 ~]$ mkdir scripts
[oracle@sand01 ~]$ cd scripts
[oracle@sand01 scripts]$ more setEnv.sh
# Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP

export ORACLE_HOSTNAME=ol7-122.localdomain
export ORACLE_UNQNAME=cdb1
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0.2/db_1
export ORACLE_SID=cdb1

export PATH=/usr/sbin:/usr/local/bin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
[oracle@sand01 scripts]$ hostname
sand01.personal.wf.com
[oracle@sand01 scripts]$ vi setEnv.sh
[oracle@sand01 scripts]$ DISPLAY=:0.0; export DISPLAY

11 Go To Installer directory
12 run ./runInstaller
13 Configure Security Updates.
Uncheck:
“I wish to receive security updates via My Oracle Support”

Then click Next

14 On My Oracle Support Uername/Email Address Not Specified


Click “YES”
15 On Installation Option,Click “Install database software only” then click yes

16 Grid Installation Option.


Click “Single Instance database installation” and click “Next”.
17 Product Languages:
Select “English”
Click “Next”

18 On Database Edition
Click Standard Edition 2
19 Installation Location
Make sure that location is correct.

20 Create Inventory
21 Operating System Groups

22 Prerequisite Checks
23 Click Ignore on Changing Swap size.

24 Click “Yes” on the confirmation box.


25 On Summary, you may save the response file for future use.

26 Install Products
27 Run root actions by logging in as root user.

28 These are the commands ran as root user. [oracle@sand01 scripts]$ su -


Password:
Last login: Mon Apr 1 22:42:12 +08 2019 from 192.168.56.1 on pts/0
[root@sand01 ~]# /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.


The execution of the script is complete.
[root@sand01 ~]# /u01/app/oracle/product/12.1.0.2/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.1.0.2/db_1

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.
[root@sand01 ~]#

29 Database Software Installation is complete. Database Installation is finished.


Create the Listener (listener.ora)
1 netca [oracle@sand01 response]$ whereis netca
netca: /u01/app/oracle/product/12.1.0.2/db_1/bin/netca
[oracle@sand01 response]$ netca -list

Parsing command line arguments:


Wrong command line argument passed: "list"
Done parsing command line arguments.
Oracle Net Services Configuration:

[oracle@sand01 response]$ netca -help


Usage: netca [-silent] {<command> <options>}

Perform network configuration by specifying the following arguments:


[-silent]
-responsefile <Response file name>]
[-local {Perform configuration on only local node}]
-instype <typical|custom>
[-listener <Listener name (only for custom install)>]
[-lisport <TCP/IP port number>]
[-lps <Starting TCP/IP port number (only for typical install)>]
[-lpe <Ending TCP/IP port number (only for typical install)>]
[-netnum <Network resource number (only for RAC)>]
[-nostartlsnr {Do not start listener}]
[-crsupgrade {Upgrade default listener from lower version database home to Grid
Infrastructure home (only for RAC)}]
[-inscomp <Comma separated list of installed components>]
[-insprtcl <Comma separated list of installed protocols>]
[-orahome <Oracle home>]
[-orahnam <Oracle home name>]
[-log <Log file name>]
[-h|-help {Print usage}]

[oracle@sand01 response]$ pwd


/home/oracle/installer_12cR1/database/response
[oracle@sand01 response]$ netca -silent -responsefile
/home/oracle/installer_12cR1/database/response/netca.rsp

Parsing command line arguments:


Parameter "silent" = true
Parameter "responsefile" = /home/oracle/installer_12cR1/database/response/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
Running Listener Control:
/u01/app/oracle/product/12.1.0.2/db_1/bin/lsnrctl start LISTENER
Listener Control complete.
Listener started successfully.
Listener configuration complete.
Oracle Net Services configuration successful. The exit code is 0
[oracle@sand01 response]$

Installation of the Database (DBCA)

0 Create the Database datafile and archivelog directories. [oracle@sand01 /]$ su -


Password:
Last login: Tue Apr 2 00:06:16 +08 2019 on pts/1

[root@sand01 ~]# rmdir /data


[root@sand01 ~]# mkdir /data
[root@sand01 ~]# chown -R oracle:dba /data
[root@sand01 ~]# exit
logout

[oracle@sand01 /]$ cd /data


[oracle@sand01 data]$ ll
total 0
[oracle@sand01 data]$ mkdir oradata
[oracle@sand01 data]$ cd oradata/
[oracle@sand01 oradata]$ pwd
/data/oradata
[oracle@sand01 oradata]$ ll
total 0
[oracle@sand01 oradata]$ cd ..
[oracle@sand01 data]$ ll
total 0
drwxr-xr-x. 2 oracle oinstall 6 Apr 2 19:37 oradata
[oracle@sand01 data]$ mkdir fast_recovery_area
[oracle@sand01 data]$ cd fast_recovery_area/
[oracle@sand01 fast_recovery_area]$ ll
total 0
[oracle@sand01 fast_recovery_area]$ pwd
/data/fast_recovery_area
[oracle@sand01 fast_recovery_area]$

1 run dbca
[oracle@sand01 response]$ whereis dbca
dbca: /u01/app/oracle/product/12.1.0.2/db_1/bin/dbca
2 On Database Operation
Choose “Create Database” and click “Next”

3 On Creation Mode
Click “Advanced Mode” and then click Next
4 On Database Template
Choose “General Purpose or Transaction Processing” and Click “Next”

5 On Database Identification
write the Global Database Name and
Contains the UNIQUE database name with maximum 8 characters plus the hostname (all
capitals).
UNIQUE_NAME.hostname
for this db we have SID=T12CSE2
hostname=SAND01.PERSONAL.WF.COM

UNCLICK “Create as Container Database”


6 On Management Options
UNCLICK both
“Configure Enterprise Manager (EM) Database Express”
“Register with Enterprise Manager (EM) Cloud Control”

7 On Database Credentials
Click “Same Administrative Password for All Accounts”
Write a simple password for now. This will be used by both SYS(DBA) and SYSTEM
schema.

Click Next.
8 On Network Configuration,
use the Available Listener and Click Next.

9 On Storage Locations,
we will use the datafile directory created earlier.
On “Database File Storage Type”, select “File System”.
10 On Storage Location,
Click “Use Common Location for All Database Files”
On File Location. Click Browse.

11 On Select Database Area, get the location of “/data/oradata”.


Click OK
12 On “Recovery File Storage Type”, select “File System”.
Click “Specify Fast Recovery Area”
On “Fast Recovery Area”, Click “Browse”.

13 On Select Fast Recovery Area, get the location of “/data/fast_recovery_area”.


Click OK.
14 Click Enable Archiving.
Click Next.

15 On Initialization Parameters,
Click “Character” Sets tab
16 On “Character Sets” tab
Click Use Unicode (AL32UTF8)

National Character Set: AL16UTF16


Default Language: American
Default Territory: United States

Click Next

17 Click “Create Database


Click “Save as a Database Template”
Verify the name and Description
Click “Generate Database Creation Scripts.
Click “Next”
18 Prerequisite Checks will show the requirements before installation

19 On Summary,
You will be shown the database creation details before the actual creation.
Click Finish to start database creation.
20 Verify installation progress.

21 After Database installation, you have the option to change password for specific
users.
Sources:
https://oracle-base.com/articles/12c/oracle-db-12cr1-installation-on-oracle-linux-6
Oracle 12cR1 – (STANDARD EDITION 2)
Installation Guide for Oracle 12c R1

You might also like