Install Oracle Database 12c on Linux Platform

Abstract: Official download address: 1: http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html 2: https://edelivery.oracle.com/EPD/Download/get_form? egroup_aru_number=16496132 URL address 2 needs to be registered first, and then you can log in and download. The registration and login interface https://edelivery.oracle.com What is the difference between the two: I heard from a colleague that the installation files downloaded with the metalink account are more complete.

Official download address:

1: http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

2: https://edelivery.oracle.com/EPD/Download/get_form?egroup_aru_number= 16496132

URL address 2 needs to be registered before you can log in and download. The registration and login interface https://edelivery.oracle.com

clip_image002

What is the difference between the two: I heard from a colleague that the installation files downloaded with the metalink account are more complete. Whether this is the case or not is unknown.

The file downloaded from address 1 is:

linuxamd64_12c_database_1of2.zip

linuxamd64_12c_database_2of2.zip

The file downloaded from address 2 is:

V38500-01_1of2.zip

V38500-01_2of2.zip

2)检查硬件要求(Check Hardware Requirements)



2.1 Check CPU

[root@getoraclelnx01 tmp]#

[root@getoraclelnx01 tmp]# grep "model name" /proc/cpuinfo

model name      : Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz

model name      : Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz

model name      : Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz

model name      : Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz

model name      : Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz

model name      : Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz

model name      : Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz

model name      : Intel(R) Xeon(R) CPU E5-2680 0 @ 2.70GHz

[root@getoraclelnx01 tmp]# cat /proc/cpuinfo | grep "processor" | wc -l

8

[root@getoraclelnx01 tmp]#  cat /proc/cpuinfo | grep "physical id" | sort | uniq | wc -l

4

[root@getoraclelnx01 tmp]#

clip_image004

2.2 Check Memory

[root@getoraclelnx01 tmp]# grep MemTotal /proc/meminfo

MemTotal:       24736752 kB

[root@getoraclelnx01 tmp]# grep SwapTotal /proc/meminfo

SwapTotal:      37748728 kB

[root@getoraclelnx01 tmp]# free -g

               total           used        free     shared    buffers     cached

Mem:         23              7             16            0              0               5

-/+ buffers/cache:      1             22

Swap: 35 0 35

[root@getoraclelnx01 tmp]# clip_image006

Oracle

12c requires a minimum system memory of 1G, and recommends 2G or larger memory. From the above results, we can know that the system memory is 23G, which fully meets the requirements.

Oracle's recommended settings for the swap partition (Swap Space) are as follows, where the Swap Space is 35G, not 16G, and needs to be adjusted.

clip_image008

2.3 Check Disk Capacity

clip_image010

Oracle 12c Enterprise Edition requires 6.4G disk space, and Standard Edition requires 6.1G disk space. /tmp needs to be at least 1G in size. From the above results, the disk space is fully satisfied.

3) Checking the Software Requirements

3.1 Operating system version detection

     Oracle 12 c only supports 64-bit Linux systems. Does not support the 32Linux platform, this may be the future trend. Operating System Requirements for x86-64 Linux Platforms. Oracle's official documentation clearly lists the following three Linux versions

Supported Oracle Linux 6 and Red Hat Enterprise Linux 6 Distributions for x86-64
Supported Oracle Linux 5 and Red Hat Enterprise Linux 5 Distributions for x86-64
Supported SUSE Distributions for x86-64
[root@getoraclelnx01 /]# uname -m

x86_64

[root@getoraclelnx01 /]# uname -r

2.6.32-200.13.1.el5uek

[root@getoraclelnx01 /]# more /etc/redhat-release

Red Hat Enterprise Linux Server release 5.7 (Tikanga)

[root@getoraclelnx01 ~]# uname -a

Linux getoraclelnx01.gfg1.esquel.com 2.6.32-200.13.1.el5uek #1 SMP Wed Jul 27 21:02:33 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux

[root@getoraclelnx01 Server]# lsb_release -id

Distributor ID: EnterpriseEnterpriseServer

Description: Enterprise Linux Enterprise Linux Server release 5.7 (Carthage)

[root@getoraclelnx01 Server]#

3.2 Check the packages required for oracle 12c

Regarding the packages required for Oracle 12c, from the official documentation, different versions of the operating system seem to be different. Oracle Linux 5 and Red Hat Enterprise Linux 5 need to install the following packages

binutils-2.17.50.0.6

compat-libstdc++-33-3.2.3

compat-libstdc++-33-3.2.3 (32 bit)

gcc-4.1.2

gcc-c++-4.1.2

glibc-2.5-58

glibc -2.5- 58 (32 bit)

glibc-devel-2.5-58

glibc-devel-2.5-58 (32 bit)

ksh

libaio-0.3.106

libaio-0.3.106 (32 bit)

libaio-devel-0.3.106

libaio-devel-0.3 .106 (32 bit)

libgcc-4.1.2

libgcc-4.1.2 (32 bit)

libstdc++-4.1.2

libstdc++-4.1.2 (32 bit)

libstdc++-devel 4.1.2

libXext-1.0.1

libXext-1.0.1 (32 bit)

libXtst-1.0.1

libXtst-1.0.1 (32 bit)

libX11-1.0.3

libX11-1.0.3 (32 bit)

libXau-1.0.1

libXau-1.0.1 (32 bit)

libXi-1.0.1

libXi-1.0.1 (32 bit)

make-3.81

sysstat-7.0.2

rpm -q binutils compat-libstdc++ gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libXext libXtst libX11 libXau libXi make sysstat

clip_image012

如上所示,还需要安装包 compat-libstdc++和 libaio-devel相关包

clip_image014

[root@getoraclelnx01 Server]# rpm -ivh compat-libstdc++-33-3.2.3-61.i386.rpm

warning: compat-libstdc++-33-3.2.3-61.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159

Preparing... ########################################### [100%]

package compat-libstdc++-33-3.2.3-61.i386 is already installed

[root@getoraclelnx01 Server]# rpm -ivh compat-libstdc++-33-3.2.3-61.x86_64.rpm

warning: compat-libstdc++-33-3.2.3-61.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159

Preparing... ########################################### [100%]

package compat-libstdc++-33-3.2.3-61.x86_64 is already installed

[root@getoraclelnx01 Server]# ls *libaio-devel*

libaio-devel-0.3.106-5.i386.rpm libaio-devel-0.3.106-5.x86_64.rpm

[root@getoraclelnx01 Server]# rpm -ivh libaio-devel-0.3.106-5.i386.rpm

warning: libaio-devel-0.3.106-5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159

Preparing... ########################################### [100% ]

1:libaio-devel ########################################### [ 100%]

[root@getoraclelnx01 Server]# rpm -ivh libaio-devel-0.3.106-5.x86_64.rpm

warning: libaio-devel-0.3.106-5.x86_64.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159

Preparing... ########################################### [ 100%]

1:libaio-devel ########################################## # [100%]

[root@getoraclelnx01 Server]#As

shown above, it can be installed either with rpm or with yum local source. It depends on the convenience and personal preferences and habits. It is generally recommended to install with yum, but it needs to be configured. See my blog for details.

4) System configuration preparation

4.1 Create Oracle users and user groups

[root@getoraclelnx01 Server]# groupadd dba

[root@getoraclelnx01 Server]# groupadd oinstall

[root@getoraclelnx01 Server]# useradd -g oinstall -G dba oracle

[root@getoraclelnx01 Server]# id oracle

uid=502(oracle) gid=503(oinstall) groups=503(oinstall),502(dba)

[root@ getoraclelnx01 Server]# clip_image016 After

creating

the oracle user and related user groups, you need to set the oracle user password.

4.2 Create an installation directory

[root@getoraclelnx01 Server]#

[root@getoraclelnx01 Server]# mkdir -p /u01/app/oracle

[root@getoraclelnx01 Server]# chown -R oracle:oinstall /u01/app/oracle

[root@getoraclelnx01 Server]# chmod -R 775 /u01/app/oracle

[root@getoraclelnx01 Server]# clip_image018

4.3

Disable SELinux

[root@getoraclelnx01 ~]# /usr/sbin/sestatus

SELinux status: disabled

[root@getoraclelnx01 ~]# /usr/sbin/getenforce

Disabled

[root@getoraclelnx01 ~]# clip_image020

It

can be seen from the above that SELinux has been disabled. If it is not disabled, you can disable

getenforce with the following command (returns "Enforcing")

setenforce 0

getenforce (returns "Permissive")

End to restore it to enforcing

setenforce 1

getenforce (returns "Enforcing")

[root@getoraclelnx01 os]# /usr/sbin/sestatus

SELinux status: disabled

[root@getoraclelnx01 os]# /usr /sbin/getenforce

Disabled

[root@getoraclelnx01 os]#

Disable secure linux by editing the "/etc/selinux/config" file, making sure the SELINUX flag is set as follows.

SELINUX=disabled



4.4 Modifying system kernel parameters

Before modifying system kernel parameters, you can use commands to check the current values ​​of various system parameters, or directly check the configuration file /etc/sysctl.conf

[root@getoraclelnx01 ~]# getconf PAGESIZE

4096

[ root@getoraclelnx01 ~]# sysctl -a | grep sem

kernel.sem = 250 32000 32 128

[root@getoraclelnx01 ~]# sysctl -a | grep shm

