Red Hat Enterprise 6.4 Installing Oracle 11gR2

Source: Internet
Author: User

by Toper Lv

2015.8.16

You may have had a similar experience in the process of accessing various documents on the Internet. A document that does not describe the experimental environment of the author of the document, or the description of the experimental environment is unclear. Therefore, once the document content operation error, it is difficult to determine the cause of the problem is the environment is different, or the process of their own error. ,

I naturally can not avoid the above situation, so I write the document as much as possible to describe their own environment, I hope other people reference this document will not be too confused.

1 Lab Environment 1.1 hardware configuration

The lab environment for this document is virtual machines, with VMware WorkStation 11, the virtual Hardware version 10 (which can be directly understood as using VMware WorkStation 10), and the hardware configuration assigned to the virtual machine is as follows:

650) this.width=650; "title=" clip_image001 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image001 "src=" http://s3.51cto.com/wyfs02/M01/71/78/wKiom1XRS_ Lyfmq3aacdlmresdm802.jpg "height=" 185 "/>

1.2 Operating system

version: Red Hat Enterprise Linux 6.4 x86_x64-Desktop

Language: Chinese

Host Name:Oracle

IP :192.168.80.80

partitions: as follows

650) this.width=650; "title=" clip_image003 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image003 "src=" http://s3.51cto.com/wyfs02/M01/71/78/wKiom1XRS_ Odhqtgaacsuuvvslq954.jpg "height=" 155 "/>

1.3 Oracle installation Package

Oracle Official website is currently only available to download to 11.2.0.1 's installation package, so the installation package of this document please Baidu to find resources to download.

version:11.2.0.4

installation package file name:db_112040_linux-x86-64_1of7.zip, Db_112040_linux-x86-64_2of7.zip

2 Prepare before installation 2.1 Turn off the firewall

[[email protected] ~]# service iptables stop

[email protected] ~]# chkconfig iptables off

2.2 Configuring host Names

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

192.168.80.80 Oracle #在/etc/hosts file add as downstream

2.3 Configuring the Yum Source

Connect the RHEL6.4 installation disc to the optical drive and mount the disc

[email protected] ~]# Mount/dev/cdrom/media

[email protected] ~]# Vim/etc/yum.repos.d/rhel6.repo

[RHEL6]

Name=rhel6.4-iso

Baseurl=file:///media

Gpgcheck=0

Enabled=1

[email protected] ~]# yum Clean all

2.4 Installing Packages

The following are the predecessor packages required for Oracle installation.

[email protected] ~]# yum install-y binutils-2.* compat-libstdc++-33* elfutils-libelf-* gcc-4* gcc-c++* glibc* libaio* libgcc* libstdc++-* make-3.* sysstat* unixodbc*

There is a Pdksh installation package RHEL6.4 The image is not, you need to go online search and download, and then upload to our server for installation.

The installation package is uploaded to the root home directory.

[email protected] ~]# yum install-y./pdksh-5.2.14-37.el5_8.1.x86_64.rpm

2.5 Creating users and groups

In order to compare specifications, the ID of the user and group is specified, or it can be unspecified.

Create user Oracle, password passw0rd; Create group Oinstall, DBA.

[email protected] ~]# groupadd-g oinstall

[[email protected] ~]# groupadd-g 5001 dba

[email protected] ~]# useradd-u 5000-g oinstall-g dba Oracle

[email protected] ~]# echo ' Passw0rd ' | passwd--stdin Oracle

2.6 Configuring the Kernel

The purple font is the existing content and needs to be changed according to the document. Green is added to the new content.

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

#单个共享内存段的最大值 (cannot exceed the size of its own memory, the value set here is 2G)

Kernel.shmmax = 2147483648

#可以使用的共享内存的总页数

Kernel.shmall = 2097152

#该参数是共享内存段的最大数量, the default value of 4096 is recommended

Kernel.shmmni = 4096

Kernel.sem = 250 32000 100 128

#该参数决定了系统中所允许的文件句柄最大数目, the file handle setting represents the number of files that can be opened on a Linux system

Fs.file-max = 6815744

#套接字接收缓冲区大小的缺省值

Net.core.rmem_default = 1048576

#套接字接收缓冲区大小的最大值

Net.core.rmem_max = 4194304

#套接字发送缓冲区大小的缺省值

Net.core.wmem_default = 262144

#套接字发送缓冲区大小的最大值

Net.core.wmem_max = 1048576

#此参数限制并发未完成的请求, you should set up to avoid I/O subsystem failure

FS.AIO-MAX-NR = 1048576

