Installing Oracle Linux On Virtual Box manager
I am installing Oracle Linux on virtual box manager, you can download it from https://www.virtualbox.org/wiki/Downloads
I am using here Oracle Linux 7.4, download it from http://iso.linuxquestions.org/oracle/oracle-linux-7.4/#oraclelinux-r7-u4-server-x86_64-dvd
After installation of Virtual Box Manager, Click on New on left side.
open terminal and perform following steps
step 5: select enterprise edition
step 6: set Oracle base: /u01/app/oracle
set software location: /u01/app/oracle/product/11.2.0/dbhome_1
Step 7: set Inventory Directory: /u01/app/oraInventory
set oraInventory Group Name: dba
step 8 : set OSDBA group:dba
set OSPER group: dba
step 9: click next (if give any error click ignore all)
step 10: click finish(it will start installation of software)
I am installing Oracle Linux on virtual box manager, you can download it from https://www.virtualbox.org/wiki/Downloads
I am using here Oracle Linux 7.4, download it from http://iso.linuxquestions.org/oracle/oracle-linux-7.4/#oraclelinux-r7-u4-server-x86_64-dvd
After installation of Virtual Box Manager, Click on New on left side.
- New pop box will display, Name: OEL7, choose type to linux, version to Oracle(64 bit) click on next.
- chose hard disk file type to VDI( Virtual Disk Image) click on next.
- storage on physical hard disk chose to dynamically allocated( it will save storage while not using vmbox)
- File Location choose as you want, size of 70 GB click on create.
now you can see OEL7, right click on it and go for settings.
- on left panel go to motherboard
- select base memory (RAM size 2 GB recommended)
- go for storage>controller
- select optical drive: give path of Oracle linux.iso image path
- go to network
- enable network adapter
- select bridged to attached to
- click ok
click on show on top panel, it will start installation of Oracle linux 7
- select Istalling media
- select language click next
- set date and time
- set keyboard
- don't touch installation source( we have already selected it)
- software selection> select all the packages
- Installation destination>
- A 500 MB partition for an ext4 file system that contains /boot
- A partition in the remaining disk space configured an LVM physical volume for an LVM volume group that contains Root(/)
- A logical volume for a swap partition swap size should be double than RAM 4 GB
- disable kdump
- click on done.
it will start installing Oracle Linux.
set password for root user.
after installing all packages go for reboot.
accept license information and go for done.
it will start oracle linux
Installation of Oracle 11g r2 database
This steps should be performed as root user.
If you plan to use the "oracle-validated" package to perform all your prerequisite setup, follow the instructions at http://public-yum.oracle.com to setup the yum repository for OL, then perform the following command.
If you plan to use the "oracle-validated" package to perform all your prerequisite setup, follow the instructions at http://public-yum.oracle.com to setup the yum repository for OL, then perform the following command.
# yum install oracle-validated
All necessary prerequisites will be performed automatically.
It is probably worth doing a full update as well, but this is not strictly necessary.
# yum update
open terminal and perform following steps
[root@pal ~]# grep dba /etc/group
dba:x:501:
dba:x:501:
[root@pal ~]# useradd -g dba -u 101 oracle
[root@pal ~]# grep oracle /etc/passwd
oracle:x:101:501::/home/oracle:/bin/bash
[root@pal ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@pal ~]# mkdir -p /u01/app/oracle
[root@pal ~]# ls -ld /u01
drwxr-xr-x 3 root root 4096 Dec 19 13:49 /u01
[root@pal ~]# chown -R oracle:dba /u01
[root@pal ~]# ls -ld /u01
drwxr-xr-x 3 oracle dba 4096 Dec 19 13:49 /u01
[root@pal ~]# ls -l /u01
total 4
drwxr-xr-x 3 oracle dba 4096 Dec 19 13:49 app
[root@pal ~]# cd /home/oracle
[root@pal oracle]# ls
[root@pal oracle]# ls -a
. .. .bash_logout .bash_profile .bashrc .emacs .kde .zshrc
[root@pal oracle]# vim .bashrc
[root@pal oracle]# cat .bashrc
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
ORACLE_SID=orcl
PATH=$ORACLE_HOME/bin:$HOME/bin:$PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
[root@pal oracle]# cd /etc
[root@pal etc]# vim sysctl.conf
[root@pal etc]# cat 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
# Controls the maximum size of a message, in bytes
kernel.msgmnb = 65536
# Controls the default maxmimum size of a mesage queue
kernel.msgmax = 65536
# Controls the maximum shared segment size, in bytes
kernel.shmmax = 4294967295
# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 268435456
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
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
[root@pal etc]# cd /security
[root@pal security]# vim limits.conf
[root@pal security]# cat 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
# - 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
# - 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
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
# End of file
[root@pal security]#usermod -g dba apache
[root@pal security]# /etc/init.d/network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
[root@seat11g security]#[root@pal ~]# grep oracle /etc/passwd
oracle:x:101:501::/home/oracle:/bin/bash
[root@pal ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@pal ~]# mkdir -p /u01/app/oracle
[root@pal ~]# ls -ld /u01
drwxr-xr-x 3 root root 4096 Dec 19 13:49 /u01
[root@pal ~]# chown -R oracle:dba /u01
[root@pal ~]# ls -ld /u01
drwxr-xr-x 3 oracle dba 4096 Dec 19 13:49 /u01
[root@pal ~]# ls -l /u01
total 4
drwxr-xr-x 3 oracle dba 4096 Dec 19 13:49 app
[root@pal ~]# cd /home/oracle
[root@pal oracle]# ls
[root@pal oracle]# ls -a
. .. .bash_logout .bash_profile .bashrc .emacs .kde .zshrc
[root@pal oracle]# vim .bashrc
[root@pal oracle]# cat .bashrc
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# User specific aliases and functions
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1
ORACLE_SID=orcl
PATH=$ORACLE_HOME/bin:$HOME/bin:$PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
[root@pal oracle]# cd /etc
[root@pal etc]# vim sysctl.conf
[root@pal etc]# cat 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
# Controls the maximum size of a message, in bytes
kernel.msgmnb = 65536
# Controls the default maxmimum size of a mesage queue
kernel.msgmax = 65536
# Controls the maximum shared segment size, in bytes
kernel.shmmax = 4294967295
# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 268435456
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
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
[root@pal etc]# cd /security
[root@pal security]# vim limits.conf
[root@pal security]# cat 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
# - 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
# - 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
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
# End of file
[root@pal security]#usermod -g dba apache
[root@pal security]# /etc/init.d/network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: [ OK ]
Login as Oracle User
copy source of oracle database
open terminal
[oracle@pal] cd Desktop/database (location of setup)
[oracle@pal database]./runInstaller
step 1 provide email id and click next
step 2: select Install database software only
step 3 select single instance database installation
Step 4: select language
step 5: select enterprise edition
step 6: set Oracle base: /u01/app/oracle
set software location: /u01/app/oracle/product/11.2.0/dbhome_1
Step 7: set Inventory Directory: /u01/app/oraInventory
set oraInventory Group Name: dba
step 8 : set OSDBA group:dba
set OSPER group: dba
step 9: click next (if give any error click ignore all)
step 10: click finish(it will start installation of software)
step 11: this step will take some time
it will ask to run scripts.
Open terminal
[oracle@pal]$ su root
[root@pal]# ./u01/app/oraInventory/orainstroot.sh
[root@pal]# ./u01/app/oracle/product/11.2.0/dbhome_1/root.sh
after completion of this script press ok and then finish.
Note: DBCA, netmgr, netca location is $ORACLE_HOME/bin
No comments:
Post a Comment