kernel.shmmax = 68719476736

kernel.shmall = 4294967296

kernel.shmmni = 4096

vm. hugetlb_shm_group = 0

[root@getoraclelnx01 ~]# sysctl -a | grep file-max

fs.file-max = 2414060

[root@getoraclelnx01 ~]# sysctl -a | grep ip_local_port_range

net.ipv4.ip_local_port_range = 32768 61000

[root@getoraclelnx01 ~]#

clip_image022 For

some suggestions on setting kernel parameters, you can refer to the following materials:




Finally, back up /etc/sysctl.conf before modifying View Code , just in case.

[root@getoraclelnx01 ~]# cp /etc/sysctl.conf /etc/sysctl.conf.bak

[root@getoraclelnx01 ~]# vi /etc/sysctl.conf Add or modify the following parameters

kernel.shmmax = 68719476736

kernel.shmall = 6029312

kernel.shmmni=4096

kernel.sem=250 32000 100 128

net.core.rmem_default=262144

net.core.rmem_max=

4194304 net.core.wmem_default=262144

net.core.wmem_max=262144

net.ipv4.ip_local_port_range=9000

fs.file-max=65536

fs.aio-max-nr=1048576

kernel.shmall =physical RAM size / pagesize (getconf PAGESIZE) -- If the defaults are greater then leave it.

kernel.shmall = memory size/4k=23G*1024*1024/4k = 6029312

kernel.shmmax = 20*1024*1024=20971520 and the default is 68719476736, then use the default value, save it after

modification , and then run the sysctl -p command Make it effective

clip_image024



4.5 Set user limit Add the following configuration

in /etc/security/limits.conf.

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

oracle soft stack 10240

oracle hard stack 10240

Add the following line to the "/etc/pam.d/login" file,

if it does not already exist.

session required /lib/security/pam_limits.so

session required pam_limits.so

Add the following to

/etc/profile if Oracle user will use the bash shell.

if [ $USER = "oracle" ]; then

ulimit -u 16384

ulimit -n 65536

fi

4.6 配置环境变量

首先切换到oracle账户 ,编辑修改主目录下 .bash_profile

clip_image026

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1; export ORACLE_HOME

ORACLE_SID=epps; export ORACLE_SID

ORACLE_TERM=xterm; export ORACLE_TERM

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/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

if [ $USER = "oracle" ]; then

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

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

fi

make the configuration take effect

[oracle@getoraclelnx01 ~]$ source .bash_profile

[oracle@getoraclelnx01 ~]$

Unzip the installation image file

[oracle@getoraclelnx01 tmp]$ unzip V38500-01_1of2.zip [ oracle @ getoraclelnx01

tmp]$ unzip V38500-01_2of2.zip

Installation steps screenshot clip_image028 clip_image030 clip_image032 clip_image034 clip_image036 clip_image038 clip_image040 clip_image042 clip_image044 clip_image046





















At this step, it cannot continue because the oracle account cannot create the oraInventory directory, so the user must first be created and authorized

[root@getoraclelnx01 ~]# mkdir -p /u01/app/oraInventory

[root@getoraclelnx01 ~]# chown -R oracle:oinstall /u01/app/oraInventory [ root

@getoraclelnx01 ~]# chmod -R 775 /u01/app/oraInventory clip_image048 clip_image050 clip_image052 clip_image054 clip_image056 clip_image058 clip_image060 clip_image062 clip_image064 clip_image066 When verifying

parameters , fs.file - max is set to 65536, but ORACLE recommends 68157744, net.core.wmem_max size is 262144, oracle recommends 1048576, modify the kernel parameters, and run sysctl -p to make it take effect. Then re-authenticate through [root@getoraclelnx01 ~]# sysctl -p net.ipv4.ip_forward = 0 net.ipv4.conf.default.rp_filter = 2



























net.ipv4.conf.default.accept_source_route = 0

kernel.sysrq = 0

kernel.core_uses_pid = 1

net.ipv4.tcp_syncookies = 1

kernel.msgmnb = 65536

kernel.msgmax = 65536

kernel.shmmax = 68719476736

kernel.shmall = 6029312

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

net.core.rmem_default = 262144

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

net.ipv4.ip_local_port_range = 9000 65500

fs.file-max = 6815744

fs.aio-max-nr = 1048576

[root@getoraclelnx01 ~]#

clip_image068

clip_image070

clip_image072



The running process will prompt you to execute two scripts with the root account. You can take down the script files and execute them under the root account. clip_image078 clip_image080 [Reference]: Database Quick Installation Guide for Linux x86-64 e17718.pdf



http://blog.csdn.net/lnwf5188588/article/details/8779001

Use Yunqi Community APP, comfortable~








Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326259796&siteId=291194637