Thursday, July 15, 2010

ORACLE 10G INSTALLATION ON VIRTUAL MACHINE WITH LINUX

HOW TO INSTALL ORACLE 10G ON VIRTUAL MACHINE WITH LINUX



SIMPLE ORACLE SERVER AND SAMPLE DATABASE INSTALLATION

VIRTUAL BOX
http://www.virtualbox.org/wiki/Downloads
Download and install it.
LINUX.
We got Enterprise Linux 4 Update 5 (New License) Media Pack for x86 (32 bit) for our OS
from http://edelivery.oracle.com/EPD/GetUserInfo/get_form?caller=LinuxWelcome
When you are installing, on selecting default or Custom, choose Custom package Now in installation and choose everything there at the bottom.
Remember!
You are just extracting iso file from zip folder you got. The file inside zip folder is smthg like Enterprise-R4-U5-i386-disc1.iso and Don't extract this file, bcos this fil
e is shown like rar file if you use WinRar. You are just indicating this files by sequence in your VirtualBox's CD-Rom in Device menu.

ORACLE INSTALLATION.
1. Open X terminal from menu or right click on desktop and select Terminal.
2. enter su or su - root and enter your password
3. enter the following commands to create the oinstall and dba groups:
/usr/sbin/groupadd oinstall

/usr/sbin/groupadd dba

4. create oracle user

