Installing Oracle 11gR2 under CentOS 6.4

Source: Internet
Author: User
Tags chmod


Pre-Installation Instructions:
    1. The minimum memory (RAM) requirement is 1GB, which is recommended for 2GB and above.
    2. 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.
    3. Requires a temporary file directory, such as/tmp, at least 1GB of disk space.
    4. 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.
    5. An X window graphical interface is required.
    6. Requires root user rights
This article installs the environment:
    1. Operating system CentOS 6.4 2.6.32-358.el6.x86_64 (Desktop), 2GB RAM,80GB hard disk space (4GB swap, 100mb/boot, 40GB/)
    2. Host name Mophee, IP 192.168.80.19 (Static)
    3. Environment: VMware Workstation 9.0
The revised version of this article has been published to the following address: http://blog.itrunc.com/2013/12/30/install-oracle-11g-release2-in-centos-x64/Install the required packages (operate under root account ):


binutils-2.17.50.0.6 compat-libstdc++-33-3.2.3 compat-libstdc++-33-3.2.3 (32 bit)
elfutils-libelf-0.125 elfutils-libelf-devel-0.125 gcc-4.1.2 gcc-c++-4.1.2 glibc-2.5-24 glibc-2.5-24 (32 bit)
glibc-common-2.5 glibc-devel-2.5 glibc-devel-2.5 (32 bit)
glibc-headers-2.5 ksh-20060214 libaio-0.3.106 libaio-0.3.106 (32 bit)
libaio-devel-0.3.106 libaio-devel-0.3.106 (32 bit)
libgcc-4.1.2 libgcc-4.1.2 (32 bit)
libstdc++-4.1.2 libstdc++-4.1.2 (32 bit)
libstdc++-devel 4.1.2 make-3.81 sysstat-7.0.2 unixODBC-2.2.14-11.el6 (x86_64) or later
unixODBC-2.2.14-11.el6.i686 or later
unixODBC-devel-2.2.14-11.el6 (x86_64) or later
unixODBC-devel-2.2.14-11.el6.i686 or later
libXp


Using the command yum list | grep ' package name ' or Rpm-q ' package name ' or Rpm-qa | grep ' package name ' to see if the packages are already installed.



Use the command Yum install-y ' package name ' to install the missing packages, except for the Pdksh packages. Note: To install the package with Yum, you can first modify vi/etc/yum.conf and add a line: Multilib_policy=all. Oracle will require installation of i386 when checking the environment, but the CentOS 6.4 CD-ROM package is i686, in fact all the same, ignoring this difference should not be a big problem (see the installation section below).



Install-y binutils compat-libstdc++-makenumactl sysstat libxp UnixODBC unixodbc-devel


Install the Pdksh package (this package is not included in the CentOS installation disk):



Use the command: wget ftp://rpmfind.net/linux/centos/5.9/os/x86_64/CentOS/pdksh-5.2.14-37.el5_8.1.x86_64.rpm to download the Pdksh package to a local



Install using the command RPM-IVH pdksh-5.2.14-37.el5_8.1.x86_64.rpm (Note: The package conflicts with Ksh, if Ksh is already installed, we recommend using the command rpm-e ksh-* uninstall)


Create the desired user group (operating under the root account):

 
groupadd oinstall;
groupadd dba;
groupadd oper;
Create the required account number (operating under root account):


Use command ID Oracle; To see if an Oracle account already exists, create it using the following command if it does not exist



useradd -g oinstall -G dba, oper oracle; #The initial group is oinstall, the effective group is dba, oper
passwd oracle; #Set password for oracle account (requires login during installation)  


If an Oracle account already exists, use the command usermod-a-G Dba,oper Oracle to join the group DBA and Oper


To modify kernel parameters (operate under root account):


Edit the kernel parameter profile vi/etc/sysctl.conf, and under the file, modify or add the following line:


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 = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576


Then execute the following command to make the above configuration effective immediately:



Sysctl-p;
Modify system resource limits (operate under root account):


Edit the system resource limit profile vi/etc/security/limits.conf, and add the following line under the file:



 

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240


Edit the file Vi/etc/pam.d/login, add the following line (11gr1 is required, R2 not required):



Session Required Pam_limits.so


Edit the Vi/etc/profile file, add the following line (11gr1 is required, R2 not required):



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


This configuration takes effect as soon as the user Oracle logs on, and if the current Oracle user is logged in, you can log back in to make it effective.


Turn off SELinux (operate under root account):


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



selinux=disabled;


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



0


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



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



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:



 
mkdir /opt/oracle;
chown oracle:oinstall /opt/oracle;
chmod 755 /opt/oracle;


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



 
mkdir /opt/oraInventory;
chown oracle:oinstall /opt/oraInventory;
chmod 755 /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:



 
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:



ORACLE_BASE = / opt / oracle; #Installation directory
ORACLE_HOME = $ ORACLE_BASE / 11g; #oracleHome Directory
ORACLE_SID = orcl; #Instance name
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:



Source/home/oracle/.bash_profile
To start the installation (log in as Oracle):

/ home / oracle / Database / runinstaller; # #Execute this program to start the installation


The following will enter the graphical installation interface



 Enter email, click Next



 I am prompted to set up an agent because my installation machine is not connected to the extranet. Select the check box and click Continue



 Select the first item, create and simply configure the database when the installation is complete, click Next



Select the server Class and click Next



 Install in a single-case mode (if RAC is installed, select Next), click Next



Select Advanced Install and click Next



 The language on the installer interface can only be 中文版, click Next



 Select Install Enterprise Edition, click Next



Install the base directory and HOME directory, because we have set environment variables oracle_base and oracle_home, here no need to select, click Next



 Install as Oinstall Group, click Next



 Installing a Database for transactional processing (data Warehouse check next), click Next



 Since we have set the environment variable ORACLE_SID, this step does not need to be modified, click Next



 Maximum memory available, Oracle recommends using automatic memory management, click Tab character sets select Character Set



Select UTF-8 as the database character set, click Sample Schemas to create the Oracle-provided case



Select the check box and click Next


 Nothing good to set (according to your needs), click Next



This step can choose how to store the data file, I chose a simple file system, click Next



 Whether automatic backup is enabled, in production or enabled, click Next



 Set a password for your system admin account and click Next when you're done



 Select the group that the DBA account belongs to (you can use Conn/as SYSDBA login database) and the Oper account belongs to the group, click Next



 Setup checks the environment because the CentOS 32bit package is i686, and Oracle requires i386, so this will fail and be ignored. Click Next



Click Finish to start the installation



 Installation of ing ...



 Installation of ing ...



 Click Password Management can set the relevant management account password, because in Figure 17 has been set so no need to set up, click OK



 reserved, proceed to the next step: Log in as Root to execute the two SH files



 Log in as root to execute the two SH files, such as the lower left corner. After the execution, click OK and you're done.



Open the browser, enter Https://localhost:1158/em, open the Database control management interface, Oracle has started to run.



This document refers to Oracle's official documentation: Oracle®database Quick Installation Guide 11g Release 2 (11.2) for Linux x86-64



Installing Oracle 11gR2 under CentOS 6.4


Related Article

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.