CentOS6 Installing Oracle 11g R2

Source: Internet
Author: User

Label:

Selection:
32-bit memory is a bottleneck, already 64-bit era. Use 64-bit CentOS6 and 64-bit Oracle 11g R2
In virtual machine installation, the network is set up by hostonly mode
Note: Network adapter to set up ICS (Internet Connection Sharing) to the VMware network Adapter VMnet1
So for virtual machines, the gateway is 192.168.137.1,IP address please also set in 192.168.137.0/24 segment
HDD 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 Address:
Http://www.cnblogs.com/wenlg/archive/2010/05/19/1738893.html




Second, install the CentOS installation
Virtual machine, 40G HDD, 2GRAM
2.1. Installation Planning
Machine Name: DBServer
A. Set up at installation
B, or installed after the 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. Set up at installation
B. Use setup after installation.
C, install after vim/etc/sysconifg/network-scripts/ifcfg-eth0, change the service network restart|force-reload or Ifdown eth0 && Ifup eth0




2.3. Disk Planning
Disk is limited, zoning may not be reasonable, use LVM as much as possible
/boot 200M Primary partition
/primary Partition
Swap size refer to the following


Swap sizes refer 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, installation of the main settings
Chinese Simplified
American keyboard
CentOS6 Install the basic Server, then select "Customize Now"
Remove Java from the "Basic system", Perl
The best choice for "apps" is emacs and Internet applications.
"Desktop" selects all components except KDE desktop




Reset Settings after reboot:
NTP is best chosen to ensure that the time is correct and the "Quick Start Sync" option is selected in the Advanced options
Kdump can not
Restart 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 does not recognize, 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. 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 die on this or the energy is on it.
However, 11g is very user-friendly, increase the inspection mechanism, there is not like 10g in the 64-bit to install a lot of 32-bit package, just to install a gcc-32bit-4.3 on OK.
The following tables 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)
Tips (package name does not add version number, that is, the first "-number" after the not, such as GCC)
RPM-Q Package Name
Yum List Installed | grep ' ^ Package name '
Not equipped with network or configuration good DVD2
Yum Install package Name
Yum Install package name *
Yum Search Package Name
Yum whatprovides file name
Yum Install file name
Google found rpm in less than Yum
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 written the above package to install a command, unless the character is not good, it 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, do not need to service, machine name
5.1. SELinux off (not recommended)
Vim/etc/sysconfig/selinux
Selinux=enforcing changed into selinux=disabled




5.2. Firewall
Iptables
Ip6tables
Turn it off


5.3. Unnecessary services
Cups printer
Postfix, etc.




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




5.4. Machine name
Hostname
The hostname in/etc/sysconfig/network to 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 also added the last line of IP settings (I didn't add)




6, set up users, groups, installation directory
6.1. Set up 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 a oralce user exists, the third command becomes:
USERMOD-G oinstall-g dba Oracle




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


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




6.2, set up the installation directory (Google a bit 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 many 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 that the Shmmax parameter, the minimum 500M, the maximum is less than the memory of a byte can be, recommended than half the memory of a little bit
minimum:536870912
Maximum:a value is 1 bytes less than the physical memory
Recommended:more than half the physical memory
See My Oracle Support Note 567506.1 For additional information about configuring Shmmax.
and special attention sysctl.conf in Shmmax, Shmall already have, to comment out
Make it effective after you change it.
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 immediate, but may have to be re-logged in and then look
Ulimit-sn
Ulimit-hn
Ulimit-sn
Ulimit-sn
Ulimit-sn




Vim/etc/pam.d/login (feels like no need)
#session required/lib/security/pam_limits.so
Session Required Pam_limits.so




7.3, modify the Ulimit (feel as if 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 the 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 following, it's almost there.
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
Download Oracle files for 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 prerequisite checks, 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 by one.
All goes well, in the end, to execute two scripts with root, follow the prompts to OK
Browser opens Https://localhost:1158/em

CentOS6 Installing Oracle 11g R2

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.

Tags Index: