redhat6.5 Deploying Oracle 11G R2 (Reference configuration)

Source: Internet
Author: User
Tags chmod dba message queue semaphore

Problems encountered during installation:

1. When creating an Oracle user, it is best to specify the home directory, the general is/opt/oracle, the default/home/oracle is also possible.

2. In the "Add host name and IP address corresponding" step, be sure to configure the IP, or "Oracle Net configuration assisant failed" error during installation

RHEL6.5 Installing the Oracle 11g R2 database

    • Experimental environment

Virtual Machine version

VM12 Pro

Operating system

Redhat-6.5-x86_64

Host Name

OracleDB

Memory

4G Official recommended minimum 1G

Hard disk

30G depends on your actual needs and configuration

Oracle Data files

Linux.x64_11gR2_database_1of2.zip Linux.x64_11gR2_database_2of2.zip

    • System Adjustment Steps

Step 1-Modify the host name

[Email protected] ~]# sed-i "s/hostname=xuegod64/hostname=oracledb/"/etc/sysconfig/network

[Email protected] ~]# hostname oracledb

[Email protected] ~]# cat/etc/sysconfig/network

Step 2-Add host name and IP correspondence record

[Email protected] ~]# vim/etc/hosts

[Email protected] ~]# more/etc/hosts

Step 3-Install the dependency package

[Email protected] ~]# yum-y install gcc gcc-c++ make binutilscompat-libstdc++-33 elfutils-libelf elfutils-libelf-devel g libc glibc-commonglibc-devel libaio libaio-devel libgcclibstdc++ libstdc++-devel UnixODBC unixodbc-devel

Step 4-Create users and groups

[Email protected] ~]# Groupadd-g 251 Oinstall

[[email protected] ~]# GROUPADD-G 252 dba

[Email protected] ~]# useradd-u 256-g oinstall-g dba-d/opt/oracle-s/bin/bash-m

[Email protected] ~]# echo Oracle | passwd--stdin Oracle

Parameter explanation:

-G: Specifies the group to which the user belongs

-G: Specify additional groups to which the user belongs

-U: Specify User ID

-D: Specify the Household directory

-S: Specify User Login Shell

-M: created automatically if the owner directory does not exist.

Step 5: Modify kernel parameters

[Email protected] ~]# vim/etc/sysctl.conf

Parameter explanation:

Kernel.msgmax = 65536 #从一个进程发送到另一个进程的消息的最大长度. Inter-process messaging is done in the kernel's memory and is not swapped to disk, so increasing the value increases the amount of memory used by the operating system. Default setting: 8192

Net.ipv4.ip_local_port_range= 9000 65500 #表示应用程序可使用的IPv4端口范围.

Fs.file-max = 6815744 # This parameter determines the maximum number of file handles allowed in the system, and the file handle setting represents the number of files that can be opened on a Linux system.

Kernel.shmmni = 4096 #该参数是共享内存段的最大数量. Shmmni default value of 4096.

NET.CORE.RMEM_DEFAULT=262144 # Indicates the default value of the socket receive buffer size.

net.core.wmem_default=262144 #表示套接字发送缓冲区大小的缺省值.

net.core.rmem_max=4194304 #表示套接字接收缓冲区大小的最大值.

net.core.wmem_max=1048576 #表示套接字发送缓冲区大小的最大值.

FS.AIO-MAX-NR = 1048576 # This parameter limits the concurrent outstanding requests and should be set to avoid I/O subsystem failures.

Kernel.shmall = 10523004

#kernel. Shmall:

This parameter controls the total number of pages of shared memory that can be used. The size of the Linux Shared memory page is 4KB, and the size of the shared memory segment is an integer multiple of the shared memory page size. The maximum size of a shared memory segment is 16G, then the number of shared memory pages is 16gb/4kb=16777216kb/4kb=4194304 (page), which is 64Bit system 16GB physical memory, set Kernel.shmall = 4194304 to meet the requirements (almost twice times the original setting 2097152). At this time can adjust the Shmmax parameter to 16G, while you can modify the Sga_max_size and Sga_target 12G (you want to set the maximum size of the SGA, of course, it can be 2g~14g, but also to coordinate the PGA parameters and the OS and other memory use, can not be set too full, such as 16G)

Kernel.shmmax = 6465333657

# defines the maximum value for a single shared memory segment. Settings should be large enough to accommodate the entire SGA under a shared memory segment, too low a setting may result in the need to create multiple shared memory segments, which can result in degraded system performance. Official Recommended values:

32-bit Linux system: The maximum value is 4GB (4294967296bytes) -1byte, or 4294967295. The recommended value is more than half of the memory, so if 32 is the system, it is generally desirable to have a value of 4294967295. The 32-bit system has a limit on the SGA size, so the SGA can certainly be included in a single shared memory segment.

64-bit Linux system: the desired maximum value is the physical memory value -1byte, the recommended value is more than half of physical memory, the general value is greater than sga_max_size, you can take physical memory -1byte. For example, if you are 12GB of physical memory, the desirable 12*1024*1024*1024-1=12884901887,SGA will certainly be included in a single shared memory segment.

Kernel.sem = 250 32000 100 128

#以kernel. SEM = 250 32000 100 128 For example:

250 is the value of the parameter SEMMSL, which represents the maximum number of semaphores that can be contained in a semaphore collection.

32000 is the value of the parameter Semmns, which indicates the maximum number of semaphores that can be allowed within the system.

