RHEL6 (CentOS6) installs Oracle 11g R2 notes (full detailed available edition) ____oracle

Source: Internet
Author: User
Tags dba stdin

Selection:
32-bit memory is a bottleneck, it is already 64-digit era. Use 64-bit CentOS6 and 64-bit Oracle 11g R2
In the virtual machine installation, use the Hostonly way to set up the network
Note: The Internet adapter will be able to set up ICS (Internet Connection Sharing) to VMware network Adapter VMnet1
So for the virtual machine, the gateway is 192.168.137.1,IP address please also set in 192.168.137.0/24 segment
Hard drive 40G, memory 2G

1, download software
1.1, CentOS 6 (x86_64)
http://mirrors.163.com/centos/

1.2, Oracle 11g R2 (Linux x86-64)
Http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
Attached: Oracle 10g download site:
Http://www.cnblogs.com/wenlg/archive/2010/05/19/1738893.html

Installation of CentOS Installation
Virtual machine, 40G HDD, 2GRAM
2.1. Installation Planning
Machine Name: DBServer
A, installation time setup
B, or installed after vim/etc/sysconfig/network

2.2, Network
ipaddr:192.168.137.15
netmask:255.255.255.0
gateway:192.168.137.1
dns1:8.8.8.8
Automatic connection set to Yes
A, installation time setup
B. Use setup after installing
C, after Vim/etc/sysconifg/network-scripts/ifcfg-eth0, after the service network restart|force-reload or Ifdown eth0 && Ifup eth0

2.3. Disk Planning
Disk is limited, zoning may not be reasonable, try to use LVM
/boot 200M Primary Partition
/primary Partition
The swap size is referenced below

The swap size refers to the following:
Available RAM Swap Space Required
Between 1 GB and 2 GB 1.5 times the size of the RAM
Between 2 GB and GB Equal to the size of the RAM
More than GB

2.4, the installation of the main settings
Chinese Simplified
American keyboard
CentOS6 Install basic Server and select now customize
"Basic System" in Java, Perl
Emacs and Internet applications are best chosen in the application
"Desktop" selects all components except the KDE desktop

Set after reboot:
NTP best choice, ensure time is correct, and select "Quick Start Sync" in Advanced options
Kdump can not
Reboot again, OK.

3. System Check
3.1, memory recommended more than 2GB
# grep Memtotal/proc/meminfo
# free
3.2, swap partition settings see below
# swapon-s
/tmp directory greater than 1G
# DF-H/tmp
# du-sm/tmp
3.3, disk space should be no problem
# df-h
3.4. System Architecture
# cat/proc/version
# uname-a
# Uname-r
# lsb_release-a

4, set up the system
4.1. Operating system
The system only supports red Hat Enterprise Linux 6,centos 6 is actually RHEL6, but Oracle doesn't recognize it, so change
Vim/etc/redhat-release
#CentOS Release 6.3 (Final) This line is commented out, plus the following
Red Hat Enterprise Linux 6
4.2, the Core
2.6.32-71.el6.x86_64 or later
# uname-r, check it out.
Generally, there is no problem.
4.3, package requirements
This is the most annoying. Countless people are dying on this, or they're wasting their energy on this.
However, 11g very user-friendly, increased the mechanism of inspection, there is not like 10g in 64-bit to install a lot of 32-bit package, only to install a gcc-32bit-4.3 on the OK.
The following list must be installed:
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)
Tip (do not add a version number, that is, the first "-number" after the do not, such as GCC)
RPM-Q Package Name
Yum List Installed | grep ' ^ Package name '
Not fitted with a good network or configured DVD2
Yum Install package Name
Yum Install package name *
Yum Search Package Name
Yum whatprovides filename
Yum Install filename
Yum Google finds rpm
wget xxxx.rpm
RPM-IVH xxx.rpm

OK, install, before installing, update the system to the latest version first
Yum list Updates
Yum Upgrade
Reboot
I have already written the above package to install an order, unless the character is bad, otherwise should be a success
Yum-y install \
Binutils \
COMPAT-LIBCAP1 \
COMPAT-LIBSTDC++-33 \
compat-libstdc++-33*.i686 \
Elfutils-libelf-devel \
GCC \
gcc-c++ \
glibc*.i686 \
GLIBC \
Glibc-devel \
glibc-devel*.i686 \
Ksh \
libgcc*.i686 \
LIBGCC \
libstdc++ \
libstdc++*.i686 \
Libstdc++-devel \
libstdc++-devel*.i686 \
Libaio \
libaio*.i686 \
Libaio-devel \
libaio-devel*.i686 \
Make \
Sysstat \
UNIXODBC \
unixodbc*.i686 \
Unixodbc-devel \
unixodbc-devel*.i686 \
Libxp

5, SELinux, firewall, no need to service, machine name
5.1, SELinux turn it Off (not recommended)
Vim/etc/sysconfig/selinux
Selinux=enforcing changed into selinux=disabled

