Install the Oracle11g server in Linux

Source: Internet
Author: User

Install the Oracle11g server in Linux
Installation environment

Linux Server: SuSe10 sp2 64-bit

Oracle Server: Oracle11gR2 64-bit

System Requirements
  1. Requirements for installing Oracle in Linux

    System Requirements

    Description

    Memory

    Physical memory must be higher than 1 GB

    Swap space

    Generally, it is twice the memory size. For example, you can set the swap partition size to 3 GB for 1 GB memory.

    Hard Disk

    5G or above

    2. Modify core operating system parameters

    Perform the following steps under the Root user:

    1) modify the user's SHELL restrictions and modify the/etc/security/limits. conf file

    Enter the command vi/etc/security/limits. conf, press the I key to enter the editing mode, and add the following content to the file.

    Oracle soft nproc 2047
    Hard nproc 16384
    Oracle soft nofile 1024
    Oracle hard nofile 65536

    After editing, Press Esc and enter ": wq" to save the disk and exit.

    2) modify the/etc/pam. d/login file, enter the command vi/etc/pam. d/login, press the I key to enter the editing mode, and add the following content to the file.

    Session required/lib/security/pam_limits.so
    Session required pam_limits.so

    After editing, Press Esc and enter ": wq" to save the disk and exit.

    3) modify the Linux kernel, modify the/etc/sysctl. conf file, enter the command vi/etc/sysctl. conf, press the I key to enter the editing mode, and add the following content to the file.

    Fs. file-max = 6815744
    Fs. aio-max-nr = 1048576
    Kernel. shmall = 2097152
    Kernel. shmmax = 2147483648
    Kernel. shmmni = 4096
    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

    After editing, Press Esc and enter ": wq" to save the disk and exit.

    4) to make the/etc/sysctl. conf change take effect immediately, run the following command. Input: sysctl-p:

    Linux :~ # Sysctl-p

    Net. ipv4.icmp _ echo_ignore_broadcasts = 1

    Net. ipv4.conf. all. rp_filter = 1

    Fs. file-max = 6815744

    Fs. aio-max-nr = 1048576

    Kernel. shmall = 2097152

    Kernel. shmmax = 2147483648

    Kernel. shmmni = 4096

    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

    5) edit/etc/profile, enter the command vi/etc/profile, press the I key to enter the editing mode, and add the following content to the file.

    If [$ USER = "oracle"]; then
    If [$ SHELL = "/bin/ksh"]; then
    Ulimit-p 16384
    Ulimit-n 65536
    Else
    Ulimit-u 16384-n 65536
    Fi

    Fi

    After editing, Press Esc and enter ": wq" to save the disk and exit.

    6) Create related users and groups as owners of software installation and support groups.

    Create a user and enter the following command:

    Groupadd oinstall
    Groupadd dba

    Create an Oracle user and password, and enter the following command:

    Useradd-g oinstall-g dba-m oracle

    Passwd oracle

    The password will be entered twice, but the password must be consistent. Press enter to confirm.

    7) Create a database software directory, a data file storage directory, and a directory location based on your needs. Pay attention to the disk space. Here I will put it under the oracle user, for example:

    Enter the following command:

    Mkdir/home/oracle/app

    Mkdir/home/oracle/app/oracle

    Mkdir/home/oracle/app/oradata

    Mkdir/home/oracle/app/oracle/product

    8) change the directory owner to be owned by an Oracle user and enter the following command:

    Chown-R oracle: oinstall/home/oracle/app

    9) configure the environment variables of oracle users. First, switch to the newly created oracle user,

    Input: su-oracle, and then directly enter: vi. bash_profile

    Press I to edit. bash_profile, enter the editing mode, and add the following content:

    Umask 022

    Export ORACLE_BASE =/home/oracle/app

    Export ORACLE_HOME = $ ORACLE_BASE/oracle/product/11.2.0/dbhome_1

    Export ORACLE_SID = orcl

    Export PATH = $ PATH: $ HOME/bin: $ ORACLE_HOME/bin

    Export LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/lib

    After editing, Press Esc and enter ": wq" to save the disk and exit.

    Installation Process

    1) After all the required operations are completed, log out of the system and log in as an Oracle user on the graphic interface. First, copy the downloaded Oracle Installation Package to linux. We recommend that you use Xmanager or other ftp tools.

    Open a terminal and run the unzip command to decompress the oracle Installation File, for example:

    Enter the following command:

    Unzip linux.x64_11gR2_database_1of2.zip

    Unzip linux.x64_11gr2_database5of2.zip

    After decompression, the cd enters the decompressed directory database.

    Enter the following command:

    Cd database

    Run the ls command to view the files contained in the decompressed database, for example:

    2) execute the installation and enter the command:./runInstaller

    After installing this step, we can see that many rpm packages are not available. We can find the missing packages from the linux installation CD or ISO and upload them to linux using ftp, then run rpm-ivh xxx. rpm -- nodeps -- force is used for installation (add -- nodeps -- force indicates forced installation, and rpm-ivh xxx is used directly. if the rpm installation fails, the installation process is omitted.

    When all the packages are installed, execute installation process 2 in the oracle graphical interface again. Then, the installation will pass the Environment check.

    After the installation is complete, the system prompts you to use the root permission to execute two shell scripts. Locate the location according to the prompted path, for example, in/home/oracle/app/oracle/product/11.2.0/dbhome_1/root. sh.

    And/home/oracle/app/oraInventory/orainstRoot. sh to open a new terminal, enter the command:

    Su-root

    Cd/home/oracle/app/oracle/product/11.2.0/dbhome_1

    Sh root. sh

    Cd/home/oracle/app/oraInventory

    Sh orainstRoot. sh

    Database creation

    1) in oracle user graphical interface (GUI), a new terminal is opened. The following interface is displayed when you directly enter the command dbca. Here we use a custom database.

    Enter the unified password (you can also set the password separately)

    Database storage location, which is used by default here

    Quick Recovery and archiving are not specified.

    Remove uncommon modules <喎?http: www.bkjia.com kf ware vc " target="_blank" class="keylink"> VcD4KPHA + CjxpbWcgc3JjPQ = "http://www.2cto.com/uploadfile/Collfiles/20141230/20141230105714174.png" alt = "\">

    Memory Allocation and specified Character Set

    After a long wait, when you see this interface, the oracle database creation is complete.

    You can use sqlplus to check whether a new command window is opened, enter sqlplus, and then enter the user name and password. If you can test the window, we will not introduce it too much here.

    Configure listeners and Local Network Services

    1) open a new terminal in the oracle user graphical interface (GUI) of the oracle user. Enter the command netca to bring up the following interface.

    2) create a listening service (Act as an oracle Server and connect other oracle clients to the local oracle Server)

    3) configure the local network service name (Act as the oracle client and connect to other oracle servers)

    Enter the database instance name of the connected oracle Server

    Enter the IP address of the oracle server

    Select Test

    Click change Login, enter a user name and password of the connected oracle Server, and click OK.

    If the test is successful, check whether the network is smooth, whether the connected oracle Server is started, and whether the listener is started)

    Name your local network service name

    Next, click Next.

    In this way, the installation and configuration of the oracle server are basically complete.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.