Selasa, 22 September 2020

ORACLE 10-centos5

https://mahmudfahmi.wordpress.com/2010/12/27/installing-oracle-10g-in-centos-5-5/ 

My CentOS is ready to install Oracle 10g in Virtual Box.

I have downloaded Oracle 10g’s Linux version of 32 bit form here and saved it in ‘/opt’.

 

Now, lets unzip it.

cd /opt/

unzip 10201_database_linux32.zip

Then, we will find a folder named ‘database’ in /opt.

Now, lets edit ‘/etc/hosts’.

# Do not remove the following line, or various programs
# that require network functionality will fail.
172.20.1.86             oraclernd.localdomain localhost
::1             localhost6.localdomain6 localhost6

Here 172.20.1.86 is my CentOS’s IP address.

Add the following lines to the /etc/sysctl.conf file.

#kernel.shmall = 2097152
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
#fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144
kernel.shmmax = 838860800

Here,

838860800/1024=819200

819200/1024=800

So, 800mb from ram can be given at max.

Lets run the following command to change the current kernel parameters.
/sbin/sysctl -p

Add the following lines to the /etc/security/limits.conf file.

*               soft    nproc   2047
*               hard    nproc   16384
*               soft    nofile  1024
*               hard    nofile  65536

Add the following line to the /etc/pam.d/login file, if it does not already exist:

session    required     /lib/security/pam_limits.so

Disable secure linux by editing the /etc/selinux/config file, making sure the SELINUX flag is set as follows if it is not already disabled.


SELINUX=disabled

REPORT THIS AD

Now, we need to install a lot package for oracle. Let’s yum it.

yum install setarch-2*
yum install make-3*
yum install glibc-2*
yum install libaio-0*
yum install compat-libstdc++-33-3*
yum install compat-gcc-34-3*
yum install compat-gcc-34-c++-3*
yum install gcc-4*
yum install libXp-1*
yum install openmotif-2*
yum install compat-db-4*

We need another user group to install Oracle. Lets create it.

groupadd oinstall
groupadd dba
groupadd oper

useradd -g oinstall -G dba oracle
passwd oracle

Last command is for setting oracle user’s password.

Lets create the directories in which the Oracle software will be installed:

mkdir -p /oracle/product/10.2.0/db_1
chown -R oracle.oinstall /oracle

Edit the ‘/etc/redhat-release’ file replacing the current release information with the following:

redhat-4

Now i have to login as the oracle user and add the following lines at the end of the /home/oracle/.bash_profile file:


# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
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

if [ $USER = “oracle” ]; then
if [ $SHELL = “/bin/ksh” ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi

In /home/oracle/.bash_profile, we have to understand ORACLE_BASE, ORACLE_HOME and ORACLE_SID.

Now, go to ‘/opt/database/’.

Finally, we will run the actual installer.

./runInstaller

I choose Basic Installation. Oracle Home Location and UNIX DBA Group were already written. I also chose to install database. Global database name has to be same as the SID as given in /home/oracle/.bash_profile.

After Next.


Next

Install

At the time of installing we will find something like this. Known scott user is disabled by default. In this screen, we have to unlock it.

Installation will continue to the final step.

In this step we will find this. Do not click ‘ok’ without running these two command.

We have started the installation by ‘oracle’ user. We have to run shown two commands by root user. So.. su it.

Now, go to the previous screen and click ok.

And after that the final screen. Now exit it and oracle installed.

Now, lets test the database.

Yehhh… its working…. \m/

Tidak ada komentar:

Posting Komentar