Installing Oracle 11g R2 under Redhat Linux

Source: Internet
Author: User
Tags dba semaphore

Official Document: Http://docs.oracle.com/cd/E11882_01/nav/portal_11.htm

1: Basic Environment

Redhat Enterprise Linux 6.132bit

Memory: 1GB

Disk space: 30GB

2: Check the required packages for Oracle 11g, if not found in the Redhat Enterprise Linux 6.1 installation CD, and then install.

Oracle Official offer: http://docs.oracle.com/cd/E11882_01/install.112/e24326/toc.htm

· binutils-2.20.51.0.2-5.11.el6 (x86_64)

· compat-libcap1-1.10-1 (x86_64)

· compat-libstdc++-33-3.2.3-69.el6 (x86_64)

· compat-libstdc++-33-3.2.3-69.el6.i686

· gcc-4.4.4-13.el6 (x86_64)

· gcc-c++-4.4.4-13.el6 (x86_64)

· glibc-2.12-1.7.el6 (i686)

· glibc-2.12-1.7.el6 (x86_64)

· glibc-devel-2.12-1.7.el6 (x86_64)

· glibc-devel-2.12-1.7.el6.i686

· Ksh

· libgcc-4.4.4-13.el6 (i686)

· libgcc-4.4.4-13.el6 (x86_64)

· libstdc++-4.4.4-13.el6 (x86_64)

· libstdc++-4.4.4-13.el6.i686

· libstdc++-devel-4.4.4-13.el6 (x86_64)

· libstdc++-devel-4.4.4-13.el6.i686

· libaio-0.3.107-10.el6 (x86_64)

· libaio-0.3.107-10.el6.i686

· libaio-devel-0.3.107-10.el6 (x86_64)

· libaio-devel-0.3.107-10.el6.i686

· make-3.81-19.el6

· sysstat-9.0.4-11.el6 (x86_64)

Users to provide:

1,binutils-2.17.50.0.6 binutils-2.20.51.0.2-5.20.el6.x86_64.rpm

2,compat-libstdc++-33-3.2.3 compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm

3,elfutils-libelf-0.125 elfutils-libelf-0.152-1.el6.x86_64.rpm

4,elfutils-libelf-devel-0.125 elfutils-libelf-devel-0.152-1.el6.x86_64.rpm

5,elfutils-libelf-devel-static-0.125

6,gcc-4.1.2 gcc-4.4.5-6.el6.x86_64.rpm

7,gcc-c++-4.1.2 gcc-c++-4.4.5-6.el6.x86_64.rpm

8,glibc-2.5-24 glibc-2.12-1.25.el6.x86_64.rpm

9,glibc-common-2.5 glibc-common-2.12-1.25.el6.x86_64.rpm

10,glibc-devel-2.5 glibc-devel-2.12-1.25.el6.x86_64.rpm

11,glibc-headers-2.5 glibc-headers-2.12-1.25.el6.x86_64.rpm

12,kernel-headers-2.6.18 kernel-headers-2.6.32-131.0.15.el6.x86_64.rpm

13,ksh-20060214 ksh-20100621-6.el6.x86_64.rpm

14,libaio-0.3.106 libaio-0.3.107-10.el6.x86_64.rpm

15,libaio-devel-0.3.106 libaio-devel-0.3.107-10.el6.x86_64.rpm

16,libgcc-4.1.2 libgcc-4.4.5-6.el6.x86_64.rpm

17,libgomp-4.1.2 libgomp-4.4.5-6.el6.x86_64.rpm

18,libstdc++-4.1.2 libstdc++-4.4.5-6.el6.x86_64.rpm

19,libstdc++-devel-4.1.2 libstdc++-devel-4.4.5-6.el6.x86_64.rpm

20,make-3.81 make-3.81-19.el6.x86_64.rpm

21,sysstat-7.0.2 sysstat-9.0.4-18.el6.x86_64.rpm

22,unixodbc-2.2.11 unixodbc-2.2.14-11.el6.x86_64.rpm

23,unixodbc-devel-2.2.11 unixodbc-devel-2.2.14-11.el6.x86_64.rpm

2: Use the rpm–q Package name command to check if these packages are already installed:

[Email protected]~]#rpm-q binutils compat-libstdc++elfutils-libelf  elfutils-libelf-develelfutils-libelf-devel-static gcc gcc-c++ glibc glibc-common glibc-develglibc-headers Kernel-headers ksh libaiolibaio-devel libgcc libgomp libstdc++ libstdc++-devel make Sysstat unixodbcunixodbc-devel MPFR ppl clog-ppl cpp (Installation error prompted, add these four packages resolved)

3: If you check that the package is not installed, use the following command to install:

RPM-IVH unixodbc*--nodeps--force

4: Specify host Name:

Vim/etc/sysconfig/network