#IP4的端口可使用范围

Net.ipv4.ip_local_port_range = 9000 65500

[email protected] ~]# /sbin/sysctl-p

Executing this command causes the modified kernel parameters to take effect immediately, ignoring the following error message

Error: "Net.bridge.bridge-nf-call-ip6tables" is an unknown key

Error: "Net.bridge.bridge-nf-call-iptables" is an unknown key

Error: "Net.bridge.bridge-nf-call-arptables" is an unknown key

2.7 Configuring Resource Limits

Add the following in the resource limit

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

Oracle Soft Nproc 2047

Oracle Hard Nproc 16384

Oracle Soft Nofile 1024

Oracle Hard Nofile 65536

Oracle Soft Stack 10240

2.8 Creating the installation directory

Create an Oracle installation directory and change the directory owner, owning group

[email protected] ~]# mkdir-p/u01/app/oracle

[email protected] ~]# chown-r oracle:oinstall/u01/

2.9 Configuring environment variables

Switch to the Oracle user you created.

[email protected] ~]# su-oracle

[[email protected] ~]$ vim. Bash_profile

Oracle_base=/u01/app/oracle

Oracle_home= $ORACLE _base/product/11.2.0/dbhome_1

ORACLE_SID=ORCL #这里指定的ORACLE_SID为数据库实例名

Ld_library_path= $ORACLE _home/lib

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

Export oracle_base oracle_home oracle_sid ld_library_path PATH

Make environment variables effective

[email protected] ~]$ source/home/oracle/.bash_profile

3 Oracle Installation

Oracle installation is divided into two steps: Oracle software Installation and database creation, which can be done in two steps, or in two steps, where only two-step installation is demonstrated.

Sign in with an Oracle user to install.

3.1 Oracle Software Installation

Uploading an Oracle installation package to a user's Oracle home directory

[[email protected] ~]$ ls

Db_112040_linux-x86-64_1of7.zip

Db_112040_linux-x86-64_2of7.zip

Unzip the installation package and automatically create the database directory

[email protected] ~]$ unzip Db_112040_linux-x86-64_1of7.zip; Unzip Db_112040_linux-x86-64_2of7.zip

Open another terminal and use the root user to perform the following command to ensure that the Oracle graphical installation interface can be called properly

[email protected] ~]# Xhost +

Specifies that the output language is en_US to prevent the installation interface from garbled

[email protected] ~]$ export Lang=en_us

[[email protected] ~]$ CD Database

[email protected] database]$ ./runinstaller

The installer opens the Oracle graphical installation interface

Uncheck the box and the next step

650) this.width=650; "title=" clip_image005 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image005 "src=" http://s3.51cto.com/wyfs02/M02/71/78/wKiom1XRS_ Obftzvaadphicaajs057.jpg "height=" 422 "/>

Yes

650) this.width=650; "title=" clip_image007 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image007 "src=" http://s3.51cto.com/wyfs02/M02/71/78/wKiom1XRS_ Ognefgaae6vmqvgkg521.jpg "height=" 422 "/>

Skip Software Updates

650) this.width=650; "title=" clip_image009 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image009 "src=" http://s3.51cto.com/wyfs02/M00/71/74/ Wkiol1xrtf3s1quhaaet89yknzk811.jpg "height=" 422 "/>

Install database software only (previously mentioned here to demonstrate the software and create a separate installation of databases)

650) this.width=650; "title=" clip_image011 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image011 "src=" http://s3.51cto.com/wyfs02/M00/71/78/wKiom1XRS_ Td2ovgaad5bq98b14279.jpg "height=" 422 "/>

Single Instance database installation (one-instance DB installation)

650) this.width=650; "title=" clip_image013 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image013 "src=" http://s3.51cto.com/wyfs02/M01/71/74/ Wkiol1xrtf7iupmnaadrw5l-yvm930.jpg "height=" 422 "/>

Add Language: Simplified Chinese

650) this.width=650; "title=" clip_image015 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image015 "src=" http://s3.51cto.com/wyfs02/M01/71/78/wKiom1XRS_ Scyzhraaewna7kyne006.jpg "height=" 422 "/>

Enterprise Edtion (Corporate Edition)

650) this.width=650; "title=" clip_image017 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image017 "src=" http://s3.51cto.com/wyfs02/M02/71/78/wKiom1XRS_ Whmidtaafo6dwrbms803.jpg "height=" 422 "/>

Oracle automatically chooses a set of installation paths based on the environment variables, directly next