5.2, Firewall
Iptables
Ip6tables
Turn it off

5.3. Unnecessary service
Cups printer
Postfix, etc.

Off Service Command
1, NTSYSV visual interface configuration Save
2, CHKCONIFG
Chkconfig--list | grep on see which services are open on the
Service service name stop or/etc/init.d/services name stop
Chkconfig Service Name off

5.4. Machine name
Hostname
The hostname in/etc/sysconfig/network should be consistent with the/etc/hosts
Vim/etc/sysconfig/network
Networking=yes
Hostname=dbserver
gateway=192.168.137.1
Ntpserverargs=iburst
is the hostname=dbserver above.
Vim/etc/hosts
127.0.0.1 localhost dbserver
:: 1 localhost dbserver
#ip DBServer
Someone added the last line of IP settings (I didn't add)

6, set up users, groups, installation directory
6.1, the establishment of users and groups (official documents)
Groupadd Oinstall
Groupadd dba
USERADD-G oinstall-g dba Oracle
echo "Oracle" | passwd--stdin Oracle #密码设置为oracle, for Security, change it, or you can use the interactive passwd command directly.
If the Oralce user exists, the third command becomes:
USERMOD-G oinstall-g dba Oracle

There is also a Oper group (recommended)
Groupadd Oinstall
Groupadd dba
Groupadd Oper
USERADD-G oinstall-g Dba,oper Oracle
echo "Oracle" | passwd--stdin Oracle

Check
ID Oracle
uid=501 (Oracle) gid=501 (oinstall) group =501 (Oinstall), 502 (DBA), 503 (Oper)

6.2, set up the installation directory (Google OFA)
Mkdir-p/u01/app/oracle/product/11.2.0/db_1
Chown-r Oracle:oinstall/u01/app
Chmod-r 775/u01/app

7. Modify a lot of parameters
7.1. Kernel parameters
Vim/etc/sysctl.conf
FS.AIO-MAX-NR = 1048576
Fs.file-max = 6815744
Kernel.shmall = 2097152
Kernel.shmmax = 1200000000
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

The most important thing to note is the Shmmax this parameter, the smallest 500M, the maximum is less than memory one byte can be, recommend a little more than half of memory
minimum:536870912
Maximum:a value is 1 byte less than the physical memory
Recommended:more than half the physical memory
"I Oracle Support note 567506.1 For additional information about configuring Shmmax."
and special attention sysctl.conf Shmmax, Shmall already have, to comment out
To make it effective after the change
Sysctl-p

7.2, change the file limit
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
Note: Modifying this file is effective immediately, but you may want to log back in to see
Ulimit-sn
Ulimit-hn
Ulimit-sn
Ulimit-sn
Ulimit-sn

Vim/etc/pam.d/login (feel like it's not necessary)
#session required/lib/security/pam_limits.so
Session Required Pam_limits.so

7.3. Modify Ulimit (feel like it's not necessary)
Vim/etc/profile
if [$USER = "Oracle"]; Then
if [$SHELL = "/bin/ksh"]; Then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Fi

7.4. Modify Oracle User Environment variables
Vim ~oracle/.bash_profile
Oracle_base=/u01/app/oracle #修改和OFA路径一致
Oracle_home= $ORACLE _base/product/11.2.0/db_1
ORACLE_SID=ORADB #修改
Export Oracle_base oracle_home Oracle_sid

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

Or the bottom, it's all the same.
tmp=/tmp; Export TMP
Tmpdir= $TMP; Export Tmpdir
Oracle_hostname=dbserver; Export Oracle_hostname
ORACLE_UNQNAME=ORADB; Export Oracle_unqname
Oracle_base=/u01/app/oracle; Export Oracle_base
Oracle_home= $ORACLE _base/product/11.2.0/db_1; Export Oracle_home
ORACLE_SID=ORADB; Export Oracle_sid
Path=/usr/sbin: $PATH; Export PATH
Path= $ORACLE _home/bin: $PATH; Export PATH
Ld_library_path= $ORACLE _home/lib:/lib:/usr/lib; Export Ld_library_path
Classpath= $ORACLE _home/jlib: $ORACLE _home/rdbms/jlib; Export CLASSPATH

8, installation
Downloaded Oracle files ssh to/u01/app/oracle
# Xhost + #一定要运行一下
# su-oracle
$ cd/u01/app/oracle
$ unzip Linux.x64_11gR2_database_1of2.zip
$ unzip Linux.x64_11gR2_database_2of2.zip
$ unset LANG LANGUAGE #解决中文乱码
$ cd/u01/app/oracle/databse
$./runinstaller

When performing a prerequisite check, there will be a lot of package requirements, most of which are outdated and can be ignore off. But take a look at it one at a moment.
All goes well, in the end, to execute two scripts with root, press the prompt to OK
Browser Open Https://localhost:1158/em

Last: http://docs.oracle.com/cd/E11882_01/install.112/e24326/toc.htm

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.