Main process of installing ORACLE_11GR2 version under Centos6.8

Source: Internet
Author: User
Tags dba

    1. Pre-Installation Preparation
    • Download Oracle version
      • Address: http://docs.oracle.com/cd/E21901_01/index.html, download 2 files are linux.x64_11gr2_database_1of2.zip,linux.x64_11gr2_ Database_2of2.zip
    • Pre-Installation Instructions:
      • The minimum memory (RAM) requirement is 1GB, which is recommended for 2GB and above.
      • Virtual Memory Swap recommendations: The recommended swap size is 1.5 times times the memory size when the memory is 1GB~2GB, the swap size is recommended when the memory is 2GB~16GB, and the swap remains 16GB when the memory is over 16GB.
      • Requires a temporary file directory, such as/tmp, at least 1GB of disk space.
      • Disk space requirements: The Enterprise version of the installation space of 4.35GB and more than 1.7GB of data file space, the standard version of 4.22GB installation space and more than 1.5GB of data file space.
      • An X window graphical interface is required.
      • Requires root user rights
    • This article installs the environment:
      • Operating system CentOS 6.4 2.6.32-358.el6.x86_64 (Desktop), 2GB RAM,80GB hard disk space (4GB swap, 100mb/boot, 40GB/)
      • Host name Mophee, IP 192.168.80.19 (Static)
      • Environment: VMware Workstation 9.0
    • Installation of necessary installation packages
      • Execute the following script under CentOS root
      • Yum Install -y binutilscompat-libstdc++-gccgcc make Numactl sysstat libxp UnixODBC Unixodbc-devel
      • or below (recommended)
      • #提前安装好需要的rpm包 Yum Install GCC gcc-c++ compat-libstdc++- UnixODBC unixodbc-devel

        There is a RPM package that needs to be downloaded separately pdksh-5.2.14-37.el5_8.1.x86_64 and then RPM-IVH installed.

        Create a Oinstall Group
        Groupadd Oinstall

        Create a DBA Group
        Groupadd dba

        Create an Oracle User
        USERADD-G oinstall-g dba Oracle

        To modify the password for an Oracle user
        passwd Oracle

        VI/etc/sysctl.conf# Add the following at the end of the file Fs.aio-MAX-NR =1048576FS.file-max =6815744Kernel.shmall=2097152Kernel.shmmax=536870912Kernel.shmmni=4096Kernel.sem= - 32000  -  -Net.ipv4.ip_local_port_range=9000 65500Net.core.rmem_default=262144Net.core.rmem_max=4194304Net.core.wmem_default=262144Net.core.wmem_max=1048586#刷新参数sysctl-PVI/etc/security/limits.conf #在文件末尾添加以下内容oracle Soft Nproc2047Oracle Hard Nproc16384Oracle Soft Nofile1024x768Oracle Hard Nofile65536Oracle Soft Stack10240#创建安装Oracle软件所需要的目录mkdir-p/u01/ORACLE_11G_R2Chown-R oracle:oinstall/u01/ORACLE_11G_R2chmod-R775/u01/oracle_11g_r2 #日志目录mkdir/u01/oralnventoryChown-R oracle:oinstall/u01/oralnventory/chmod-R775/u01/oralnventory/VI/home/oracle/. Bash_profile #在文件末尾添加以下内容umask022Export Oracle_base=/u01/Oracle_11g_r2export Oracle_home= $ORACLE _base/oracle/product/11.2.0/Db_1export Oracle_sid=Orclexport PATH= $PATH: home/bin: $ORACLE _home/binVI/etc/pam.d/Login#在文件末尾添加以下内容session Required/lib/security/pam_limits.sosession Required Pam_limits.soVI/etc/profile# Add the following at the end of the fileif[$USER ="Oracle"]; Then   if[$SHELL ="/bin/ksh"]; ThenUlimit-P16384Ulimit-N65536   ElseUlimit-U16384-N65536   fifi#刷新参数source/etc/profile
        View Code
    1. Installation

Turn off SELinux (operate under root account):

To edit the SELinux profile Vi/etc/selinux/config, set the SELinux value to Disabled, as follows:

1 SELINUX=disabled;

Modifying the file causes SELinux to not start after rebooting the system. To close the currently open SELinux, use the following command:

1 setenforce 0

Modify the/etc/hosts file (operation under root account):

Edit the file vi/etc/hosts and add a line:

1 192.168.80.19 mophee

This modification is recommended if you do not do this to eject a warning during installation and may affect the proper functioning of the listener.