650) this.width=650; "title=" clip_image019 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image019 "src=" http://s3.51cto.com/wyfs02/M02/71/74/ Wkiol1xrtf-tb8pwaaezhlvi1ha782.jpg "height=" 422 "/>

Next

650) this.width=650; "title=" clip_image021 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image021 "src=" http://s3.51cto.com/wyfs02/M01/71/74/ Wkiol1xrtf-hqiauaaeqdehsdka490.jpg "height=" 422 "/>

The following blank selection box selects Oinstall,next

650) this.width=650; "title=" clip_image023 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image023 "src=" http://s3.51cto.com/wyfs02/M00/71/74/wKioL1XRTf_ Q7oweaaethocob4w147.jpg "height=" 422 "/>

This step is to check the pre-installation configuration environment, because we have configured all the preparation environment, so this step will be automatically skipped after the detection pass. The following is a step backward detection of dependent packages

650) this.width=650; "title=" clip_image025 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image025 "src=" http://s3.51cto.com/wyfs02/M01/71/74/wKioL1XRTf_ Rk5xlaad-okjnbfm976.jpg "height=" 299 "/>

Install

650) this.width=650; "title=" clip_image027 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image027 "src=" http://s3.51cto.com/wyfs02/M02/71/74/ Wkiol1xrtgcsgp9eaafdfgr7ozw801.jpg "height=" 422 "/>

The software installs to the last step, will jump out the following script execution prompt

650) this.width=650; "title=" clip_image029 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image029 "src=" http://s3.51cto.com/wyfs02/M02/71/78/wKiom1XRS_ Bhqxzwaafikuxlc8o227.jpg "height=" 422 "/>

Open a terminal, log in with Root, and execute the script that requires execution. After execution, click OK on the graphical interface.

[email protected] ~]# /u01/app/orainventory/orainstroot.sh

[email protected] ~]# /u01/app/oracle/product/11.2.0/dbhome_1/root.sh

650) this.width=650; "title=" clip_image031 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image031 "src=" http://s3.51cto.com/wyfs02/M00/71/74/ Wkiol1xrtgdg2el4aahnl1r6wre363.jpg "height=" 369 "/>

Installation Complete, Close

650) this.width=650; "title=" clip_image033 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image033 "src=" http://s3.51cto.com/wyfs02/M01/71/74/ Wkiol1xrtgcq--kbaadczddoqge713.jpg "height=" 422 "/>

3.2 Creating a Database

Log in with Oracle user, execute command: DBCA

650) this.width=650; "title=" clip_image035 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image035 "src=" http://s3.51cto.com/wyfs02/M02/71/78/wKiom1XRS_ Ehqhasaad72x8wem0261.jpg "height=" 424 "/>

Create a Database

650) this.width=650; "title=" clip_image037 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image037 "src=" http://s3.51cto.com/wyfs02/M02/71/74/ Wkiol1xrtghqmvitaado5781re8411.jpg "height="/>

Default selection: General purpose/Transaction processing

650) this.width=650; "title=" clip_image039 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image039 "src=" http://s3.51cto.com/wyfs02/M01/71/74/ Wkiol1xrtggbinomaaetdo5me0w719.jpg "height="/>

Set the database name and SID based on the ORACLE_SID set in the environment variable, set here: ORCL

650) this.width=650; "title=" clip_image041 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image041 "src=" http://s3.51cto.com/wyfs02/M02/71/74/ Wkiol1xrtghhnhxvaad0icb-vho266.jpg "height="/>

Since monitoring is not started, the following menu switch will have a warning

650) this.width=650; "title=" clip_image043 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image043 "src=" http://s3.51cto.com/wyfs02/M00/71/74/ Wkiol1xrtgkiljg8aae3wvr4fcy489.jpg "height="/>

Use an Oracle user login to start the listener. Monitor start back GUI Point ok

[[email protected] ~]$ lsnrctl start

650) this.width=650; "title=" clip_image045 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image045 "src=" http://s3.51cto.com/wyfs02/M00/71/74/wKioL1XRTgLzPawLAAA8-Q-nT_4836. JPG "height="/>

Select all users to set the same password (please set the password for these users in the official business)

650) this.width=650; "title=" clip_image047 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image047 "src=" http://s3.51cto.com/wyfs02/M01/71/75/wKioL1XRTgKiOD_ Saaec7r-wyhe851.jpg "height="/>

Prompt to set password in the previous step is not secure, yes continue

650) this.width=650; "title=" clip_image049 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image049 "src=" http://s3.51cto.com/wyfs02/M01/71/78/wKiom1XRS_ Mgyurzaaedzmqpepy571.jpg "height="/>