100 is the value of the parameter semopm that represents the number of operations that a single semopm () call can perform on a semaphore collection.

128 is the value of the parameter Semmni, which represents the total number of system semaphore sets.

[Email protected] ~]# sysctl-p #立即生效

########################################################################

Kernel parameters:

Shmmax

The maximum number of bytes in a shared memory segment, it is recommended to set a large point, or even larger than the number of bytes in physical memory. This parameter defines the maximum size, in bytes, of a shared memory segment. The default is 32M, which is too low for Oracle, usually set to 2G.

Shmmin:

The minimum size of the shared memory segment. The settings for this parameter are generally not problematic.

Shmmni:

The maximum number of shared memory segments. This kernel parameter is used to set the maximum number of shared memory segments within a system range. The default value for this parameter is 4096. It is not usually necessary to change.

SHMSEG:

The maximum number of shared memory segments that can be allocated per process

Shmall:

The maximum number of concurrent shared memory segments is larger than the SGA. This parameter represents the total amount of shared memory that the system can use at one time (in pages, a page size of 4KB). The default value is 2097152, which is usually not required for modification.

Sem:

is the abbreviation for semaphores, which represents the semaphore set. It consists of four values: SEMMSL, Semmns, SEMOPM, Semmni.

# Sysctl-a|grep SEM

Kernel.sem = 250 32000 100 128

Semmns:

The maximum number of semaphores is related to the number of Oracle process. SEMMSL * Semmni

SEMOPM:

Maximum number of semaphores allowed by the system call. At least 100; or equal to SEMMSL.

Semmni:

Maximum number of system semaphore set. Minimum 128

SEMMSL:

The maximum number of semaphores in each semaphore set. Minimum 250, the system recommended for processes parameter setting is set to processes+10.

Msgmni:

Specifies the maximum number of message queue identities. Default setting: 16

Msgmax:

The maximum length of a message sent from one process to another. Inter-process messaging is done in the kernel's memory and is not swapped to disk, so increasing the value increases the amount of memory used by the operating system. Default setting: 8192

MSGMNB:

The maximum number of bytes in a message queue. Default setting: 16384

Optmem_max: Maximum cache size per socket

Rmem_default: Default cache Size (bytes) for receiving sockets

Rmem_max: Maximum cache Size (bytes) for receive sockets

Wmem_default: Socket default cache Size sent (bytes)

Wmem_max: Socket Maximum cache size sent (bytes)

P_local_port_range: Represents the range of ports used for an outward connection. Small by default: 32768 to 61000, 10000 to 65000. (Note: Do not set the minimum value too low, otherwise it may take off the normal port!)

File-max: Represents the maximum number of file handles. The file handle setting indicates the number of files that can be opened on a Linux system. If the settings are too small, Oracle will not start or run abnormally.

########################################################################

Step 5-Modify system resource limits

[Email protected] ~]# vim/etc/security/limits.conf

Parameter explanation:

Oracle Soft Nproc 2047

Oracle Hard Nproc 16384

Oracle Soft Nofile 1024

Oracle Hard Nofile 65536

[Email protected] ~]# Vim/etc/pam.d/login

Parameter explanation:

Session Required Pam_namespace.so

Session Required Pam_limits.so

Step 6-Create the installation directory and set permissions

[Email protected] ~]# mkdir-p/opt/oracle/app/

[Email protected] ~]# mkdir-p/opt/oracle/oradata

[Email protected] ~]# chmod 755/opt/oracle/app/

[Email protected] ~]# chmod 755/opt/oracle/

[Email protected] ~]# chown oracle:oinstall-r/opt/oracle/

Step 7-Set up an Oracle environment variable

Su–oracle Switching to Oracle Users

[[email protected] ~]$ vim. Bash_profile

Parameter explanation:

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

[Email protected] ~]$ source./.bash_profile #立即生效

Step 8-Turn off SELinux

[Email protected] ~]# sed-i "s/selinux=enforcing/selinux=disabled/"/etc/selinux/config

[Email protected] ~]# Setenforce 0

[Email protected] ~]# Getenforce

Step 9-Turn off the firewall

[[Email protected] ~]# service iptables stop

[Email protected] ~]# chkconfig iptables off

    • Installing Oracle

Installation steps

(1) Uploading an Oracle installation package

First Linux.x64_11gR2_database_1of2.zip, linux.x64_11gR2_database_2of2.zip upload to Oracle home directory/opt/oracle

(2) Log in and unzip the installation package with an Oracle user

Use the Oracle User login GUI to extract files and perform the installation (some exceptions may occur if you are not logged on with an Oracle user, such as switching from root to Oracle)

Extract

[[Email protected]~]# unzip/opt/oracle/linux_64_11gr2/linux.x64_11gr2_database_1of2.zip

[[Email protected]~]# unzip/opt/oracle/linux_64_11gr2/linux.x64_11gr2_database_2of2.zip

[Email protected] ~]# MV database//opt/oracle/

[[Email protected] ~] #xhost +

[[Email protected] ~] #su –oracle

[Email protected] ~]$./database/runinstaller

Start installation

After the installation is complete, you will be prompted to execute the following two scripts

Log in with the root user and execute the script in the following two directories

Execute script

/opt/oracle/orainventory/orainstroot.sh

/opt/oracle/app/product/11.2.0/dbhome_1/root.sh

Verify

 

redhat6.5 Deploying Oracle 11G R2 (Reference configuration)

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.