· /usr/sbin/useradd -g oinstall -G dba oracle
to create password for oracle:
passwd oracle
type your password (don't forget it)

5. create partition directories:

mkdir -p /u01/app/oracle

mkdir -p /u02/oradata



Enter following commands to grant ownership & permission: chown -R oracle:oinstall /u01/app/oracle

chown -R oracle:oinstall /u02/oradata

chmod -R 775 /u01/app/oracle

chmod -R 775 /u02/oradata

6. create or edit the /etc/sysctl.conf file entering following: vi /etc/sysctl.conf Press i or o and add or edit lines similar to the following: kernel.shmall = 2097152

kernel.shmmax = 2147483648

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

fs.file-max = 65536 net.ipv4.ip_local_port_range = 1024 65000 To save them Press ESC and press Shift+: and enter wq and hit Enter (if you have them there already, don't enter them if they are same or higher values) 7. Enter the following command to change the current values of the kernel parameters:

/sbin/sysctl -p

8. To increase the shell limits: Enter following: vi /etc/security/limits.conf Add the following lines by pressing i or o :



oracle soft nproc 2047

oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

Now press ESC and Shift+: and type wq to save them.

9. Enter:

vi /etc/pam.d/login



Add the following line to the file by pressing i or o:

session required /lib/security/pam_limits.so Now press ESC and Shift+: and type wq to save them.



10. Changes on the default shell start-up file:

vi /etc/profile

add the following lines to the file by pressing i or o:

if [ $USER = "oracle" ]; then

if [ $SHELL = "/bin/ksh" ]; then

ulimit -p 16384
ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

fi



Now press ESC and Shift+: and type wq to save them.
11. Start another terminal session.
Enter:
su - oracle
type your password



12. Type:

vi .bash_profile

add the following lines to the file by pressing i:

umask 022
ORACLE_BASE=/uo1/app/oracle; export ORACLE_BASE
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_OWNER=oracle; export ORACLE_OWNER
PATH=$PATH:$HOME/bin:$ORACLE_HOME:$ORACLE_HOME/bin export PATH
NLS_LANG=AMERICAN; export NLS_LANG
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib; export LD_LIBRARY_PATH
LIBPATH=$ORACLE_HOME/lib:$LIBPATH;export LIBPATH
ORA_NLS33=$ORACLE_HOME/nls/data; export ORA_NLS33
ORACLE_SID=orcl;export ORACLE_SID
# User specific environment and startup programs
unset USERNAME
#export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
#export PATH=/u01/app/oracle/product/10.2.0/db_1/bin


Now press ESC and Shift+: and type wq to save them.
13. To run the shell startup script, enter the following command:

. ./.bash_profile



14. Enter the following commands to set the TEMP and TMPDIR environment variables

You should choose your own directory where you use your temp files. In example case, I put /tmp directory (it'll work as well):
TEMP=/tmp
TMPDIR=/tmp

export TEMP TMPDIR
15. Enter commands similar to the following to set the ORACLE_BASE and ORACLE_SID environment variables:

ORACLE_BASE=/u01/app/oracle·
ORACLE_SID=orcl
export ORACLE_BASE ORACLE_SID

16. If you have Oracle10g on CD, you should copy all files to hard drive. When you put CD to your CDRom, usually Linux automatically mounts it in /media or /mnt directory. If it is mounted in /media to check it enter following command sequence: cd /media and ls if you see your CD name there (if let's say your CD name is cdrom) cd /cdrom to confirm CD content ls Enter following command if your CD location is /media/cdrom, if not put your location link instead of /media/cdrom: cp -r /media/cdrom /tmp this will copy your CD to /tmp directory.

17. Now you can run install file. Go to directory with entering cd ... command
example: cd /tmp/cdrom

confirm runIntaller exists in this directory by issuing ls command To run runInstaller:

./runInstaller or bash runInstaller



18. Follow instruction on install GUI window. Select sample Database and indicate there /u02/oradata


Move your mouse over this icon to see the image



Move your mouse over this icon to see the image



2. At the Welcome window, click Next.

Move your mouse over this icon to see the image




3. You need to specify your Inventory directory. The location should be set to /u01/app/oracle/oraInventory. Accept the default Operating System group name, oinstall. Then click Next.

Move your mouse over this icon to see the image



4. The following window appears. Leave this window open.

Move your mouse over this icon to see the image



5. You need to execute orainstRoot.sh as the root user. Open a terminal window and enter the following commands:

su

cd /u01/app/oracle/oraInventory
./orainstRoot.sh
exit
exit

Move your mouse over this icon to see the image



6. Switch back to the Universal Installer window and click Continue.

Move your mouse over this icon to see the image




7. At the Specify File Locations window, change the path to /u01/app/oracle/product/10.1.0/db_1. Then click Next.

Move your mouse over this icon to see the image




8. Make sure the Installation Type Enterprise Edition is selected and click Next.

Move your mouse over this icon to see the image



9. The installer now verifies that the system meets all the minimum requirements for installing and configuring the chosen product. Please correct any reported issues before continuing. When the check successfully completes, click Next.

Move your mouse over this icon to see the image




10. You want to create a starter database. Make sure that Create a starter database and General Purpose are both selected. Then click Next.

Move your mouse over this icon to see the image



11. Enter orcl.oracle.com in the Global Database Name field, and select the Create database with example schemas check box. Then click Next. If you plan to perform any of the multilingual lessons, you should select Unicode standard UTF-8 AL32UTF8 as the database character set.

Move your mouse over this icon to see the image



12. The Select Database Management Option window enables you to choose between Database Control or Grid Control of your database. In this example, you accept the default, which is Database Control. Click Next.

Move your mouse over this icon to see the image



13.

Specify the database file location as /u01/app/oracle/oradata and click Next.

Move your mouse over this icon to see the image

14.

In the Specify Backup and Recovery Options window, you do not want to enable automated backups at this time. Accept the default and click Next.

Move your mouse over this icon to see the image

15.

Enter and confirm a password for all accounts, and then click Next.

Move your mouse over this icon to see the image

16.

Review the Summary window to verify what is to be installed. Then click Install.

Move your mouse over this icon to see the image

17.

The progress window appears.

Move your mouse over this icon to see the image

18.

The Configuration Assistants window appears.

Move your mouse over this icon to see the image

19.

Your database is now being created.

Move your mouse over this icon to see the image

20.

When the database is created, click OK.

Move your mouse over this icon to see the image

21.

When the Setup Privileges window appears, open a new terminal window.

Move your mouse over this icon to see the image

22.

You need to execute root.sh as the root user. From your terminal window, enter the following commands:

cd $ORACLE_BASE/product/10.1.0/db_1
su

./root.sh
exit
exit

Move your mouse over this icon to see the image

23.

The End of Installation summary appears. The ports shown in the summary can be found in $ORACLE_BASE/product/10.1.0/db_1/portlist.ini. Click OK.

Move your mouse over this icon to see the image

24.

Click Yes to exit.

Move your mouse over this icon to see the image





NOTE: You need to be oracle user in order to install Oracle (not root user). To force to run runInstaller if some OS requirements don't match: In Red Hat: bash runInstaller -ignoreSysPrereqs or ./runInstaller -ignoreSysPrereqs







VERY IMPORTANT!

If your Linux packages are not completely installed, you have to install required packages, before you start to install oracle on your linux.

Besides, you need X windows configuration libraries to run GUI of installation pack. Mostly, X libraries (like libXp.so.6) are in XFree86...rpm or xorg....x11....rpm packages. You need to install one of these packages to before running you runInstaller.sh .



In most cases, your Red Hat or OLE with kernel 2.4 and higher need following packages:

· gcc-3.2.3-34

· gcc-c++-3.2.3-34

· glibc-2.3.2-95.20

· make-3.79.1

· openmotif21-2.1.30-8

· setarch-1.3-1

· compat-db-4.0.14-5

· compat-gcc-7.3-2.96.128

· compat-gcc-c++-7.3-2.96.128

· compat-libstdc++-7.3-2.96.128

· compat-libstdc++-devel-7.3-2.96.128
To check whether you have these packages, you have to type check them one by one with following command in X-terminal:
rpm -q package-name
(example: rpm -q gcc-3.2.3-34)
To install package after downloading (You need to be root user):
rpm -ivh package_name
If some cases, library could not work for Oracle installation, in that case you can install another package with same library.
In this condition you need to force overwrite existing library:
rpm -ivh --force package_name

No comments:

Post a Comment