Collected from: http://rajiboracle.blogspot.com/2013/05/install.html
Required Software
1. Operating System Red Hat Linux 5.5 64 bit.
2. OracleDatabase 11g R2 64 bit for Linux.
###################### Setup Start Oracle Database 11g R2 ##########################
1. Set IP and host name the following way.
System >Administration >Network
Now set IP in device tag and set host name in Hosts tag.
Now check your IP and host name the following way.
2. Open terminal and write the following
[root@micr~#]vi /etc/hosts
127.0.0.1 localhost.localdomain localhost
10.11.201.200 micr.localdomain micr # micr is the host name
Now ping your user name in the following way.
[root@micr~#]ping micr
(Hints replay 10.11.201.200 IP address. If replay 127.0.0.1 problem)
3. Set minimum parameter settings in the following way.
[root@micr~#]vi /etc/sysctl.conf
Now press i for insert the following lines. And past the following lines.
fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912 # Set this value calculation RAM size*1024*1024*1024
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 = 1048586
[ N.B: If any item is duplicate then set comments previous item Using #)
Check for duplicate item
[root@micr~#]/sbin/sysctl –p
4. Now set limits the following way
[root@micr~#]vi /etc/security/limits.conf
Now press i for insert the following lines. And past the following lines.
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 4096
oracle hard nofile 65536
oracle soft stack 10240
5.Now install the following packages if they are not already present from your DVD.
[root@micr~#]groupadd dba -- Add new group dba
[root@micr~#]groupadd oper -- Add new group oper
[root@micr~#]groupadd asmadmin -- Add new group asmadmin
[root@micr~#]useradd -g oinstall -G dba,oper,asmadmin oracle -- Creating user with group permition.
[root@micr~#]passwd oracle -- Set password for oracle user.
8. Disable secure Linux
[root@micr~#]vi /etc/selinux/config
Making sure the SELINUX flag is set as follows.
SELINUX=disabled
9. Disable Firewall Configuration
Open terminal and execute the following you can see Security Level Configuration Tool and disable firewall.
[root@micr~#]system-config-securitylevel
10. Now reboot your system.
[root@micr~#]reboot
11. Now logon as root user and perform the following
Create and grant permission the directories in which the Oracle software will be installed.
[root@micr~#]mkdir -p /u01/app/oracle/product/11.2.0/db_1 -- Creating directory.
[root@micr~#]chown -R oracle:oinstall /u01 -- Changing ownership
[root@micr~#]chmod -R 775 /u01 -- Changing ownership
12. Now logout from root and login as oracle user and set bash profile in the following way.
[oracle@micr~#]vi .bash_profile
# Now set the following parameter.
ORACLE_HOSTNAME=micr.localdomain; export ORACLE_HOSTNAME #( User Name = micr)
ORACLE_UNQNAME=micrdb; export ORACLE_UNQNAME #(Database name = micrdb)
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_SID= micrdb; export ORACLE_SID #(Database name = micrdb)
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
11. Now extract database and go to runInstaller path and perform the following.
[N.B. – All file disks 1 and disk 2 combine with one folder (database).]
Copy all file from Disk -2 and past in disk-1 in path =database/stage
Open terminal and execute the following.
[oracle@micr~#]./runInstaller
###################### End Of Oracle Database 11g R2 Installation ###################
############################## Setup Auto Start ###############################
12. Edit the "/etc/oratab" file setting the restart flag for each instance to 'Y'.
[oracle@micr~#]vi /etc/oratab
13. Logon as root user
14. Create a new startup script
[oracle@micr~#]vi /etc/init.d/dbora
# Past The Lines
#!/bin/sh
# chkconfig: 345 99 10
# description: Oracle auto start-stop script.
#
# Set ORA_HOME to be equivalent to the $ORACLE_HOME
# from which you wish to execute dbstart and dbshut;
#
# Set ORA_OWNER to the user id of the owner of the
# Oracle database in ORA_HOME.
ORA_HOME=/u01/app/oracle/product/11.2.0/db_1 # Oracle Database Home Location
ORA_OWNER=oracle # Oracle Database User Name
if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
'start')
# Start the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORA_OWNER -c "$ORA_HOME/bin/emctl start dbconsole"
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"
su - $ORA_OWNER -c $ORA_HOME/bin/dbstart
;;
'stop')
# Stop the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORA_OWNER -c "$ORA_HOME/bin/emctl stop dbconsole"
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"
su - $ORA_OWNER -c $ORA_HOME/bin/dbshut
;;
esac
15. Change the permission
[oracle@micr~#]chmod 750 /etc/init.d/dbora
16. Add it to chkconfig
[oracle@micr~#] chkconfig --level 345 dbora on
17. Start and Stop the service using,
[oracle@micr~#]/etc/init.d/dbora start
[oracle@micr~#]/etc/init.d/dbora stop
18. Now reboot Your Server You can see database auto started.
If You face any problem you can Feel free to contract with me. My email Id is:- rajiboracledev@yahoo.com
Thanks
Required Software
1. Operating System Red Hat Linux 5.5 64 bit.
2. OracleDatabase 11g R2 64 bit for Linux.
###################### Setup Start Oracle Database 11g R2 ##########################
1. Set IP and host name the following way.
System >Administration >Network
Now set IP in device tag and set host name in Hosts tag.
Now check your IP and host name the following way.
2. Open terminal and write the following
[root@micr~#]vi /etc/hosts
127.0.0.1 localhost.localdomain localhost
10.11.201.200 micr.localdomain micr # micr is the host name
Now ping your user name in the following way.
[root@micr~#]ping micr
(Hints replay 10.11.201.200 IP address. If replay 127.0.0.1 problem)
3. Set minimum parameter settings in the following way.
[root@micr~#]vi /etc/sysctl.conf
Now press i for insert the following lines. And past the following lines.
fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912 # Set this value calculation RAM size*1024*1024*1024
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 = 1048586
[ N.B: If any item is duplicate then set comments previous item Using #)
Check for duplicate item
[root@micr~#]/sbin/sysctl –p
4. Now set limits the following way
[root@micr~#]vi /etc/security/limits.conf
Now press i for insert the following lines. And past the following lines.
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 4096
oracle hard nofile 65536
oracle soft stack 10240
5.Now install the following packages if they are not already present from your DVD.
cd /media/cdrom/Server
rpm -Uvh binutils-2.*
rpm -Uvh compat-libstdc++-33*
rpm -Uvh compat-libstdc++-33*.i386.rpm
rpm -Uvh elfutils-libelf*
rpm -Uvh gcc-4.*
rpm -Uvh gcc-c++-4.*
rpm -Uvh glibc-2.*
rpm -Uvh glibc-common-2.*
rpm -Uvh glibc-devel-2.*
rpm -Uvh glibc-headers-2.*
rpm -Uvh ksh*
rpm -Uvh libaio-0.*
rpm -Uvh libaio-devel-0.*
rpm -Uvh libgomp-4.*
rpm -Uvh libgcc-4.*
rpm -Uvh libstdc++-4.*
rpm -Uvh libstdc++-devel-4.*
rpm -Uvh make-3.*
rpm -Uvh sysstat-7.*
rpm -Uvh unixODBC-2.*
rpm -Uvh unixODBC-devel-2.*
rpm -Uvh numactl-devel-*
6. Create the new groups and users.
[root@micr~#]groupadd oinstall -- Add new group oinstall
[root@micr~#]groupadd dba -- Add new group dba
[root@micr~#]groupadd oper -- Add new group oper
[root@micr~#]groupadd asmadmin -- Add new group asmadmin
[root@micr~#]useradd -g oinstall -G dba,oper,asmadmin oracle -- Creating user with group permition.
[root@micr~#]passwd oracle -- Set password for oracle user.
8. Disable secure Linux
[root@micr~#]vi /etc/selinux/config
Making sure the SELINUX flag is set as follows.
SELINUX=disabled
9. Disable Firewall Configuration
Open terminal and execute the following you can see Security Level Configuration Tool and disable firewall.
[root@micr~#]system-config-securitylevel
10. Now reboot your system.
[root@micr~#]reboot
11. Now logon as root user and perform the following
Create and grant permission the directories in which the Oracle software will be installed.
[root@micr~#]mkdir -p /u01/app/oracle/product/11.2.0/db_1 -- Creating directory.
[root@micr~#]chown -R oracle:oinstall /u01 -- Changing ownership
[root@micr~#]chmod -R 775 /u01 -- Changing ownership
12. Now logout from root and login as oracle user and set bash profile in the following way.
[oracle@micr~#]vi .bash_profile
# Now set the following parameter.
ORACLE_HOSTNAME=micr.localdomain; export ORACLE_HOSTNAME #( User Name = micr)
ORACLE_UNQNAME=micrdb; export ORACLE_UNQNAME #(Database name = micrdb)
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
ORACLE_SID= micrdb; export ORACLE_SID #(Database name = micrdb)
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
11. Now extract database and go to runInstaller path and perform the following.
[N.B. – All file disks 1 and disk 2 combine with one folder (database).]
Copy all file from Disk -2 and past in disk-1 in path =database/stage
Open terminal and execute the following.
[oracle@micr~#]./runInstaller
###################### End Of Oracle Database 11g R2 Installation ###################
############################## Setup Auto Start ###############################
12. Edit the "/etc/oratab" file setting the restart flag for each instance to 'Y'.
[oracle@micr~#]vi /etc/oratab
micrdb:/u01/app/oracle/product/11.2.0/db_1:Y
13. Logon as root user
14. Create a new startup script
[oracle@micr~#]vi /etc/init.d/dbora
# Past The Lines
#!/bin/sh
# chkconfig: 345 99 10
# description: Oracle auto start-stop script.
#
# Set ORA_HOME to be equivalent to the $ORACLE_HOME
# from which you wish to execute dbstart and dbshut;
#
# Set ORA_OWNER to the user id of the owner of the
# Oracle database in ORA_HOME.
ORA_HOME=/u01/app/oracle/product/11.2.0/db_1 # Oracle Database Home Location
ORA_OWNER=oracle # Oracle Database User Name
if [ ! -f $ORA_HOME/bin/dbstart ]
then
echo "Oracle startup: cannot start"
exit
fi
case "$1" in
'start')
# Start the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORA_OWNER -c "$ORA_HOME/bin/emctl start dbconsole"
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl start"
su - $ORA_OWNER -c $ORA_HOME/bin/dbstart
;;
'stop')
# Stop the Oracle databases:
# The following command assumes that the oracle login
# will not prompt the user for any values
su - $ORA_OWNER -c "$ORA_HOME/bin/emctl stop dbconsole"
su - $ORA_OWNER -c "$ORA_HOME/bin/lsnrctl stop"
su - $ORA_OWNER -c $ORA_HOME/bin/dbshut
;;
esac
15. Change the permission
[oracle@micr~#]chmod 750 /etc/init.d/dbora
16. Add it to chkconfig
[oracle@micr~#] chkconfig --level 345 dbora on
17. Start and Stop the service using,
[oracle@micr~#]/etc/init.d/dbora start
[oracle@micr~#]/etc/init.d/dbora stop
18. Now reboot Your Server You can see database auto started.
If You face any problem you can Feel free to contract with me. My email Id is:- rajiboracledev@yahoo.com
Thanks
############################ End of Setup Auto Start
###############################
0 comments:
Post a Comment