Forgot your password?    
+ Reply to Thread
Results 1 to 6 of 6

Thread: Oracle 10G Software and Database Installation

  1. #1
    Expert Oracle Administrator
    Join Date
    Oct 2011
    New Delhi, India

    Oracle 10G Software and Database Installation

    There are four phases to getting Oracle up and running on your server:

    - Prepare the server
    - Install the Oracle software and latest patch set
    - Create a database
    - Complete the server configuration

    These steps configure your database server so that it will be ready to accept the Oracle software and database. In this section, we will make sure your server meets Oracle’s minimum requirements, create a Linux user and group to “own” the software, and create some directories that will be used by the Oracle software and database. All of the steps in this section are run as the root user.

    Make sure that your hardware platform (processor architecture) is certified by Oracle Corporation for use with Oracle Database 10g release 2, and that you have acquired the correct distribution of Oracle software for your hardware platform.

    The following commands can be used to identify the processor architecture on your database server:

    $ uname -m
    $ grep "model name" /proc/cpuinfo

    Make sure that your Linux distribution is certified by Oracle Corporation for use with Oracle Database 10g release 2.

    On systems running Red Hat distributions of Linux, you can use the following command to determine exactly which version and update of Red Hat you are using:

    $ cat /etc/redhat-release

    Make sure that all of the required operating system packages have been installed on the database server. Which packages and versions are required will vary depending on your Linux distribution and hardware platform. The package version specified is typically a minimum, meaning that newer versions of the package are usually acceptable.

    Required Packages for Red Hat Enterprise Linux 4


    Required Packages for Red Hat Enterprise Linux 4(x86-64 Hardware Platform)

    compat-libstdc++-33-3.2.3-47.3 (32 and 64-bit)
    glibc-devel-2.3.4-2.9 (both 32 and 64 bit required)
    libaio-0.3.103-3 (both 32 and 64 bit required)

    You can use the following command to verify that a package has been installed:

    $ rpm -q <package name>

    The following command will verify all of the packages required on Red Hat Enterprise Linux 4 (x86) systems:

    $ rpm -q binutils compat-db compat-libstdc++-296 control-center gcc \
    gcc-c++ glibc glibc-common gnome-libs libstdc++ libstdc++-devel \
    make pdksh sysstat xscreensaver setarch

    If you are planning to install Red Hat Enterprise Linux 4 on an x86 or x86-64 server, you will likely find that all of the necessary packages are loaded for you if you select “Customize” during the package group selection phase of the Linux installation, followed by choosing the “Everything” option.

    Note that in some cases both the 32 bit and 64 bit architecture of an RPM are required. You can verify that both have been installed with a command similar to the following:

    $ rpm -qa --queryformat "%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n" | grep libaio

    You will need to perform the Oracle installation from an X window environment—you cannot use a character mode environment such as an SSH or telnet session. There is a facility for performing non-interactive installations (“silent” installs). The Installtion covered here required GUI.

    Make sure that your hardware is sufficient. You’ll need at least 1024 Mb RAM, a swap space at least the size of physical memory (or 1.5 times the amount of physical memory if you has 2 Gb or less of RAM) , and a bare minimum of 2.6 Gb of disk space. This will let you perform a “typical” Enterprise or Standard Edition software installation from CD or DVD and create a starter database.

    A production implementation typically requires more RAM and more disk space than the minimums listed here. The following commands will allow you to check physical memory and swap space:
    $ grep MemTotal /proc/meminfo
    $ grep SwapTotal /proc/meminfo

    The Oracle installer will need access to a directory with at least 400 Mb of free space for writing temporary files during installation. Usually /tmp serves this purpose. If /tmp on your database server has less than 400 Mb of free space, then you will need to locate another directory with sufficient free space for use during the installation.

  2. #2
    Expert Oracle Administrator
    Join Date
    Oct 2011
    New Delhi, India
    Make sure that the Linux kernel on the database server has parameters set sufficiently high for Oracle. The Oracle architecture makes extensive use of shared memory segments for sharing data among multiple processes and semaphores for handling locking. Many operating systems, including Linux, do not by default offer sufficient shared memory or semaphores for optimal Oracle performance. Thankfully, you can change kernel parameters in Linux simply by editing the /etc/sysctl.conf file and rebooting the server.

    The following script will show the current settings of the Linux kernel parameters relevant to Oracle:
    /sbin/sysctl -a > $K 2> /dev/null
    grep kernel.shm $K
    echo "`grep sem $K | tr '\t' ' '` # semmsl semmns semopm semmni"
    grep file-max $K
    grep ip_local_port_range $K | tr '\t' ' '
    grep rmem_default $K
    grep rmem_max $K
    grep wmem_default $K
    grep wmem_max $K
    rm -f $K

    The following table shows the purpose of each of these kernel parameters and a recommended setting to get you started:

    Kernel Parameter Setting To Get You Started

    shmmni 4096 Maximum number of shared memory segments
    shmall 2097152 Maximum total shared memory (4 Kb pages)
    shmmax 2147483648 Maximum size of a single shared memory segment
    semmsl 250 Maximum number of semaphores per set
    semmns 32000 Maximum number of semaphores
    semopm 100 Maximum operations per semop call
    semmni 128 Maximum number of semaphore sets
    file-max 65536 Maximum number of open files
    ip_local_port_range 1024 - 65000 Range of ports to use for client connections
    rmem_default 1048576 Default TCP/IP receive window
    rmem_max 1048576 Maximum TCP/IP receive window
    wmem_default 262144 Maximum TCP/IP send window
    wmem_max 262144 Maximum TCP/IP send window

    These settings will be appropriate for most systems. If you decide to configure a very large buffer cache or library cache for your database down the road, or if you choose to run a large number of databases on one server, then you may need to increase the shmall setting and possibly the shmmax setting as well. In addition, if you configure your database to allow a large number of concurrent sessions without using Oracle's shared server architecture, then you may need to increase the semmsl and semmns settings as well.

    Note that these recommended settings assume you have no other applications running on the database server that use shared memory segments or semaphores. You can view current shared memory and semaphore usage on your system with the following command:

    $ ipcs

    In general, if your Linux kernel already has any of these parameters set larger than recommended here, you should not reduce the settings. If you do change any kernel parameter settings in /etc/sysctl.conf, then reboot the server so that the new settings will take effect.

    Edit/added the following lines to the end of our /etc/sysctl.conf file:

    # Kernel parameter settings for Oracle
    kernel.shmmni = 4096
    kernel.shmall = 2097152
    kernel.shmmax = 2147483648
    kernel.sem = 250 32000 100 128
    net.ipv4.ip_local_port_range = 1024 65000
    net.core.rmem_default = 1048576
    net.core.rmem_max = 1048576
    net.core.wmem_default = 262144
    net.core.wmem_max = 262144

    Create a Linux group that will be used by the Oracle software owner.
    You can call it anything you like, but the standard is “oinstall”. This group is often called the “Oracle Inventory” group.
    You can create your oinstall group with a command like:

    $ /usr/sbin/groupadd -g 501 oinstall

    Create a Linux group that will be used by Oracle database administrators.
    You can call it anything you like, but the standard is “dba”.
    Anybody who logs onto the database server with a Linux login that belongs to this group will be able to log onto all databases that run from this Oracle software installation with DBA privileges.
    You can create your dba group with a command like:

    $ /usr/sbin/groupadd -g 502 dba

    Create a Linux user that will be the Oracle software owner.
    You can call it anything you like, but the standard is “oracle”.
    Note that this user’s home directory will not be the ORACLE_HOME or where the actual Oracle software is installed; this user’s home directory should be in the same place as other users’ home directories.

    The Oracle software owner should have the oinstall group as the primary group and the dba group as a secondary group. You can create your oracle user with commands like:

    $ /usr/sbin/useradd -c 'Oracle software owner' -d /home/oracle \
    -g oinstall -G dba -m -u 501 -s /bin/bash oracle
    $ passwd oracle

    The useradd command shown here give your oracle user the Bash shell. You could just as easily choose Korn or Bourne shell instead.

    For larger systems, it will be necessary to increase limits that the shell imposes on the oracle user for maximum number of open file descriptors and processes. Follow these steps to increase the limits:

    Add the following lines in the /etc/security/limits.conf file:
    oracle soft nproc 2047
    oracle hard nproc 16384
    oracle soft nofile 1024
    oracle hard nofile 65536

    Add the following lines to the /etc/pam.d/login file, if they are not already present:
    session required /lib/security/
    session required

    Add the following lines in the /etc/profile file (or the /etc/profile.local file on SUSE systems) if the oracle user uses the Bash, Korn or Bourne shell:
    if [ $USER = "oracle" ]; then
    if [ $SHELL = "/bin/ksh" ]; then
    ulimit -p 16384
    ulimit -n 65536
    ulimit -u 16384 -n 65536

    If the oracle user uses the C shell, then add the following lines in the /etc/csh.login file (or the /etc/csh.login.local file on SUSE systems):
    if ( $USER == "oracle" ) then
    limit maxproc 16384
    limit descriptors 65536

    Create mount points for the Oracle software and the Oracle database.
    Each mount point should correspond to a separate physical device or set of devices. You’ll need at least one mount point. Typically you use one mount point for the Oracle software and one or more mount points for each database. One common convention is to call the mount points /u01, /u02, and so on.

    Because mount points are typically owned by root and the Oracle installer will run as the oracle user and not as root, you should create some subdirectories now to avoid permission problems later. Create an app/oracle subdirectory below the software mount point, and oradata subdirectories below the mount points to be used for database files. (You can put software and a database on the same mount point if you wish.) Make these subdirectories owned by the oracle user and oinstall group, and give them 775 permissions. You can use commands like:
    $ mkdir /u01/app /u01/app/oracle /u01/oradata
    $ chown oracleinstall /u01/app /u01/app/oracle /u01/oradata
    $ chmod 775 /u01/app /u01/app/oracle /u01/oradata

  3. #3
    Expert Oracle Administrator
    Join Date
    Oct 2011
    New Delhi, India
    If you downloaded the Oracle software Oracle Technology Network, then use unzip to unpack the distribution.
    If you have the software on CD or DVD, then mount the Oracle Database 10g release 2 media now.

    Install the Oracle Software

    The Oracle Universal Installer will suggest creating a database at the same time that it installs the Oracle software.

    Edit the oracle user’s login file on the database server so that the environment will be configured automatically on login.
    If you are using Bash shell, then edit .bash_profile.
    If you are using Bourne or Korn shell, then edit .profile.
    If you are using C shell , edit .cshrc, but the syntax will be different from the examples you see here.

    Here is what we added to our .bash_profile for the install:

    umask 022
    # Substitute your Oracle software mount point in the line below.
    export ORACLE_BASE=/u01/app/oracle
    # Ensure that ORACLE_HOME and TNS_ADMIN are not set.
    unset ORACLE_HOME
    unset TNS_ADMIN
    # If your /tmp directory has less than 400 Mb free, then edit
    # and uncomment the following three lines.
    # TMP=/mount_point_with_400_mb_free
    # TMPDIR=/same_mount_point
    # export TMP TMPDIR
    # The documentation does not mention how PATH should be set.
    # The following PATH setting worked for us:
    export PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin

    Log out and log back in as the oracle user from an X window so that the environment is set correctly.
    As an alternative to X, you may wish instead to start a VNC server on your database server by running the following command as the oracle user:
    $ /usr/bin/vncserver

    With a VNC server running in this way, you can achieve an X environment by running a VNC viewer on your desktop workstation. You can shut down the VNC server by running the following command:
    $ /usr/bin/vncserver -kill :1

    Make sure your DISPLAY variable is set. If you are forwarding X window traffic over an SSH connection, using VNC, or working from the server’s console directly, the DISPLAY variable should already be set for you. If your DISPLAY variable has not been set already, then you will need to set it manually to the IP address of your X server plus the X server and screen numbers. You can set your DISPLAY variable with a command like:
    $ export DISPLAY=myserver:0.0

    If you had to set your DISPLAY variable manually in the previous step, then ensure that the X server on your workstation will allow your database server to open windows on your display.
    To do this is to issue an xhost command like:

    $ xhost +

    Ensure that the mount point you plan to use for the Oracle software has sufficient free space. For a basic Enterprise Edition and patch set installation, allow 1.6 Gb for the software mount point as a bare minimum.

    Double check that you are logged in as oracle and not root, and that the environment variables have been set by the login script you prepared earlier.
    Check that DISPLAY is working for you using : xclock

    Then change to your home directory and start the Oracle Universal Installer with a command like one of the following:

    $ <full path to DVD>/database/runInstaller
    $ <full path to CD>/runInstaller
    We’ll walk through the installer prompts one at a time:

    - The Select Installation Method window appears. Choose Advanced Installation and then click Next.

    - If the Specify Inventory Directory and Credentials window appears, verify that the inventory directory is set to the oraInventory subdirectory of the directory referenced by the ORACLE_BASE environment variable you set in the login script.

    - In the Operating System Group Name field, select the oinstall group. Click Next. You won't see this window if you have previously installed Oracle software on this database server.

    - The Select Installation Type window appears. We will perform a “typical” install to get a basic set of Oracle software installed.

    - For now, choose Standard Edition or Enterprise Edition. The Enterprise Edition of Oracle Database 10g has some very sophisticated features missing from Standard Edition, and the opportunity to purchase additional options that might be valuable to a large enterprise. However, the Enterprise Edition is much more expensive than Standard Edition. It is very important that you choose the edition that matches your license, as this will be difficult to fix later. Click Next.

    - The Specify Home Details window appears. Oracle provides a suggested Name and Path for the Oracle home (software installation) that is about to be created. You can name this Oracle home anything you like. Beginning in Oracle Database 10g the standard for Oracle home location has changed to /<mount-point>/app/oracle/product/10.2.0/db_<N>. The new component at the end, such as db_1 or db_2, allows you to install multiple copies of the same Oracle version on one server in a standardized way. we will refer to this path , calling it the Oracle home or simply $ORACLE_HOME.
    When you are satisfied with the name and path for your Oracle home, click Next.

    - At this point Oracle performs a serries of prerequisite checks. If you performed all of the preparation steps correctly, all checks should be successful and you can simply click the Next button. If there are any problems, you can correct the problem and click Retry, or click checkboxes in order to ignore specific warnings or error messages.

    - If you have any existing Oracle databases on your server that are at a version prior to what you are now installing, the installer will ask if you would like to run the Database Upgrade Assistant at the end of the installation to migrate or upgrade these older databases to the current version. Make your decision and click Next. (We won’t be covering the Database Upgrade Assistant here.)

    - The Select Configuration Options window appears. We could have Oracle create a database at the same time the software is installed, but this would not be a good idea because we would have to immediately patch the database when we install the patch set. We will choose the “Install database Software only” option instead. After we have applied the patch set, we will use the Database Configuration Assistant to create a database. Click Next.

    - The Summary window appears. Review all of the selections you have made to confirm they are correct. Click Install.
    During the installation an Execute Configuration Scripts window will appear.

    - : The installation will be paused at this point, waiting for you to run scripts as root. (The first time you install Oracle software on the database server there will be two scripts to run as root, while additional installations only require one script to be run as root.) You should open another window, log in to the database server as root, review the scripts to be run thoroughly, run the scripts, and click OK in the Execute Configuration Scripts window.

    - The End of Installation window appears. URLs for iSQL*Plus will be displayed. Note these URLs for future reference. Click Exit to exit the installer.
    You can run the installer again and perform a custom installation to install any individual products that did not get installed as part of the “typical” installation.

  4. #4
    Expert Oracle Administrator
    Join Date
    Oct 2011
    New Delhi, India
    Set the ORACLE_HOME environment variable to point to your Oracle home with a command like:

    $ export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1

    In $ORACLE_HOME/bin (the bin directory under your Oracle home) you will find a shell script called oraenv. This script can be called from .bash_profile or .profile to set up a user’s environment automatically whenever they log onto the database server. We will customize the oraenv script because there are a few variables that the script should set but doesn’t. Make a backup copy of the oraenv script and then edit it, adding the following lines to the very end:
    # Begin customizations
    case "$ORACLE_BASE" in
    */product) ORACLE_BASE=`dirname $ORACLE_BASE` ;;
    *) ;;
    # Substitute the locale and character set you plan to use for your
    # database in the line below. Some common choices are:
    # NLS_LANG=american_america.WE8ISO8859P1 (Linux and Unix default)
    # NLS_LANG=american_america.AL32UTF8 (Unicode 3.1)
    # NLS_LANG=american_america.UTF8 (Unicode 3.0)
    # NLS_LANG=american_america.WE8MSWIN1252 (Windows)
    # End customizations
    In the same directory you’ll also find a shell script called coraenv that can be called from .cshrc. If you use C shell, you will want to back up and edit coraenv with similar changes to the oraenv script.

    The script copied oraenv and coraenv from $ORACLE_HOME/bin to the /usr/local/bin directory. You just updated these scripts in $ORACLE_HOME/bin. Copy the updated versions to the /usr/local/bin directory.

  5. #5
    Expert Oracle Administrator
    Join Date
    Oct 2011
    New Delhi, India
    Create a Database

    These steps create an Oracle database. Everybody will have different needs for their database, but the steps here will yield a functional database that you can further tailor to your specific needs. In this section we will use the Database Configuration Assistant to create a database, adjust the database in order to better comply with industry-proven best practices, and configure Oracle Net. All of the steps in this section are run as the oracle user.

    Set up your environment the same way you did when you ran the Oracle Universal Installer: Log in as the oracle user on the database server from an X window or VNC session, set your DISPLAY variable appropriately, and make sure that your ORACLE_BASE variable is set correctly based on your login file.

    Set the ORACLE_HOME environment variable to point to your Oracle home with a command like:
    $ export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1

    Choose a name for your Oracle instance, up to eight characters long.
    Set the ORACLE_SID variable accordingly with a command like:
    $ export ORACLE_SID=test

    Launch the Database Configuration Assistant with the following commands:
    $ cd $ORACLE_HOME/bin
    $ ./dbca
    We’ll walk through the prompts one at a time:

    - The Welcome window appears. Click Next.

    - The Operations window appears. Choose “Create a Database” and click Next.

    - The Database Templates window appears. Here you choose a template (a set of default specifications) for the database you wish to create. Oracle provides templates called “Data Warehouse,” “General Purpose,” and “Transaction Processing.” Oracle has pre-built data files available for these three templates, meaning that database creation will go faster than if Oracle has to build the database from scratch. You can also choose Custom and create your own template. We will choose General Purpose here. Click Next.

    - The Database Identification window appears. Here you specify the global name and the instance name (SID) for the database. It would be nice if these fields defaulted from the ORACLE_SID environment variable, but this may or may not happen. In the Global Database Name field, enter the database name you selected, followed by a period and your domain name. For example, “”. The SID field will fill in automatically from the global name. Click Next.

    - The Management Options window appears. Here you indicate whether or not you wish to have the Enterprise Manager tool configured. Grid Control is Oracle’s enterprise-wide database management tool. This option will be grayed out if Grid Control infrastructure has not already been established. Database Control is a stand-alone management tool specifically configured to manage one database.

    - The Database Credentials window appears. Every Oracle 10g database has accounts called SYS, SYSTEM, DBSNMP, and SYSMAN. You must provide passwords for each of these accounts, although you can choose to give all four the same password. Enter the initial passwords for these accounts and click Next.

    - The Storage Options window appears. The files that make up an Oracle database can be stored on a regular file system, raw devices, or disks managed automatically by Oracle’s Automatic Storage Management facility. Select File System and click Next.

    - The Database File Locations window appears. Here you specify where on the file system the files that make up the database should initially reside. It will be easy to change file locations later, and database files can be spread over multiple directories. Select “Use Common Location for All Database Files” and enter a mount point name followed by the oradata subdirectory, such as “/u01/oradata”. The location you enter here should match one of the directories you created earlier in the first section above. Click Next.

    - The Recovery Configuration window appears.The flash recovery area is used by the “Flashback database” feature and also by Enterprise Manager if you chose to configure automatic database backups. Archiving, meanwhile, is necessary for databases that will be backed up while they are open. click Next.

    - The Database Content window appears. This window contains multiple tabs where you may choose what data will be preloaded in the new database. Make your selections and click Next.

    - The Initialization Parameters window appears. Tabs in this window let you set various initialization parameters, and a button lets you view and edit all parameters in a tabular form. Click Next.

    - The Database Storage window appears. Here you can review and edit the details of how the control files, online redo logs, data files, and tablespaces will be created. If you want to change the locations of some of the database files, you can do that here or after the database has been created. When you are satisfied with the settings, click Next.

    - The Creation Options window appears. You may choose to create the database now, generate scripts to create the database later, and/or save the settings as a template. Saving as a template allows you to create the database at a later time or create many similar databases more easily. Make your selection and click Finish.

    - A Confirmation window appears. Review all of your selections and click OK.

    - A progress window appears and database creation proceeds.

    - When database creation is complete, a window will appear which indicates the name of the database, the location of the parameter file, and the URL for accessing Enterprise Manager. Note this URL for future reference. Depending on what options you selected, additional accounts may have been created on the database besides the basic SYS, SYSTEM, DBSNMP, and SYSMAN. All additional accounts are now locked. You may click the Password Management button to unlock these accounts and set passwords if you wish, but you should only unlock an account if you have a specific reason for doing so. When you are finished, click the Exit button to exit the Database Creation Assistant.

    - While logged onto the database server as the oracle user, run the following commands to set environment variables so that you will be able to access the database easily (substitute your Oracle instance name):
    $ export ORACLE_SID=test
    $ export ORAENV_ASK=NO
    $ . /usr/local/bin/oraenv

  6. #6

+ Reply to Thread

Similar Threads

  1. Oracle Database 11g Installation steps in detail with Snapshots
    By Pradeep in forum Core Database Administration and Monitoring
    Replies: 3
    Last Post: 06-05-2013, 04:28 PM
  2. Learn to do manual installation of the database in just 6 steps
    By shoaibansari in forum Database Installation,Upgrades,Migration,Patching and Cloning
    Replies: 1
    Last Post: 02-14-2012, 04:50 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

DBA Lounge (P) Ltd. deals in Oracle Technologies on Consulting, Resourcing, Corporate Training

Online and corporate training available on Oracle Database 11g, Oracle 11g Real Application Cluster (RAC), Oracle Applications 11i/R12, Oracle Fusion Middleware 11g, Oracle Identity Management-OIM, Oracle Internet Directory 11g-OID, Oracle Business Intelligence Enterprise Edition-OBIEE, Oracle Golden Gate, Oracle Access Management-OAM, Oracle Internet Directory-ODS, Oracle Identity Analytics Architecture-OIA Statistics