Select: Use oracle-managed Files

650) this.width=650; "title=" clip_image051 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image051 "src=" http://s3.51cto.com/wyfs02/M02/71/78/wKiom1XRS_ Nzkjzlaafcqbaefq8561.jpg "height="/>

Leave the default, Next

650) this.width=650; "title=" clip_image053 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image053 "src=" http://s3.51cto.com/wyfs02/M00/71/75/ Wkiol1xrtgpdmsoeaaempe0shjc193.jpg "height="/>

Next

650) this.width=650; "title=" clip_image055 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image055 "src=" http://s3.51cto.com/wyfs02/M02/71/75/ Wkiol1xrtgsbn9f2aaepohoojn4459.jpg "height="/>

Other not set, Character Set selection: UTF8

650) this.width=650; "title=" clip_image057 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image057 "src=" http://s3.51cto.com/wyfs02/M02/71/78/wKiom1XRS_ Qg8e3waafixeiimne204.jpg "height="/>

Next

650) this.width=650; "title=" clip_image059 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image059 "src=" http://s3.51cto.com/wyfs02/M01/71/75/ Wkiol1xrtgsjuzivaafy7hjya1k596.jpg "height="/>

Leave the default, Finish

650) this.width=650; "title=" clip_image061 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image061 "src=" http://s3.51cto.com/wyfs02/M01/71/78/wKiom1XRS_ Utyw5oaad-qbv14l8750.jpg "height="/>

Ok

650) this.width=650; "title=" clip_image063 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image063 "src=" http://s3.51cto.com/wyfs02/M01/71/78/wKiom1XRS_ Vjax5qaafw4xtnnae806.jpg "height=" 558 "/>

The database starts to install, please wait patiently

650) this.width=650; "title=" clip_image065 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image065 "src=" http://s3.51cto.com/wyfs02/M02/71/75/ Wkiol1xrtgwitfzeaaebwmtmbi4749.jpg "height="/>

Exit (the password has just been set, this is not in the password management)

The GUI automatically shuts down after exiting and the database installation is complete.

650) this.width=650; "title=" clip_image067 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image067 "src=" http://s3.51cto.com/wyfs02/M02/71/78/wKiom1XRS_ Zweb5eaaglkjbxjuy976.jpg "height="/>

4 Viewing Database 4.1 listening

Executed under the Oracle user.

4.1.1 Viewing the Listening status

After the installation of the previous steps, the default listener has been started to view the listening status.

[email protected] ~]$ lsnrctl Status

650) this.width=650; "title=" clip_image069 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image069 "src=" http://s3.51cto.com/wyfs02/M00/71/75/ Wkiol1xrtgasfhz-aag1st9p5b8135.jpg "height=" 383 "/>

4.1.2 Start/Turn off monitoring

Start monitoring

[[email protected] ~]$ lsnrctl start

Turn off monitoring

[[email protected] ~]$ lsnrctl stop

650) this.width=650; "title=" clip_image071 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image071 "src=" http://s3.51cto.com/wyfs02/M00/71/78/wKiom1XRS_ Zjnwawaact6mk4bqo122.jpg "height=" 148 "/>

650) this.width=650; "title=" clip_image073 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image073 "src=" http://s3.51cto.com/wyfs02/M01/71/75/ Wkiol1xrtgbwsynyaahlj5peomg339.jpg "height=" 461 "/>

4.2 Database

Executed under the Oracle user.

4.2.1 View database Status

Default database is started, connect to database, view database status

[email protected] ~]$ sqlplus/as sysdba

sql> Select status from V$instance;

sql> Select Open_mode from V$database;

650) this.width=650; "title=" clip_image075 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image075 "src=" http://s3.51cto.com/wyfs02/M01/71/78/wKiom1XRS_ 3igrrlaaezqk82tfm843.jpg "height=" 370 "/>

4.2.2 Start/Close Database

Start the database

sql> Startup

Close the database

sql> Shutdown Immediate

650) this.width=650; "title=" clip_image077 "style=" Border-top:0px;border-right:0px;border-bottom:0px;border-left : 0px; "border=" 0 "alt=" clip_image077 "src=" http://s3.51cto.com/wyfs02/M02/71/75/ Wkiol1xrtgerqtfeaacqrjsj72k573.jpg "height=" 215 "/>

This article is from the "Stroll Network" blog, please be sure to keep this source http://leihenzhimu.blog.51cto.com/3217508/1685164

Red Hat Enterprise 6.4 Installing Oracle 11gR2

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.