Friday, April 13, 2007

Oracle 10g Installation in Solaris 10

This guide describes how to quickly install Oracle Database 10g on Solaris 5.10 systems. Though it is a complete installation guide , you are requested to follow the installation manual provided by ORACLE


Install Solaris

During installation of Solaris, create two additional partition named 'ORACLE' and 'ORADATA' which contain Oracle base directory and Oracle datafile directory respectively. The Swap partition must be grater than 400MB (2GB recommended or Double of current RAM size)
(You can install Oracle in one partition but above arrangement has been followed in most software projects)

Log In to the System as root

Before you install the Oracle software, you must complete several tasks as the root user. If you are installing the software from an X Window System workstation or X terminal:
  • Start a local terminal session, for example, an X terminal (xterm).

Check the Hardware Requirements

Requirement Minimum Value
  • Physical memory (RAM) 512 MB (524288 KB)
  • Swap space 1 GB (1048576 KB) or twice the size of RAM
  • Disk space in /tmp 400 MB (409600 KB)
  • Disk space for software files 2.5 GB (2621440 KB)
To ensure that the system meets these requirements, follow these steps:
  1. To determine the physical RAM size, enter the following command:
    # /usr/sbin/prtconf | grep "Memory size"
  2. To determine the size of the configured swap space, enter the following command:
    # /usr/sbin/swap -s
  3. To determine the amount of free disk space available in the /tmp directory, enter the following command:
    # df -k /tmp
  4. To determine the amount of free disk space available on the system, enter the following command:
    # df -k
  5. To determine whether the system architecture is 64-bit, enter the following command:
    # /bin/isainfo -kv

Check the Software Requirements

The system must meet the following minimum software requirements:
  • The version of Solaris must be Solaris 8 or Solaris 9.
  • The following packages must be installed:
    1. SUNWarc
    2. SUNWlibms
    3. SUNWi1of
    4. SUNWbtool
    5. SUNWsprot
    6. SUNWi15cs
    7. SUNWi1cs
    8. SUNWhea
    9. SUNWsprox
    10. SUNWlibm
    11. SUNWtoo
    12. SUNWxwfnt
To ensure that the system meets these requirements, follow these steps:
  1. To determine which version of Solaris is installed, enter the following command:
    # uname -r
    5.8
    In this example, the version shown is Solaris 8 (5.8). If necessary, see your operating system documentation for information about upgrading the operating system.
  2. To determine whether the required packages are installed, enter a command similar to the following:
    # pkginfo -i SUNWarc SUNWbtool SUNWhea SUNWlibm SUNWlibms \SUNWsprot SUNWsprox SUNWtoo SUNWi1of SUNWi1cs SUNWi15cs \ SUNWxwfnt
    If a package is not installed, then install it. See your operating system or software documentation for information about installing packages.
  3. To determine whether an operating system patch is installed, enter a command similar to the following:
    # /usr/sbin/patchadd -p | grep patch_number
If an operating system patch is not installed, download it from the following Web site and install it: http://sunsolve.sun.com

Create Required UNIX Groups and User

First of all following users and groups should be created
  1. Group oinstall, dba, oper (optional)
  2. . user oracle having oinstall as primary group
use the following commands to create required groups and user (as root user)
groupadd oinstall

groupadd dba

groupadd oper

useradd -g oinstall -G dba[,oper] -d /export/home/oracle -s /usr/bin/bash -m oracle

passwd -r files oracle
Now create a project for oracle so that all resources can be alloacated to this project as root user
  
projadd oracle

Create Required Directories

Create directories with names similar to the following and specify the correct owner, group, and permissions for them:
/u01/app/oracle (the Oracle base directory: u01=oracle)
/u02/oradata (an optional Oracle datafile directory : u02=oradata)
(Hear u01, u02 are the partition named oracle and oradata respectively)
Identify one file system with 2.5 GB (10 GB for Therap) of free disk space, for the Oracle base directory, and another file system with 1.2 GB (45 GB for Therap) of free disk space for the Oracle datafile directory.
To create the required directories and specify the correct owner, group and permissions for them, follow these steps:
  1. Enter the following command to create subdirectories in the mount point directory that you identified for the Oracle base directory: # mkdir -p /u01/app/oracle
  2. If you intend to use a second file system for the Oracle database files, create an oradata subdirectory in the mount point directory that you identified for the Oracle datafile directory (shown as /u02 in the examples): # mkdir /u02/oradata
  3. Change the owner and group of the directories that you created to the oracle user and the oinstall group:
    # chown -R oracle:oinstall /u01/app/ oracle /u02/oradata
  4. Change the permissions on the directories that you created to 775:
    #chmod -R 775 /u01/app/oracle /u02/oradata

Configure Kernel Parameters

Verify that the following kernel parameters are set to values greater than or equal to the recommended value shown:

