首页 > Linux操作系统 > Linux操作系统 > oracle安装官方配置文档


原创 Linux操作系统 作者:流浪的野狼 时间:2013-10-23 13:51:50 0 删除 编辑

A Installing the Oracle Database Software

This appendix presents a summary of the procedure for installing the Oracle database software. Note that the complete installation procedure is described in the product documentation.

The information in this appendix is based on the Oracle Database 11g for Linux x86-64 Quick Installation Guide. It is recommended that you download and review it. It is available from the Oracle Database Documentation Library at the following location:

Download the Oracle Database Software

Download Oracle Database 11g Release 2 ( Standard Edition, Standard Edition One, and Enterprise Edition from the Oracle database home page at the following location:

Operating System Prerequisites

Assuming you have a working Yum repository, you can install the required operating system dependencies for the database software with the following command:

yum install gcc gcc-c++ compat-libstdc++-33 glibc-devel libstdc++-devel \
elfutils-libelf-devel glibc-devel libaio-devel sysstat perl-URI \
bitstream-vera-fonts xorg-x11-xinit unixODBC unixODBC-devel xorg-x11-xinit

Creating the Database User Accounts and Groups

  1. Create two groups (dba and oinstall) with the following commands:

    /usr/sbin/groupadd dba
    /usr/sbin/groupadd oinstall
  2. Create the oracle user, and specify oinstall as the primary group and dba as the secondary group, with the following command:

    /usr/sbin/useradd -g oinstall -G dba oracle
  3. Set the oracle user password with the following command:

    passwd oracle

Configuring the Kernel Parameter Settings

  1. Modify the /etc/sysctl.conf file to satisfy the Oracle installer's requirements by adding the following lines:

    kernel.sem = 250 32000 100 128
    net.ipv4.ip_local_port_range = 9000 65500
    net.core.rmem_default = 4194304
    net.core.rmem_max = 4194304
    net.core.wmem_default = 262144
    net.core.wmem_max = 1048576
    fs.aio-max-nr = 1048576
    fs.file-max = 681574
  2. Make these changes effective immediately with the following command:

    /sbin/sysctl -p

Setting Shell Limits for the Oracle User

  1. To improve the performance of the software, you must increase the shell limits for the oracle user. Add the following lines to the /etc/security/limits.conf file:

    oracle soft nproc 2047
    oracle hard nproc 16384
    oracle soft nofile 1024
    oracle hard nofile 65536
  2. If not already present, add the following lines to the /etc/pam.d/login file:

    session required /lib64/security/
    session required
  3. Depending on the oracle user's default shell, you need to make changes to it. For the Bourne, Bash, or Korn shell, add the following lines to the bottom of the /etc/profile file:

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

For information about other shells, you should refer to the Oracle Database 11g Release 1 for Linux x86-64 Quick Installation Guide available at the following location:

Creating the Database Directory

Throughout this guide it is assumed that the directory /u01/app is the root of the Oracle installation. This is specified in the ORACLE_BASE environment variable.

  1. Enter the following command to display information about all mounted file systems:

    df -k

    This command displays information about all the file systems mounted on the system, including:

    • The physical device name.

    • The total amount, used amount, and available amount of disk space.

    • The mount point directory for that file system.

  2. Create the necessary subdirectories in the mount point directory that you identified and set the appropriate owner, group, and permissions for them using commands similar to the following:

    mkdir -p /u01/app
    chown -R oracle:oinstall /u01
    chmod -R 775 /u01/app

Configuring the Oracle User's Environment

  1. Logon to the system as the oracle user.

  2. Add or edit the umask setting in the ~/.bash_profile file to the following:

    umask 022
  3. Make the setting active for the current shell by issuing the following command:

    . ./.bash_profile
  4. Set the ORACLE_BASE environment variable to define the location of the root of the Oracle directory tree:

    export ORACLE_BASE=/u01/app/oracle
  5. Unzip the Oracle database installation zip file. This creates the directory database. Then, run the graphical installer (note this will not run under user root). Ensure that your X Window environment is properly set up. In addition, when logging on remotely with SSH, ensure X forwarding is enabled. Use the following commands:

  6. Use the installation wizard, and specify the values shown in . When ready, click Next.

    Figure A-1 Specify Installation Location Dialog

    De.ion of Figure A-1 follows

  7. Specify the values shown in . When ready, click Next.

    Figure A-2 Specify Inventory Directory and Credentials Dialog

    De.ion of Figure A-2 follows


    Any warnings or errors reported during database installation (especially any missing prerequisites) must be resolved before proceeding. See  and for information about required components.

    If all dependencies are met, you can click Next.

  8. When installation is almost complete, you are prompted to run two scripts, and, as root. This is shown in .

    Figure A-3 Configuration Scripts Dialog

    De.ion of Figure A-3 follows

    Run the two scripts indicated in . They should be run in a terminal window as root. You will receive output similar to the following:

    Changing permissions of /u01/app/oraInventory.
    Adding read,write permissions for group.
    Removing read,write,execute permissions for world.
    Changing groupname of /u01/app/oraInventory to oinstall.
    The execution of the script. is complete.

    The second script. generates the following output:

    Running Oracle 11g script...
    The following environment variables are set as:
        ORACLE_OWNER= oracle
        ORACLE_HOME=  /u01/app/oracle/product/11.2.0/dbhome_1
    Enter the full pathname of the local bin directory: [/usr/local/bin]:
       Copying dbhome to /usr/local/bin ...
       Copying oraenv to /usr/local/bin ...
       Copying coraenv to /usr/local/bin ...
    Creating /etc/oratab file...
    Entries will be added to the /etc/oratab file as needed by
    Database Configuration Assistant when a database is created
    Finished running generic part of script.
    Now product-specific root actions will be performed.
    Finished product-specific root actions.

    On completion of each script, return the dialog shown in , and click OK. In the main installer screen, verify that the message "The installation of Oracle database 11g was successful" appears. Click Exit, and confirm by clicking Yes.

Creating an Oracle init Script File

  1. Logon as the root user.

  2. Create an /etc/init.d/oracledb script. file to start and stop the Oracle database. An example of this initialization script. is available in the RUEI installation zip file (/root/RUEI/extra/oracledb) explained in . Note that you will need to modify the settings for the ORACLE_BASE and ORACLE_HOME environment variables shown above if you selected a different installation directory for the Oracle database.

  3. Make the script. file executable and use it to start the Oracle database with the following commands:

    chmod +x /etc/init.d/oracledb
    /sbin/chkconfig --add oracledb
    /sbin/service oracledb start

The Oracle database is now installed, and the database listener should be up and running.

来自 “ ITPUB博客 ” ,链接:,如需转载,请注明出处,否则将追究法律责任。

上一篇: oracle的监听问题
请登录后发表评论 登录


  • 博文量
  • 访问量