change hostname to the hostname you want to set (for example: HJD)

5: Modify the Hosts file:

Vim/etc/hosts

Add a: Your own IP just set the hostname host name for short

Note: To view the IP available ifconfig–a command on your own host

6: Modify Parameters

/etc/sysctl.conf (Modify kernel parameters)

/etc/security/limits.conf (Shell-to-Oracle user restrictions)

/etc/pam.d/login

/etc/profile (System-dependent environment variables)

/oracle/.bash_profile (Oracle User-related environment variables)

6.1 Modifying/etc/sysctl.conf

Use the following command:

Vi/etc/sysctl.conf

Modify and add the following content:

# Kernel paramaters required by oracle11g R2

FS.AIO-MAX-NR = 1048576

Fs.file-max = 6815744

Kernel.shmall = 2097152

Kernel.shmmax = 536870912

Kernel.shmmni = 4096

Kernel.sem = 250 32000 100128

Net.ipv4.ip_local_port_range = 900065500

Net.core.rmem_default = 262144

Net.core.rmem_max = 4194304

Net.core.wmem_default = 262144

Net.core.wmem_max = 1048586

( Note:the Shmmax parameter: The maximum value of a separate shared memory segment that the Linux process can allocate.) Generally set to half the total memory size. The setting for this value should be greater than the value of Sga_max_target or memory_max_target, so for systems that have an Oracle database installed, the value of Shmmax should be greater than one-second of the memory.

kernel.shmmax= Physical Memory *0.8

Shmmni parameter: Sets the maximum number of shared memory segments at the system level. ORACLE10G recommended minimum value is 4096, can be appropriate than 4096 to increase some.

kernel.shmmni=4096

Shmall parameter: Sets the total number of shared memory pages. This value is too small to cause the database to start an error. This value is recommended to be set to the physical memory size divided by the paging size. (Paging size: getconf page_size)

kernel.shmall= Physical Memory/page_size

SEMMSL parameter: Set the maximum number of semaphores in each semaphore group, the recommended minimum value is 250. For systems with a large number of concurrent connections, it is recommended that this value be set to the processes initialization parameter plus 10.

Semmni parameter: Sets the maximum number of semaphore groups in the system. The recommended value for oracle10g and 11g is 142.

Semmns parameter: Sets the maximum number of semaphores in the system. The recommended Semmns value is set to semmsl*semmni,oracle the recommended semmns setting is not less than 32000.

SEMOPM parameter: Sets the maximum number of semaphore operations that can be performed at the same time per system call. Oracle verifies that the 10.2 and 11.1 semopm are configured with 100.

kernel.sem=610 86620 142 (corresponding 4 values from left to right are SEMMSL, Semmns, SEMOPM and Semmni respectively)

Save exit, execute the following command to make the kernel parameters of the setting take effect

/sbin/sysctl–p/ect/sysctl.conf or Sysctl–p

6.2 Modifying/etc/security/limits.conf

Vi/etc/security/limits.conf

At the end of the file, add the following:

Oracle Soft Nproc 2047

Oracle Hard Nproc 16384

Oracle Soft Nofile 1024

Oracle Hard Nofile 65536

6.3 Modifying/etc/pam.d/login

Vi/etc/pam.d/login

In this file, add the following:

Session required/lib/security/pam_limits.so

6.4 Modifying/etc/profile

Vi/etc/profile

At the end of the file, add the following:

if [$USER = "Oracle"]; Then

if [$SHELL = "/bin/ksh"]; Then

Ulimit-p 16384

Ulimit-n 65536

Else

Ulimit-u 16384-n 65536

Fi

Fi

6.5 Modifying/opt/oracle/.bash_profile

The following actions are required before modifying/opt/oracle/.bash_profile:

① create user groups and users as owners of software installation and support groups

Groupadd Oinstall

Groupadd dba

useradd-g oinstall-g dbaoracle These two g can all be lowercase

[[email protected] Pet/]# useradd-g oinstall-g dba-d/home/oracle Oracle(add Oracle user to Oinstall Group DBA Sub-group to/oracle_1 In the 1g/oracle directory)

The root directory is/oracle_11g/oracle, and the primary group is the Oinstall sub-group is the DBA

[[email protected] Pet/]# passwd oracle(set password)

② Creating a Software Installation directory

mkdir-p/oracle_11g/oracle (-p ensure directory name exists, do not exist on the build one)

[Email protected] Pet/]# chown-r oracle:oinstall/home/oracle

[Email protected] Pet/]# chown-r Oracle:oinstall/home/oracle/app

7: Upload the Linux_11gr2_database_1of2.zip and linux_11gr2_database_2of2.zip two installation files to redhatenterprise Linux 6.1/home/ The Oracle directory.

[Email protected] ~]#cd/home/oracle

Unzip the two compressed packages using the following command:

[Email protected] oracle_11g]#unzip Linux_11gr2_database_1of2.zip

[Email protected] oracle_11g]#unzip Linux_11gr2_database_2of2.zip

[Email protected] Pet/]# chown-r oracle:oinstall/home/oracle/database

[Email protected] Pet/]# chmod-r 755/home/oracle/

Here's R to capitalize.

③ Switch to Oracle user

Su-oracle

passwd: Enter the password for Oracle

VI. bash_profile

Add and modify the following in the file:

Oracle_base= (top-level directory for Oracle's installation directory)

Oracle_home= $ORACLE _base/oracle

Oracle_sid= (instance name)

Path= $ORACLE _home/bin: $PATH: $HOME/bin

Ld_library_path= $ORACLE _home/lib:/usr/lib

Lang=c - Set this parameter to avoid garbled installation process but will make Oracle permissions of the terminal is in English, if you want to use Chinese, this can be removed, but some of the system will be garbled

Export oracle_base oracle_homeoracle_sid PATH ld_library_path LANG

Save the exit, and then execute the following command to take effect

[Email protected] ~]$. . /bash_profile

Open another terminal window as root
--This step is important, do not perform this step when running #./runinstaller with Oracle users will not start the graphical installation interface

#export display=:0.0
#xhost +
#xhost + localhost

#su-oracle
CD database/
./runinstaller

7: Start Installing Oracle 11gR2


Using the Oracle user to enter the graphical interface, open the terminal and go to the database directory, enter ./runinstaller Start the graphical installation interface.


Remove the hook from the diagram and click Next.


Click Yes.


Choose to install only the database software.


Select Single database Installation.


Select the Simplified Chinese language.


Select Enterprise Edition.


Select the Oracle installation directory, the installation directory needs to be oracle_base= with the/oracle/.bash_profile file (top level directory of Oracle's installation directory) and Oracle_home= $ORACLE _base/ Oracle counterpart.

Then click Next.


Click Next.


Tick Ignore all, and then click Next.


Click Finish to enter the installation status.

This error occurs because of a missing package problem: Rpm-q MPFR pplclog-ppl cpp find these four packs, install them separately, then click on "Retry" woe

If this is still not possible, please run it in the following order:

# RPM-IVH glibc-common-2.12-1.25.el6.x86_64.rpm
# rpm-ivhkernel-headers-2.6.32-131.0.15.el6.x86_64.rpm
# rpm-ivhlibgcc-4.4.5-6.el6.x86_64.rpm
# rpm-ivhglibc-2.12-1.25.el6.x86_64.rpm
# rpm-ivhlibgomp-4.4.5-6.el6.x86_64.rpm
# rpm-ivhnscd-2.12-1.25.el6.x86_64.rpm
# rpm-ivhglibc-headers-2.12-1.25.el6.x86_64.rpm
# rpm-ivhglibc-devel-2.12-1.25.el6.x86_64.rpm
# rpm-ivhmpfr-2.4.1-6.el6.x86_64.rpm
# rpm-ivhppl-0.10.2-11.el6.x86_64.rpm
# rpm-ivhcloog-ppl-0.15.7-1.2.el6.x86_64.rpm
# rpm-ivhcpp-4.4.5-6.el6.x86_64.rpm
# rpm-ivhgcc-4.4.5-6.el6.x86_64.rpm
Note: The above is the installation of GCC, the software installation sequence can not be wrong.
# rpm-ivhlibstdc++-4.4.5-6.el6.x86_64.rpm
# rpm-ivhlibstdc++-devel-4.4.5-6.el6.x86_64.rpm
# rpm-ivhgcc-c++-4.4.5-6.el6.x86_64.rpm
Note: The above is the installation gcc-c++

Reference: http://blog.csdn.net/paullmq/article/details/8568604


Installing here will have two scripts that need to be run by the root user. Open Xshell to run both scripts as the root user.

[Email protected] ~]#/orainventory/orainstroot.sh

[Email protected] ~]# /oracle_11g/oracle/root.sh


Oracle 11g R2 Database software has been installed after the script has finished running.

After installation, click Close to exit the installation screen.

8: Set Listener


Start the Create listener using the NETCA command in the terminal.




Sets the listener name.

The following is consistent with the actions on Windows ...

9: Create a DB instance


Start creating the DB instance using the DBCA command in the terminal.

Set the instance name to fill, and the instance name needs to correspond to the oracle_sid= (instance name) in the/oracle/.bash_profile file.

The same as the actions on Windows ...

The Oracle 11g R2 installed at Redhat enterpriselinux 6.1 is complete.

After the configuration is complete, start the EM console using the following command:

[Email protected] ~]$ emctl start dbconsole

http://localhost:1158/em/

Visit the Web Enterprise Management page

Installing Oracle 11g R2 under Redhat Linux

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.