Saturday, 6 January 2018
A. Install Enterprise Linux 6 in VM
Steps to be Executed:-
A. Install Enterprise Linux 6 in VM
1. Power On the Virtual Machine and Press ENTER to proceed further to Install Enterprise Linux 6.
2. Select SKIP to skip the media test and start the installation.
3. Click OK to proceed further.
4. Click NEXT to proceed with installation.
5. Select English as Language.
6. Select US English as keyboard.
7. Select Basic Storage Devices as we are not using iscsi devices.
8. Click on Discard any data from allocated 200GB storage device.
9. Change the host name to - ora11gr2.oracle.com (as per your requirement)
10. Click Configure Network and Edit the "System eth0" wired connection and put a specified ip address and netmask. Then apply and close it.
11. Choose City for time zone.
12. Put the root user password.
13. Click "Create Custom Layout" option as we are creating separate file system.
14. Click the total free disk and create then select Standard Partition.
15. Put mount point name and size of the mount point, then click ok.
16. Also create the similar type of file system as below.
17. Select "/" file system to install Linux 6 and click Next also select Format option as we are formatting the file system as Ext4.
18. Click Write changes to disk option.
19. Click Next to proceed the installation in /dev/sda file system.
20. Choose "Customize Now" and click Next as we are customizing some packages.
21. Select all the components in Desktops section and click Next.
22. Linux 6 installation window is starting now.
23. After installation completes click Reboot to restart the server.
24. Click Forward to proceed further.
25. Agree the license agreement and click Forward.
26. Click the option "No, I prefer to register at a later time" and click forward, also click "No thanks, I'll connect later" option.
27. Click forward to Finish Updates Setup.
28. Click forward in the Create User page as we will create the users later.
29. Click forward by selecting appropriate time.
30. Click Finish by skip enabling kdump.
B.Putty Configuration with Xming
Steps to be Executed:-
1. Open Putty and put the server ip along with session name
2. Click X11 section from Connection and SSH dropdown and Enable the X11 forwarding, also put localhost0.0 in s display location, click open
3. Try the command "xclock" after connecting to server, the graphical window will come
C. Preparing Environment
C. Preparing Environment
1. Edit /etc/hosts file and put the host name and fully qualified domain name with ip address
[root@oracle11gr2 ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 00:0C:29:0F:C5:C1
inet addr:192.168.72.198 Bcast:192.168.72.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fe0f:c5c1/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:807 errors:0 dropped:0 overruns:0 frame:0
TX packets:250 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:63039 (61.5 KiB) TX bytes:37827 (36.9 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:52 errors:0 dropped:0 overruns:0 frame:0
TX packets:52 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3956 (3.8 KiB) TX bytes:3956 (3.8 KiB)
[root@oracle11gr2 ~]# hostname
oracle11gr2.oracle.com
[root@oracle11gr2 ~]# vi /etc/hosts
[root@oracle11gr2 ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.72.198 oracle11gr2.oracle.com oracle11gr2
[root@oracle11gr2 ~]#
2. Disable the SELINUX
[root@oracle11gr2 ~]# vi /etc/selinux/config[root@oracle11gr2 ~]# cat /etc/selinux/config
# 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=disabled
# SELINUXTYPE= can take one of these two values:
# targeted - Targeted processes are protected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
[root@oracle11gr2 ~]#
3. Verify the File System mount point.
[root@oracle11gr2 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 30G 4.4G 24G 16% /
tmpfs 2.0G 76K 2.0G 1% /dev/shm
/dev/sda1 59G 52M 56G 1% /oraarch
/dev/sda3 30G 44M 28G 1% /oradata1
/dev/sda5 30G 44M 28G 1% /oradata2
/dev/sda8 12G 30M 12G 1% /software
/dev/sda6 30G 44M 28G 1% /u01
/dev/sr0 3.7G 3.7G 0 100% /media/OL6.5 x86_64 Disc 1 20131125
[root@oracle11gr2 ~]#
4. Install the below RPM packages.
[root@oracle11gr2 ~]# cd "/media/OL6.5 x86_64 Disc 1 20131125/Packages"[root@oracle11gr2 Packages]# pwd
/media/OL6.5 x86_64 Disc 1 20131125/Packages
[root@oracle11gr2 Packages]#
rpm -Uvh binutils-2.* --nodeps
rpm -Uvh compat-libstdc++-33* --nodeps
rpm -Uvh compat-libstdc++-33* --nodeps
rpm -Uvh elfutils-libelf* --nodeps
rpm -Uvh glibc-2.* --nodeps
rpm -Uvh glibc-common-2.* --nodeps
rpm -ivh kernel-headers-2.6.* --nodeps
rpm -Uvh glibc-headers-2.* --nodeps
rpm -Uvh glibc-devel-2.* --nodeps
rpm -Uvh ksh* --nodeps
rpm -Uvh libaio-0.* --nodeps
rpm -Uvh libaio-devel-0.* --nodeps
rpm -Uvh libgomp-4.* --nodeps
rpm -Uvh libgcc-4.* --nodeps
rpm -Uvh libstdc++-4.* --nodeps
rpm -Uvh libstdc++-devel-4.* --nodeps
rpm -Uvh make-3.* --nodeps
rpm -Uvh gcc-4.* --nodeps
rpm -Uvh gcc-c++-4.* --nodeps
rpm -Uvh sysstat-7.* --nodeps
rpm -Uvh unixODBC-2.* --nodeps
rpm -Uvh unixODBC-devel-2.* --nodeps
rpm -Uvh numact* --nodeps
rpm -Uvh elfutils-libelf-0.137-3.el5.i386* --nodeps
rpm -Uvh elfutils-libelf-devel-0.137-3.el5.i386.rpm elfutils-libelf-devel-static-0.137-3.el5.i386.rpm
5. Linux group creation.
[root@oracle11gr2 ~]# groupadd oinstall[root@oracle11gr2 ~]# groupadd dba
[root@oracle11gr2 ~]# groupadd oper
[root@oracle11gr2 ~]#
[root@oracle11gr2 ~]# tail /etc/group
oinstall:x:500:
dba:x:501:
oper:x:502:
[root@oracle11gr2 ~]#
6. Linux user addition.
[root@oracle11gr2 ~]# useradd -g oinstall -G dba,oper oracle[root@oracle11gr2 ~]#
[root@oracle11gr2 ~]# passwd oracle
Changing password for user oracle.
New password:
BAD PASSWORD: it is based on a dictionary word
BAD PASSWORD: is too simple
Retype new password:
passwd: all authentication tokens updated successfully.
[root@oracle11gr2 ~]#
[root@oracle11gr2 ~]# tail /etc/passwd |grep oracle
oracle:x:500:500::/home/oracle:/bin/bash
[root@oracle11gr2 ~]#
7. Directory creation and change permission.
[root@oracle11gr2 ~]# mkdir -p /u01/app/oracle/product/11.2.0.4/db_1[root@oracle11gr2 ~]# chown -R oracle:oinstall /u01
[root@oracle11gr2 ~]# chmod -R 775 /u01
[root@oracle11gr2 ~]#
8. Make Directory and Give permission for Creation of Database objects.
[root@oracle11gr2 ~]# df -hFilesystem Size Used Avail Use% Mounted on
/dev/sda2 30G 4.3G 24G 16% /
tmpfs 2.0G 72K 2.0G 1% /dev/shm
/dev/sda1 59G 52M 56G 1% /oraarch
/dev/sda3 30G 44M 28G 1% /oradata1
/dev/sda5 30G 44M 28G 1% /oradata2
/dev/sda8 12G 4.9G 6.2G 45% /software
/dev/sda6 30G 4.3G 24G 16% /u01
[root@oracle11gr2 ~]# mkdir -p /oradata1/DB11G
[root@oracle11gr2 ~]# mkdir -p /oradata2/DB11G
[root@oracle11gr2 ~]# mkdir -p /oraarch/DB11G
[root@oracle11gr2 ~]# chown -R oracle:oinstall /oradata1/DB11G
[root@oracle11gr2 ~]# chown -R oracle:oinstall /oradata2/DB11G
[root@oracle11gr2 ~]# chown -R oracle:oinstall /oraarch/DB11G
[root@oracle11gr2 ~]# chmod -R 775 /oradata1/DB11G
[root@oracle11gr2 ~]# chmod -R 775 /oradata2/DB11G
[root@oracle11gr2 ~]# chmod -R 775 /oraarch/DB11G
[root@oracle11gr2 ~]#
9. Configure the ".bash_profile" for "oracle" user
[root@oracle11gr2 ~]# su - oracle[oracle@oracle11gr2 ~]$
[oracle@oracle11gr2 ~]$ vi .bash_profile
[oracle@oracle11gr2 ~]$ cat .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
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=oracle11gr2.oracle.com; export ORACLE_HOSTNAME
ORACLE_UNQNAME=DB11G; export ORACLE_UNQNAME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0.4/db_1; export ORACLE_HOME
ORACLE_SID=DB11G; export ORACLE_SID
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/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
export NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"
[oracle@oracle11gr2 ~]$ . .bash_profile
[oracle@oracle11gr2 ~]$
D. Copy the Oracle Binary Software from Local drive to /software mount point
D. Copy the Oracle Binary Software from Local drive to /software mount point
Steps to be Executed:-
We are using WinScp tool to copy the software from local drive to /software mount point1. Connect to server using root user in Winscp.
2. Select /software mount point from directory section.
3. Drag and Drop the Oracle 11.2.0.4 64-bit binary from local drive to /software mount point.
4. Verify the file in /software mount point, then Unzip it.
[root@oracle11gr2 ~]# cd /software/
[root@oracle11gr2 software]# ls -ltr
total 2488200
-rw-r--r--. 1 root root 2547895888 Sep 4 2016 64database112040.zip
drwx------. 2 root root 16384 Jan 5 04:10 lost+found
[root@oracle11gr2 software]# unzip 64database112040.zip
Archive: 64database112040.zip
creating: 64database112040/install/
inflating: 64database112040/install/.oui
5. Change the permission for those unzipped files to Oracle user and oinstall group.
[root@oracle11gr2 software]# ls -ltrtotal 2488204
-rw-r--r--. 1 root root 2547895888 Sep 4 2016 64database112040.zip
drwx------. 2 root root 16384 Jan 5 04:10 lost+found
drwxr-xr-x. 7 root root 4096 Jan 5 06:04 64database112040
[root@oracle11gr2 software]# chown -R oracle:oinstall *
[root@oracle11gr2 software]# chmod -R 775 *
[root@oracle11gr2 software]# ls -ltr
total 2488204
-rwxrwxr-x. 1 oracle oinstall 2547895888 Sep 4 2016 64database112040.zip
drwxrwxr-x. 2 oracle oinstall 16384 Jan 5 04:10 lost+found
drwxrwxr-x. 7 oracle oinstall 4096 Jan 5 06:04 64database112040
[root@oracle11gr2 software]#
6. Confirm the files and permissions from oracle user.
[root@oracle11gr2 software]# su - oracle[oracle@oracle11gr2 ~]$ cd /software/
[oracle@oracle11gr2 software]$ ls -ltr
total 2488204
-rwxrwxr-x. 1 oracle oinstall 2547895888 Sep 4 2016 64database112040.zip
drwxrwxr-x. 2 oracle oinstall 16384 Jan 5 04:10 lost+found
drwxrwxr-x. 7 oracle oinstall 4096 Jan 5 06:04 64database112040
[oracle@oracle11gr2 software]$
[oracle@oracle11gr2 software]$ cd 64database112040
[oracle@oracle11gr2 64database112040]$ ls -ltr
total 60
drwxrwxr-x. 2 oracle oinstall 4096 Aug 27 2013 sshsetup
-rwxrwxr-x. 1 oracle oinstall 3267 Aug 27 2013 runInstaller
drwxrwxr-x. 2 oracle oinstall 4096 Aug 27 2013 rpm
drwxrwxr-x. 2 oracle oinstall 4096 Aug 27 2013 response
-rwxrwxr-x. 1 oracle oinstall 30016 Aug 27 2013 readme.html
drwxrwxr-x. 14 oracle oinstall 4096 Aug 27 2013 stage
-rwxrwxr-x. 1 oracle oinstall 500 Aug 27 2013 welcome.html
drwxrwxr-x. 4 oracle oinstall 4096 Aug 27 2013 install
[oracle@oracle11gr2 64database112040]$
E. Oracle Binary Installation
E. Oracle Binary Installation
Steps to be Executed:-
1. Check the environment value for oracle user.
[oracle@oracle11gr2 ~]$ env |grep oraHOSTNAME=oracle11gr2.oracle.com
USER=oracle
LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0.4/db_1/lib:/lib:/usr/lib
ORACLE_BASE=/u01/app/oracle
ORACLE_HOSTNAME=oracle11gr2.oracle.com
MAIL=/var/spool/mail/oracle
PATH=/u01/app/oracle/product/11.2.0.4/db_1/bin:/usr/sbin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/oracle/bin
PWD=/home/oracle
HOME=/home/oracle
LOGNAME=oracle
CLASSPATH=/u01/app/oracle/product/11.2.0.4/db_1/jlib:/u01/app/oracle/product/11.2.0.4/db_1/rdbms/jlib
ORACLE_HOME=/u01/app/oracle/product/11.2.0.4/db_1
[oracle@oracle11gr2 ~]$
2. Go to /software/64database112040 folder where the installation binary are present.
[oracle@oracle11gr2 ~]$ cd /software/64database112040[oracle@oracle11gr2 64database112040]$ ls -ltr
total 60
drwxrwxr-x. 2 oracle oinstall 4096 Aug 27 2013 sshsetup
-rwxrwxr-x. 1 oracle oinstall 3267 Aug 27 2013 runInstaller
drwxrwxr-x. 2 oracle oinstall 4096 Aug 27 2013 rpm
drwxrwxr-x. 2 oracle oinstall 4096 Aug 27 2013 response
-rwxrwxr-x. 1 oracle oinstall 30016 Aug 27 2013 readme.html
drwxrwxr-x. 14 oracle oinstall 4096 Aug 27 2013 stage
-rwxrwxr-x. 1 oracle oinstall 500 Aug 27 2013 welcome.html
drwxrwxr-x. 4 oracle oinstall 4096 Aug 27 2013 install
[oracle@oracle11gr2 64database112040]$
3. Put the ./runInstaller command to start the installation.
[oracle@oracle11gr2 64database112040]$ ./runInstallerStarting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 24249 MB Passed
Checking swap space: must be greater than 150 MB. Actual 8191 MB Passed
Checking monitor: must be configured to display at least 256 colors. Actual 16777216 Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2018-01-05_02-59-58PM. Please wait ...[oracle@oracle11gr2 64database112040]$
4. Un-check the security update and click yes to confirm.
5. Skip the software updates.
6. Select "Install database software only" as we are currently installing the oracle binary.
7. Select "Single Instance database Installation" as we are installing for single instance.
8. Select Language and click Next.
9. Select "Enterprise Edition" as we are installing Oracle 11.2.0.4 Enterprise Edition binary.
10. Put the Oracle Base and Oracle Home path and click Next.
11. Select Oracle Inventory path.
12. Select the permission group.
13. We can see so many warnings in the screen, we will fix these.
14. Click the "Fix & Check Again" and it will prompt to execute a script in root user.
15. Run the script in root user and click "OK" in this screen.
[root@oracle11gr2 ~]# /tmp/CVU_11.2.0.4.0_oracle/runfixup.shResponse file being used is :/tmp/CVU_11.2.0.4.0_oracle/fixup.response
Enable file being used is :/tmp/CVU_11.2.0.4.0_oracle/fixup.enable
Log file location: /tmp/CVU_11.2.0.4.0_oracle/orarun.log
Setting Kernel Parameters...
The value for shmmni in response file is not greater than value of shmmni for current session. Hence not changing it.
The value for semmsl in response file is not greater than value of semmsl for current session. Hence not changing it.
The value for semmns in response file is not greater than value of semmns for current session. Hence not changing it.
The value for semmni in response file is not greater than value of semmni for current session. Hence not changing it.
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba),502(oper)
[root@oracle11gr2 ~]#
16. We can check the values present in "/etc/sysctl.conf" and "/etc/security/limits.conf" which are recommended by oracle to be set.
[root@oracle11gr2 ~]# cat /etc/sysctl.conf# Kernel sysctl configuration file for Red Hat Linux
#
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and
# sysctl.conf(5) for more details.
# Controls IP packet forwarding
net.ipv4.ip_forward = 0
# Controls source route verification
net.ipv4.conf.default.rp_filter = 1
# Do not accept source routing
net.ipv4.conf.default.accept_source_route = 0
# Controls the System Request debugging functionality of the kernel
kernel.sysrq = 0
# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1
# Controls the use of TCP syncookies
net.ipv4.tcp_syncookies = 1
# Disable netfilter on bridges.
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0
# Controls the default maxmimum size of a mesage queue
kernel.msgmnb = 65536
# Controls the maximum size of a message, in bytes
kernel.msgmax = 65536
# Controls the maximum shared segment size, in bytes
kernel.shmmax = 68719476736
# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 4294967296
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
[root@oracle11gr2 ~]#
[root@oracle11gr2 ~]# cat /etc/security/limits.conf
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain> <type> <item> <value>
#
#Where:
#<domain> can be:
# - an user name
# - a group name, with @group syntax
# - the wildcard *, for default entry
# - the wildcard %, can be also used with %group syntax,
# for maxlogin limit
#
#<type> can have the two values:
# - "soft" for enforcing the soft limits
# - "hard" for enforcing hard limits
#
#<item> can be one of the following:
# - core - limits the core file size (KB)
# - data - max data size (KB)
# - fsize - maximum filesize (KB)
# - memlock - max locked-in-memory address space (KB)
# - nofile - max number of open files
# - rss - max resident set size (KB)
# - stack - max stack size (KB)
# - cpu - max CPU time (MIN)
# - nproc - max number of processes
# - as - address space limit (KB)
# - maxlogins - max number of logins for this user
# - maxsyslogins - max number of logins on the system
# - priority - the priority to run user process with
# - locks - max number of file locks the user can hold
# - sigpending - max number of pending signals
# - msgqueue - max memory used by POSIX message queues (bytes)
# - nice - max nice priority allowed to raise to values: [-20, 19]
# - rtprio - max realtime priority
#
#<domain> <type> <item> <value>
#
#* soft core 0
#* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#@student - maxlogins 4
# End of file
oracle soft nproc 2047
oracle hard nofile 65536
[root@oracle11gr2 ~]#
17. Click "Install" to start the installation of binary.
18. It will prompt to run the two script using root user.
19. orainstRoot.sh will change the permission.
[root@oracle11gr2 ~]# /u01/app/oraInventory/orainstRoot.shChanging 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@oracle11gr2 ~]#
20. root.sh set the environment variable and make entry in /etc/oratab
[root@oracle11gr2 ~]# /u01/app/oracle/product/11.2.0.4/db_1/root.shPerforming root user operation for Oracle 11g
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /u01/app/oracle/product/11.2.0.4/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.
Finished product-specific root actions.
[root@oracle11gr2 ~]#
21. Then click "ok" and "close" after installation finish.
22. Confirm the successful installation.
[oracle@oracle11gr2 ~]$ cat /u01/app/oraInventory/ContentsXML/inventory.xml<?xml version="1.0" standalone="yes" ?>
<!-- Copyright (c) 1999, 2013, Oracle and/or its affiliates.
All rights reserved. -->
<!-- Do not modify the contents of this file by hand. -->
<INVENTORY>
<VERSION_INFO>
<SAVED_WITH>11.2.0.4.0</SAVED_WITH>
<MINIMUM_VER>2.1.0.6.0</MINIMUM_VER>
</VERSION_INFO>
<HOME_LIST>
<HOME NAME="OraDb11g_home1" LOC="/u01/app/oracle/product/11.2.0.4/db_1" TYPE="O" IDX="1"/>
</HOME_LIST>
<COMPOSITEHOME_LIST>
</COMPOSITEHOME_LIST>
</INVENTORY>
[oracle@oracle11gr2 ~]$
F. Listener Configuration
Subscribe to:
Posts (Atom)