CentOS6.8 (Linux) installation ORACLE11GR2 pits Guide

Source: Internet
Author: User
Tags chmod dba iptables sqlplus

Preparation before installation:

  • ORACLE11GR2 installation media;
  • Sufficient disk space and memory for the Linux system;
  • Linux systems need to have fixed IP;
  • XMANAGER5 (graphical installation required);
  • Dependency packages can be installed in Yum mode (requires a networked environment);
  • Zip Package Decompression tool can be installed in Yum mode (requires a networked environment);
  • root user rights;
    Ideas:
    1. Set the fixed IP, modify the hostname and add the host-to-IP correspondence (do not add the subsequent installation process may be reported to the Oracle Net Configuration assisant failed error);
      • Set the fixed ip:vi/etc/sysconfig/network-scripts/ifcfg-auto_eth3, modified as follows (the contents of the red box in the figure can be viewed by ifconfig according to the respective machine)
      • Restart Service and verify network after modification: Service network restart
      • Modify Host Name: Vi/etc/sysconfig/network
      • Restart Effective: Shutdown–r now
      • To add a host-to-IP relationship: vi/etc/hosts
    2. Set kernel parameters, modify system resource limits (seemingly to improve Oracle performance) root user;
      * Set Kernel parameters: vi/etc/sysctl.conf

      What's new in the red box
      Net.ipv4.ip_local_port_range= 9000 65500
      Fs.file-max = 6815744
      Kernel.shmall = 10523004
      Kernel.shmmax = 6465333657
      Kernel.shmmni = 4096
      Kernel.sem = 250 32000 100128
      net.core.rmem_default=262144
      net.core.wmem_default=262144
      net.core.rmem_max=4194304
      net.core.wmem_max=1048576
      Fs.aio-max-nr= 1048576
      • Modify system Resource limit: vi/etc/security/limits.conf #末尾添加如下内容
        Oracle Soft Nproc 2047
        Oracle Hard Nproc 16384
        Oracle Soft Nofile 1024
        Oracle Hard Nofile 65536
      • Vi/etc/pam.d/login
        Session required pam_namespace.so #在此行下面添加一条pam_limits. So
        Session Required Pam_limits.so

3.  创建oracle用户(其依赖相应的用户组oinstall、dba),在此用户下进行Oracle11gR2的安装;        * groupadd oinstall #创建用户组oinstall        * groupadd dba      #创建用户组dba        *useradd -g oinstall -G dba -d /opt/oracle -s /bin/bash -m oracle #创建用户oracle并加入用户组oinstall和dba        * passwd oracle4.  创建安装目录及设置权限;        * mkdir -p /opt/oracle/app/        * mkdir -p /opt/oracle/oradata/        * chmod 755 /opt/oracle/        * chmod 775 /opt/oracle/app/        * chown oracle.oinstall -R /opt/oracle/

    1. Set environment variables for Oracle users (need to switch to Oracle user);
      • Su-oracle
      • VI ~/.bash_profile
        Add the following at the end:
        Export Oracle_base=/opt/oracle/app
        Export Oracle_home= $ORACLE _base/product/11.2.0/dbhome_1
        Export path= $PATH: $ORACLE _home/bin
        Export ORACLE_SID=ORCL
      • source. Bash_profile #立即生效


    1. Turn off SELinux (trouble, less information about it in circles), requires root user
      • Vi/etc/selinux/config
      • Modify Selinux=disabled
      • Setenforce 0
      • Reboot

    1. Shutting down the firewall
      • Service Iptables Stop
      • Chkconfig iptables off

    1. Download Dependent packages
      • Yum-y install gcc gcc-c++ make binutilscompat-libstdc++-33elfutils-libelf elfutils-libelf-devel glibc Glibc-commonglibc-devel libaiolibaio-devel libgcclibstdc++ libstdc++-devel UnixODBC unixodbc-devel compat-libstdc++- 33-3.2.3-69.el6
    2. Check if the graphical interface is installed, if it is not installed, install it first
      • StartX #看下是否能启动图形界面
      • Yum Groupinstall "GNOME Desktop" #安装图形化界面
    3. The installation media is uploaded to the directory where the Oracle user resides, extracting and removing the installation media;
      • Uploading to the/opt/oracle/directory via the FTP tool
      • Unzip command to unzip the installation media (preferably sequentially)
    4. Installing Xmanager
      • Xmanager Standard Edition 5:http://xiazai.xshellcn.com/trial/xmanager-5.0.1062_yy.exe
      • Installation method and general. exe files are no different, normal installation can be;
      • After installation, please follow

    • Open Xstart, configure the following to show:

    • Install the dependent package before clicking Run otherwise prompt error, the command is as follows (requires root permission):

    • Yum Install xterm
    • Yum Install Xclock
      1. Verify the graphical interface: Xclock
      2. Unzip the Oracle installation package and remove the installation package
        • Unzip Linux.x64_11gR2_database_1of2.zip
        • Unzip Linux.x64_11gR2_database_2of2.zip
        • RM-RF linux.x64_11gr2_database*

    1. Execute the Oracle installation script (performed in the Xmanager pop-up console and requires an Oracle user login)
      • Cd/opt/oracle/database
      • ./runinstaller

    1. Graphical interface after the display, is basically the next step to install the default, the middle will be prompted to execute two scripts (requires root permission) specific as follows to follow the corresponding settings can be consulted:
      • cd/opt/oracle/orainventory/
      • ./orainstroot.sh
      • cd/opt/oracle/app/product/11.2.0/dbhome_1/
      • ./root.sh


    1. The default post-installation monitoring, etc. has been configured to complete the authentication method:
      • Telnet ip:1521
      • Sqlplus SYS as SYSDBA
        17.oracle modifying character set to ZHS16GBK (required on sqlplus command line)
      • Sqlplus SYS as SYSDBA
      • Conn/as SYSDBA
      • Shutdown immediate;
      • Startup Mount
      • ALTER SYSTEM ENABLE RESTRICTED SESSION;
      • ALTER SYSTEM SET job_queue_processes=0;
      • ALTER SYSTEM SET aq_tm_processes=0;
      • ALTER DATABASE open;
      • ALTER DATABASE CHARACTER SET ZHS16GBK; #提示我们的字符集: The new character set must be a superset of the old character set, at which point we can skip the check of the superset to make changes
      • ALTER DATABASE Character Set Internal_use ZHS16GBK;
      • SELECT * from V$nls_parameters;
      • Shutdown immediate;
      • Startup
      • SELECT * from V$nls_parameters;
      • Quit
        Reference Links:
        1:oracle Installation Tutorial: 51179998
        2:oracle Character Set modification Tutorial: https://jingyan.baidu.com/article/c1465413af2fb20bfcfc4c3e.html

CentOS6.8 (Linux) installation ORACLE11GR2 pits Guide

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.