Table: 1
Parameter Recommended Value
noexec_user_stack 1
semsys:seminfo_semmni 100
semsys:seminfo_semmns 1024
semsys:seminfo_semms 256
shmsys:shminfo_shmmax 4294967295
shmsys:shminfo_shmmin 1
shmsys:shminfo_shmmni 100
shmsys:shminfo_shmseg 10
semsys:seminfo_semvmx 32767
To view the current value specified for these kernel parameters, and to change them if necessary, follow these steps:
  1. To view the current values of these parameters, enter the following commands:
    # grep noexec_user_stack /etc/system
    # /usr/sbin/sysdef | grep SEM
    # /usr/sbin/sysdef | grep SHM
  2. If you have to change any of the current values, follow these steps:
    1. Create a backup copy of the /etc/system file, for example:# cp /etc/ system /etc/system.orig
    2. Open the /etc/system file in any text editor: # vi /etc/system
    3. To specify new values for the parameters, add lines similar to the following to the /etc/system file, or edit the lines if the file already contains them:
      set noexec_user_stack=1
      set semsys:seminfo_semmni=100
      set semsys:seminfo_semmns=1024
      set semsys:seminfo_semmsl=256
      set semsys:seminfo_semvmx=32767
      set shmsys:shminfo_shmmax=4294967295
      set shmsys:shminfo_shmmin=1
      set shmsys:shminfo_shmmni=100
      set shmsys:shminfo_shmseg=10
    4. Reboot the system
To view the current value specified for these kernel parameters, and to change them if necessary, follow these steps:
  1. To view the current values of these parameters, enter the following commands:
    # id -p // to verify the project id
    uid=0(root) gid=0(root) projid=1 (user.root)
    # prctl -n project.max-shm-memory -i project user.root
    # prctl -n project.max-sem-ids -i project user.root
  2. If you must change any of the current values, then follow these steps:
    1. To modify the value of max-shm-memory to 6 GB: # prctl -n project.max-shm-memory -v 6gb -r -i project user.root
    2. To modify the value of max-sem-ids to 256: # prctl -n project.max-sem-ids -v 256 -r -i project user.root

Log In as the oracle User and Configure the oracle User’s Environment

You run the Installer from the oracle account. However, before you start the installer you must configure the environment of the oracleuser. To configure the environment, you must:
  1. Set the default file mode creation mask (umask) to 022 in the shell startup file.
  2. Set the DISPLAY, ORACLE_BASE, and ORACLE_SID environment variables.
To set the oracle user’s environment, follow these steps:
  1. Start another terminal session.
  2. To determine the default shell for the oracle user, enter the following command:$ echo $SHELL
  3. Open the oracle user’s shell startup file in any text editor:$ vi .profile
  4. Enter or edit the following line in the shell startup file, specifying a value of 022 for the default file creation mask: umask 022
  5. Save the file and exit from the editor.
  6. Reboot
  7. Enter commands similar to the following to set the ORACLE_BASE and ORACLE_SID environment variables:
    $ ORACLE_BASE=/u01/app/oracle
    $ ORACLE_SID=sales
    $ export ORACLE_BASE ORACLE_SID
  8. Enter the following commands to ensure that the ORACLE_HOME an TNS_ADMIN environment variables are not set:
    $ unset ORACLE_HOME
    $ unset TNS_ADMIN
  9. To verify that the environment has been set correctly, enter the following commands:
    $ umask
    $ env | more
Verify that the umask command displays a value of 022 and the environment variables that you set in this section have the correct values.

Install Oracle Database 10g

After configuring the oracle user’s environment, start the Installerand install the Oracle software, as follows: $ /cdrom/cdrom0/runInstaller
The following table describe the recommended action of each installation screen
Table: 2
Screen Recommended Action
Welcome Click Next.
Select Installation Method The Basic Installation option is selected by default. Specify the directory path of the Oracle home. Ensure that the UNIX DBA group “oinstall” is selected. If you want to create a starter database, then specify a name and password for it. Then, click Next.
Specify Inventory Directory and Credentials This screen is displayed only during the first installation of Oracle products on a system. Specify the full path of the Oracle Inventory directory as “/oracle”. Ensure that the operating system group selected is “dba”. Then, click Next.
Product-Specific Prerequisite Checks Verify that all of the prerequisite checks succeed, then click Next.
Oracle Universal Installer checks the system to verify that it is configured correctly to run Oracle software. If you have completed all of the preinstallation steps in this guide, all of the checks should pass. If a check fails, then review the cause of the failure listed for that check on the screen. If possible, rectify the problem and rerun the check. Alternatively, if you are satisfied that your system meets the requirements, then you can select the check box for the failed check to manually verify the requirement.
Specify Oracle Datafile Directory Specify the full path of the Oracle Oracle Datafile directory as “/oradata”.
Summary Review the information displayed on this screen, and then click Install.
Install This screen displays status information while the product is being installed.
Configuration Assistants This screen displays status information for the configuration assistants that configure the software and create a database. When the message is displayed at the end of this process, click OK to continue.
Execute Configuration Scripts When prompted, read the instructions and then run the scripts(root.sh, Root.sh) mentioned on this screen. Click OK to continue.
End of Installation The configuration assistants configure several Web-based applications, including Oracle Enterprise Manager Database Control. This screen displays the URLs configured for these applications. Make a note of the URLs used. The port numbers used in these URLs are also recorded in the following file:
oracle_home/install/portlist.ini
To exit from Oracle Universal Installer, click Exit and then click Yes.

After Installation

  1. open the file /var/opt/oracle/oratab in your favourite editor. at the end of this file all the databases are listed like this orcl:/oracle/app/oracle/oracle/product/10.2.0/db_1:N
  2. Replace N by Y
  3. if you install 2 database then you’ll have 2 such lines in this file .if the lines contain N at the end. It means this database won’t be started during system bootup. change it to Y as above and save the file.
  4. Open the oracle user’s shell startup file in any text editor: $ vi .profile
    add $ ORACLE_HOME= oracle home path
    $ ORACLE_SID= database SID
    $ export ORACLE_ SID ORACLE_HOME
  5. save and exit the editor and reboot
  6. congratulation you complete the installation process successfully.





Post a Comment