Create the desired directory (operating under the root account):

Install Oracle in the/opt/oracle directory, so you need to create this directory:

123 mkdir/opt/oracle;chownoracle:oinstall /opt/oracle;chmod755 /opt/oracle;

You also need to set up the Inventory directory at installation, so you need to create the directory:

123 mkdir/opt/oraInventory;chownoracle:oinstall /opt/oraInventory;chmod755 /opt/oraInventory;

installation package Related:

The Oracle 11g R2 installation package is compressed into two files: Linux.x64_11gR2_database_1of2.zip, Linux.x64_11gR2_database_2of2.zip, uploading them to the installation machine and using Unzip Linux.x64_11gR2_database_1of2.zip; Unzip Linux.x64_11gR2_database_2of2.zip; is decompressed, a directory named database is obtained. I put it in the/home/oracle/database.

Because the installation process is performed as Oracle, you need to make sure that the Oracle account has execute permissions on/home/oracle/database, and you can use the following command to assign the directory to the Oracle account and have Execute permissions:

12 chmod-R 700 /home/oracle/database;chown-R oracle:oinstall /home/oracle/database;

———————— exit root and log in as Oracle ———————————-

Set the Oracle Account logon environment (log in as Oracle):

To edit the file Vi/home/oracle/.bash_profile, add the following line:

123456 oracle_base= /opt/oracle # installation directory oracle_home= $ORACLE _base /11g #oracle家目录 oracle_sid=orcl;  #实例名 ld_library_path = $ORACLE _home /lib path= $PATH: $ORACLE _home /bin : $HOME /bin export oracle_base oracle_home oracle_sid ld_library_path PATH;

After you save the exit, execute the following command to make the above settings effective immediately:

1 source/home/oracle/.bash_profile
To start the installation (log in as Oracle):
12 exportLANG=en_US; ##/home/oracle/database/runInstaller##执行该程序开始安装
    1. Installation closure

  

The last perfect work

Vi/etc/oratab
Orcl:/u01/oracle_11g_r2/oracle/product/11.2.0/db_1:y (change N to Y)

Edit each of the following two files
Vi/u01/oracle_11g_r2/oracle/product/11.2.0/db_1/bin/dbstart
Vi/u01/oracle_11g_r2/oracle/product/11.2.0/db_1/bin/dbshut

Find Oracle_home_listner=$1
Change into oracle_home_listner= $ORACLE _home

The startup script is as follows
  1. #!/bin/bash
  2. # chkconfig:2345 90 10
  3. Export oracle_base=/u01/oracle_11g_r2
  4. Export oracle_home=$ORACLE _base/ORACLE/product/11.2. 0/db_1
  5. Export oracle_sid=ORCL
  6. Export PATH=$PATH:$ORACLE _home/bin
  7. Orcl_own="Oracle"
  8. # If the executables does not exist--display error
  9. If [ ! -F $ORACLE _home/bin/dbstart -o ! -D $ORACLE _home ]
  10. Then
  11. echo "Oracle startup:cannot start"
  12. exit 1
  13. Fi
  14. # depending on parameter--start, stop, restart
  15. # of the instance and listener or usage display
  16. Case "$" in
  17. Start)
  18. # Oracle Listener and instance startup
  19. Echo -n "starting Oracle:"
  20. Su - $ORCL _own -c "$ORACLE _home/bin/dbstart"
  21. Touch /var/Lock/subsys/oradb
  22. Su - $ORCL _own -c "$ORACLE _home/bin/emctl start Dbconsole"
  23. echo "OK"
  24. ;;
  25. Stop)
  26. # Oracle Listener and instance shutdown
  27. Echo -n "Shutdown Oracle:"
  28. Su - $ORCL _own -c "$ORACLE _home/bin/emctl stop Dbconsole"
  29. Su - $ORCL _own -c "$ORACLE _home/bin/dbshut"
  30. RM -F /var/Lock/subsys/oradb
  31. echo "OK"
  32. ;;
  33. Reload| Restart)
  34. $ stop
  35. $ start
  36. ;;
  37. *)
  38. Echo "Usage: ' basename ' Start|stop|restart|reload"
  39. Exit 1
  40. Esac
  41. Exit 0

Copy the above script content, create a file named Oracle in the/ETC/INIT.D directory, then paste it in, save the exit, and then chmod +x give it permission to execute, don't forget to chkconfig add boot and firewall rules add, to this database installation is complete.

Main process of installing ORACLE_11GR2 version under Centos6.8

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.