RELATEED CONSULTING
相关咨询
选择下列产品马上在线沟通
服务时间:8:30-17:00
你可能遇到了下面的问题
关闭右侧工具栏

新闻中心

这里有您想知道的互联网营销解决方案
基于RHEL6.5安装Oracle11g详细教程(4)——安装Oracle前的准备

4  安装Oracle前的准备

4.1 基本配置
4.1.1 关闭防火墙

[root@oracle ~]# service iptables stop

专注于为中小企业提供网站建设、网站制作服务,电脑端+手机端+微信端的三站合一,更高效的管理,为中小企业郾城免费做网站提供优质的服务。我们立足成都,凝聚了一批互联网行业人才,有力地推动了上1000+企业的稳健成长,帮助中小企业通过网站建设实现规模扩充和转变。

iptables: Setting chains to policy ACCEPT: filter [ OK ]

iptables: Flushing firewall rules: [ OK ]

iptables: Unloading modules: [ OK ]

关闭iptables开机自启动功能

[root@oracle ~]# chkconfig iptables off

[root@oracle ~]# setup

1)如下图所示,选择Firewall configuration,敲击回车键

基于RHEL 6.5安装Oracle 11g详细教程(4)——安装Oracle前的准备

2)如下图所示,取消选中Enabled,选择OK,敲击回车键

基于RHEL 6.5安装Oracle 11g详细教程(4)——安装Oracle前的准备

3)如下图所示,选择Yes,敲击回车键

基于RHEL 6.5安装Oracle 11g详细教程(4)——安装Oracle前的准备

4)如下图所示,选择Quit,敲击回车键

基于RHEL 6.5安装Oracle 11g详细教程(4)——安装Oracle前的准备

[root@oracle ~]# service iptables status

iptables: Firewall is not running.

4.1.2 关闭selinux

修改/etc/selinux/config文件如下内容:

将SELINUX=enforcing更改成SELINUX=disabled。

[root@oracle ~]# vi /etc/selinux/config

# This file controls the state of SELinux on the system.

# SELINUX= can take one of these three values:

# enforcing - SELinux security policy is enforced.

# permissive - SELinux prints warnings instead of enforcing.

# disabled - No SELinux policy is loaded.

SELINUX=disabled

# SELINUXTYPE= can take one of these two values:

# targeted - Targeted processes are protected,

# mls - Multi Level Security protection.

SELINUXTYPE=targeted

[root@oracle ~]# setenforce 0

[root@oracle ~]# getenforce

Permissive

[root@oracle ~]# /usr/sbin/sestatus -v

SELinux status: enabled

SELinuxfs mount: /selinux

Current mode: permissive

Mode from config file: disabled

Policy version: 24

Policy from config file: targeted

Process contexts:

Current context: unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

Init context: system_u:system_r:init_t:s0

/sbin/mingetty system_u:system_r:getty_t:s0

/usr/sbin/sshd system_u:system_r:sshd_t:s0-s0:c0.c1023

File contexts:

Controlling term: unconfined_u:object_r:user_devpts_t:s0

/etc/passwd system_u:object_r:etc_t:s0

/etc/shadow system_u:object_r:shadow_t:s0

/bin/bash system_u:object_r:shell_exec_t:s0

/bin/login system_u:object_r:login_exec_t:s0

/bin/sh system_u:object_r:bin_t:s0 -> system_u:object_r:shell_exec_t:s0

/sbin/agetty system_u:object_r:getty_exec_t:s0

/sbin/init system_u:object_r:init_exec_t:s0

/sbin/mingetty system_u:object_r:getty_exec_t:s0

/usr/sbin/sshd system_u:object_r:sshd_exec_t:s0

[root@oracle ~]# reboot

Broadcast message from root@oracle.kely.com

(/dev/pts/0) at 20:30 ...

The system is going down for reboot NOW!

[root@oracle ~]# getenforce

Disabled

[root@oracle ~]# /usr/sbin/sestatus -v

SELinux status: disabled

4.1.3 配置hosts文件

在/etc/hosts文件的最后一行添加如下内容:

192.168.0.18 oracle oracle.kely.com

[root@oracle ~]# vi /etc/hosts

192.168.0.18 oracle oracle.kely.com

[root@oracle ~]# ping oracle

PING oracle (192.168.0.18) 56(84) bytes of data.

64 bytes from oracle (192.168.0.18): icmp_seq=1 ttl=64 time=0.035 ms

64 bytes from oracle (192.168.0.18): icmp_seq=2 ttl=64 time=0.020 ms

^C

--- oracle ping statistics ---

5 packets transmitted, 5 received, 0% packet loss, time 4587ms

rtt min/avg/max/mdev = 0.020/0.034/0.039/0.008 ms

[root@oracle ~]# ping oracle.kely.com

PING oracle (192.168.0.18) 56(84) bytes of data.

64 bytes from oracle (192.168.0.18): icmp_seq=1 ttl=64 time=0.011 ms

64 bytes from oracle (192.168.0.18): icmp_seq=2 ttl=64 time=0.017 ms

^C

--- oracle ping statistics ---

2 packets transmitted, 2 received, 0% packet loss, time 1428ms

rtt min/avg/max/mdev = 0.011/0.014/0.017/0.003 ms

4.2 创建Oracle用户群组

[root@oracle ~]# groupadd oinstall

[root@oracle ~]# groupadd dba

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

将oracle用户的密码更改为1qaz@WSX。

[root@oracle ~]# passwd oracle

Changing password for user oracle.

New password:

BAD PASSWORD: it is based on a dictionary word

Retype new password:

passwd: all authentication tokens updated successfully.

[root@oracle ~]# id oracle

uid=500(oracle) gid=501(oinstall) groups=501(oinstall),502(dba)

4.3 创建Logic Volume

1)如下图所示,依次选择虚拟机 -- 编辑设置

基于RHEL 6.5安装Oracle 11g详细教程(4)——安装Oracle前的准备

2)如下图所示,单击添加

基于RHEL 6.5安装Oracle 11g详细教程(4)——安装Oracle前的准备

3)如下图所示,选择硬盘,单击下一步

基于RHEL 6.5安装Oracle 11g详细教程(4)——安装Oracle前的准备

4)如下图所示,缺省选择,单击下一步

基于RHEL 6.5安装Oracle 11g详细教程(4)——安装Oracle前的准备

5)如下图所示,修改容量(50G)磁盘置备(Thin Provision),单击下一步

基于RHEL 6.5安装Oracle 11g详细教程(4)——安装Oracle前的准备

6)如下图所示,缺省选择,单击下一步

基于RHEL 6.5安装Oracle 11g详细教程(4)——安装Oracle前的准备

7)如下图所示,单击完成

基于RHEL 6.5安装Oracle 11g详细教程(4)——安装Oracle前的准备

8)如下图所示,可以看到新添加的硬盘,单击确定

基于RHEL 6.5安装Oracle 11g详细教程(4)——安装Oracle前的准备

9)如下图所示,在硬件设备中出现了硬盘2,说明新建的硬盘已经生效。

基于RHEL 6.5安装Oracle 11g详细教程(4)——安装Oracle前的准备

查看新添加硬盘是否被系统正确加载。

[root@oracle ~]# fdisk -l

Disk /dev/sda: 21.5 GB, 21474836480 bytes

64 heads, 32 sectors/track, 20480 cylinders

Units = cylinders of 2048 * 512 = 1048576 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00043aa4

Device Boot Start End Blocks Id System

/dev/sda1 * 2 201 204800 83 Linux

/dev/sda2 202 20480 20765696 8e Linux LVM

Disk /dev/mapper/VolGroup-lv_root: 14.8 GB, 14818476032 bytes

255 heads, 63 sectors/track, 1801 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

Disk /dev/mapper/VolGroup-lv_swap: 6442 MB, 6442450944 bytes

255 heads, 63 sectors/track, 783 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

Disk /dev/sdb: 53.7 GB, 53687091200 bytes

64 heads, 32 sectors/track, 51200 cylinders

Units = cylinders of 2048 * 512 = 1048576 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x00000000

将/dev/sdb创建成LVM设备。

[root@oracle ~]# fdisk /dev/sdb

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel with disk identifier 0x236668f6.

Changes will remain in memory only, until you decide to write them.

After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

WARNING: DOS-compatible mode is deprecated. It's strongly recommended to

switch off the mode (command 'c') and change display units to

sectors (command 'u').

Command (m for help): n

Command action

e extended

p primary partition (1-4)

p

Partition number (1-4): 1

First cylinder (1-51200, default 1):

Using default value 1

Last cylinder, +cylinders or +size{K,M,G} (1-51200, default 51200):

Using default value 51200

Command (m for help): t

Selected partition 1

Hex code (type L to list codes): 8e

Changed system type of partition 1 to 8e (Linux LVM)

Command (m for help): p

Disk /dev/sdb: 53.7 GB, 53687091200 bytes

64 heads, 32 sectors/track, 51200 cylinders

Units = cylinders of 2048 * 512 = 1048576 bytes

Sector size (logical/physical): 512 bytes / 512 bytes

I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk identifier: 0x236668f6

Device Boot Start End Blocks Id System

/dev/sdb1 1 51200 52428784 8e Linux LVM

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

Syncing disks.

使分区表即可生效。

[root@oracle ~]# partprobe

将/dev/sdb1创建成Physical Volume。

[root@oracle ~]# pvcreate /dev/sdb1

Physical volume "/dev/sdb1" successfully created

查看系统Volume Group信息。

[root@oracle ~]# vgdisplay

--- Volume group ---

VG Name VolGroup

System ID

Format lvm2

Metadata Areas 1

Metadata Sequence No 3

VG Access read/write

VG Status resizable

MAX LV 0

Cur LV 2

Open LV 2

Max PV 0

Cur PV 1

Act PV 1

VG Size 19.80 GiB

PE Size 4.00 MiB

Total PE 5069

Alloc PE / Size 5069 / 19.80 GiB

Free PE / Size 0 / 0

VG UUID rHlSfU-3A4e-pO0W-winf-O7qQ-NUyZ-bQkPcZ

将/dev/sdb1添加到VolGroup中。

[root@oracle ~]# vgextend VolGroup /dev/sdb1

Volume group "VolGroup" successfully extended

[root@oracle ~]# vgdisplay

--- Volume group ---

VG Name VolGroup

System ID

Format lvm2

Metadata Areas 2

Metadata Sequence No 4

VG Access read/write

VG Status resizable

MAX LV 0

Cur LV 2

Open LV 2

Max PV 0

Cur PV 2

Act PV 2

VG Size 69.80 GiB

PE Size 4.00 MiB

Total PE 17868

Alloc PE / Size 5069 / 19.80 GiB

Free PE / Size 12799 / 50.00 GiB

VG UUID rHlSfU-3A4e-pO0W-winf-O7qQ-NUyZ-bQkPcZ

创建大小为20G的lv_u01,并归属于VolGroup。

[root@oracle ~]# lvcreate -L 20G -n lv_u01 VolGroup

Logical volume "lv_u01" created

将lv_u01格式化为ext4文件系统。

[root@oracle ~]# mkfs -t ext4 /dev/VolGroup/lv_u01

mke2fs 1.41.12 (17-May-2010)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

Stride=0 blocks, Stripe blocks

1310720 inodes, 5242880 blocks

262144 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=4294967296

160 block groups

32768 blocks per group, 32768 fragments per group

8192 inodes per group

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,

4096000

Writing inode tables: done

Creating journal (32768 blocks): done

Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 36 mounts or

180 days, whichever comes first. Use tune2fs -c or -i to override.

[root@oracle ~]# mkdir /u01

[root@oracle ~]# mount /dev/VolGroup/lv_u01 /u01/

[root@oracle ~]# df -h

Filesystem Size Used Avail Use% Mounted on

/dev/mapper/VolGroup-lv_root 14G 3.0G 10G 24% /

tmpfs 2.0G 72K 2.0G 1% /dev/shm

/dev/sda1 194M 35M 150M 19% /boot

/dev/mapper/VolGroup-lv_u01 20G 172M 19G 1% /u01

[root@oracle ~]# vi /etc/fstab

#

# /etc/fstab

# Created by anaconda on Wed May 14 08:05:01 2014

#

# Accessible filesystems, by reference, are maintained under '/dev/disk'

# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info

#

/dev/mapper/VolGroup-lv_root / ext4 defaults 1 1

UUID=a62aef67-7dbb-4d8b-9d9a-9e035806fe05 /boot ext4 defaults 1 2

/dev/mapper/VolGroup-lv_swap swap swap defaults 0 0

tmpfs /dev/shm tmpfs defaults 0 0

devpts /dev/pts devpts gid=5,mode=620 0 0

sysfs /sys sysfs defaults 0 0

proc /proc proc defaults 0 0

/dev/mapper/VolGroup-lv_u01 /u01 ext4 defaults 0 0

[root@oracle ~]# lvcreate -L 15G -n lv_temp VolGroup

Logical volume "lv_temp" created

[root@oracle ~]# mkfs -t ext4 /dev/VolGroup/lv_temp

mke2fs 1.41.12 (17-May-2010)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

Stride=0 blocks, Stripe blocks

983040 inodes, 3932160 blocks

196608 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=4026531840

120 block groups

32768 blocks per group, 32768 fragments per group

8192 inodes per group

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208

Writing inode tables: done

Creating journal (32768 blocks): done

Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 24 mounts or

180 days, whichever comes first. Use tune2fs -c or -i to override.

[root@oracle ~]# mkdir /temp

[root@oracle ~]# mount /dev/VolGroup/lv_temp /temp/

[root@oracle ~]# df -h

Filesystem Size Used Avail Use% Mounted on

/dev/mapper/VolGroup-lv_root 14G 3.0G 10G 24% /

tmpfs 2.0G 72K 2.0G 1% /dev/shm

/dev/sda1 194M 35M 150M 19% /boot

/dev/mapper/VolGroup-lv_u01 20G 172M 19G 1% /u01

/dev/mapper/VolGroup-lv_temp 15G 166M 14G 2% /temp

[root@oracle ~]# vi /etc/fstab

#

# /etc/fstab

# Created by anaconda on Wed May 14 08:05:01 2014

#

# Accessible filesystems, by reference, are maintained under '/dev/disk'

# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info

#

/dev/mapper/VolGroup-lv_root / ext4 defaults 1 1

UUID=a62aef67-7dbb-4d8b-9d9a-9e035806fe05 /boot ext4 defaults 1 2

/dev/mapper/VolGroup-lv_swap swap swap defaults 0 0

tmpfs /dev/shm tmpfs defaults 0 0

devpts /dev/pts devpts gid=5,mode=620 0 0

sysfs /sys sysfs defaults 0 0

proc /proc proc defaults 0 0

/dev/mapper/VolGroup-lv_u01 /u01 ext4 defaults 0 0

/dev/mapper/VolGroup-lv_temp /temp ext4 defaults 0 0

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

[root@oracle ~]# chmod -R 775 /u01/

[root@oracle ~]# ls -l / | grep u01

drwxrwxr-x 3 oracle oinstall 4096 May 14 22:19 u01

[root@oracle ~]# chown -R oracle:oinstall /temp/

[root@oracle ~]# chmod -R 775 /temp/

[root@oracle ~]# ls -l / | grep temp

drwxrwxr-x 4 oracle oinstall 4096 May 14 21:35 temp

4.4 安装必须的RPM

备注:

The following or later version of packages for Oracle Linux 6, and Red Hat

Enterprise Linux 6 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

pdksh

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)

pdksh-5.2.14-37.el5_8.1.x86_64

On Oracle Linux 6 and Red Hat Enterprise Linux 6:

unixODBC-2.2.14-11.el6 (x86_64)or later

unixODBC-2.2.14-11.el6.i686or later

unixODBC-devel-2.2.14-11.el6 (x86_64)or later

unixODBC-devel-2.2.14-11.el6.i686or later

4.4.1 配置本地YUM源

[root@oracle ~]# mkdir /temp/yum

[root@oracle ~]# mount /dev/cdrom /mnt/

mount: block device /dev/sr0 is write-protected, mounting read-only

[root@oracle ~]# ls /mnt/

EFI Packages RELEASE-NOTES-pa-IN.html

EULA README RELEASE-NOTES-pt-BR.html

EULA_de RELEASE-NOTES-as-IN.html RELEASE-NOTES-ru-RU.html

EULA_en RELEASE-NOTES-bn-IN.html RELEASE-NOTES-si-LK.html

EULA_es RELEASE-NOTES-de-DE.html RELEASE-NOTES-ta-IN.html

EULA_fr RELEASE-NOTES-en-US.html RELEASE-NOTES-te-IN.html

EULA_it RELEASE-NOTES-es-ES.html RELEASE-NOTES-zh-CN.html

EULA_ja RELEASE-NOTES-fr-FR.html RELEASE-NOTES-zh-TW.html

EULA_ko RELEASE-NOTES-gu-IN.html repodata

EULA_pt RELEASE-NOTES-hi-IN.html ResilientStorage

EULA_zh RELEASE-NOTES-it-IT.html RPM-GPG-KEY-redhat-beta

GPL RELEASE-NOTES-ja-JP.html RPM-GPG-KEY-redhat-release

HighAvailability RELEASE-NOTES-kn-IN.html ScalableFileSystem

images RELEASE-NOTES-ko-KR.html Server

isolinux RELEASE-NOTES-ml-IN.html TRANS.TBL

LoadBalancer RELEASE-NOTES-mr-IN.html

media.repo RELEASE-NOTES-or-IN.html

[root@oracle ~]# cp -rfv /mnt/* /temp/yum/

[root@oracle ~]# ls /temp/yum/

EFI Packages RELEASE-NOTES-pa-IN.html

EULA README RELEASE-NOTES-pt-BR.html

EULA_de RELEASE-NOTES-as-IN.html RELEASE-NOTES-ru-RU.html

EULA_en RELEASE-NOTES-bn-IN.html RELEASE-NOTES-si-LK.html

EULA_es RELEASE-NOTES-de-DE.html RELEASE-NOTES-ta-IN.html

EULA_fr RELEASE-NOTES-en-US.html RELEASE-NOTES-te-IN.html

EULA_it RELEASE-NOTES-es-ES.html RELEASE-NOTES-zh-CN.html

EULA_ja RELEASE-NOTES-fr-FR.html RELEASE-NOTES-zh-TW.html

EULA_ko RELEASE-NOTES-gu-IN.html repodata

EULA_pt RELEASE-NOTES-hi-IN.html ResilientStorage

EULA_zh RELEASE-NOTES-it-IT.html RPM-GPG-KEY-redhat-beta

GPL RELEASE-NOTES-ja-JP.html RPM-GPG-KEY-redhat-release

HighAvailability RELEASE-NOTES-kn-IN.html ScalableFileSystem

images RELEASE-NOTES-ko-KR.html Server

isolinux RELEASE-NOTES-ml-IN.html TRANS.TBL

LoadBalancer RELEASE-NOTES-mr-IN.html

media.repo RELEASE-NOTES-or-IN.html

[root@oracle ~]# cp /etc/yum.repos.d/rhel-source.repo /etc/yum.repos.d/local-source.repo

[root@oracle ~]# vi /etc/yum.repos.d/local-source.repo

[local-source]

name=Local-Source

baseurl=file:///temp/yum/Server

enabled=1

gpgcheck=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[root@oracle ~]# yum list

[root@oracle ~]# umount /dev/cdrom

[root@oracle ~]# df -h

Filesystem Size Used Avail Use% Mounted on

/dev/mapper/VolGroup-lv_root 14G 3.1G 9.9G 24% /

tmpfs 2.0G 80K 2.0G 1% /dev/shm

/dev/sda1 194M 35M 150M 19% /boot

/dev/mapper/VolGroup-lv_u01 20G 172M 19G 1% /u01

/dev/mapper/VolGroup-lv_temp 15G 3.8G 11G 27% /temp

/dev/sr0 3.6G 3.6G 0 100% /media/RHEL_6.5 x86_64 Disc 1

[root@oracle ~]# umount /dev/sr0

4.4.2 检查并安装RPM包

[root@oracle ~]# rpm -qa | grep binutils

binutils-2.20.51.0.2-5.36.el6.x86_64

[root@oracle ~]# rpm -qa |grepcompat-libcap1

[root@oracle ~]# yum install compat-libcap1-1.10-1.x86_64 -y

[root@oracle ~]# rpm -qa | grep compat-libstdc++

[root@oracle ~]# yum install compat-libstdc++-33-3.2.3-69.el6.i686 -y

[root@oracle ~]# yum install compat-libstdc++-33-3.2.3-69.el6.x86_64 -y

[root@oracle ~]# rpm -qa | grep gcc

libgcc-4.4.7-4.el6.x86_64

[root@oracle ~]# yum install gcc-4.4.7-4.el6.x86_64 -y

[root@oracle ~]# yum install gcc-c++-4.4.7-4.el6.x86_64 -y

[root@oracle ~]# rpm -qa | grep glibc

glibc-devel-2.12-1.132.el6.x86_64

glibc-2.12-1.132.el6.x86_64

glibc-common-2.12-1.132.el6.x86_64

glibc-headers-2.12-1.132.el6.x86_64

glibc-2.12-1.132.el6.i686

[root@oracle ~]# yum install glibc-devel-2.12-1.132.el6.i686 -y

[root@oracle ~]# rpm -qa | grep ksh

[root@oracle ~]# rpm -qa | grep libgcc

libgcc-4.4.7-4.el6.x86_64

libgcc-4.4.7-4.el6.i686

[root@oracle ~]# rpm -qa | grep libstdc++

compat-libstdc++-33-3.2.3-69.el6.i686

libstdc++-4.4.7-4.el6.x86_64

compat-libstdc++-33-3.2.3-69.el6.x86_64

libstdc++-devel-4.4.7-4.el6.x86_64

[root@oracle ~]# yum install libstdc++-4.4.7-4.el6.i686 -y

[root@oracle ~]# yum install libstdc++-devel-4.4.7-4.el6.i686 -y

[root@oracle ~]# rpm -qa | grep libaio

libaio-0.3.107-10.el6.x86_64

[root@oracle ~]# yum install libaio-0.3.107-10.el6.i686 -y

[root@oracle ~]# yum install libaio-devel-0.3.107-10.el6.i686 -y

[root@oracle ~]# yum install libaio-devel-0.3.107-10.el6.x86_64 -y

[root@oracle ~]# rpm -qa | grep make

make-3.81-20.el6.x86_64

[root@oracle ~]# rpm -qa | grep sysstat

sysstat-9.0.4-22.el6.x86_64

[root@oracle ~]# rpm -qa | grep unixODBC

[root@oracle ~]# yum install unixODBC-2.2.14-12.el6_3.i686 -y

[root@oracle ~]# yum install unixODBC-2.2.14-12.el6_3.x86_64 -y

[root@oracle ~]# yum install unixODBC-devel-2.2.14-12.el6_3.i686 -y

[root@oracle ~]# yum install unixODBC-devel-2.2.14-12.el6_3.x86_64 -y

[root@oracle ~]# rpm -qa | grep pdksh

[root@oracle ~]# cd /temp/

[root@oracle temp]# ls

lost+found pdksh-5.2.14-37.el5_8.1.x86_64.rpm yum

[root@oracle temp]# rpm -ivh pdksh-5.2.14-37.el5_8.1.x86_64.rpm

warning: pdksh-5.2.14-37.el5_8.1.x86_64.rpm: Header V3 DSA/SHA1 Signature, key ID e8562897: NOKEY

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

1:pdksh ########################################### [100%]

4.5 配置内核参数

备注:

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmall = 2097152

kernel.shmmax = 536870912

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

[root@oracle ~]# /sbin/sysctl -a | grep mem

vm.overcommit_memory = 0

vm.nr_hugepages_mempolicy = 0

vm.lowmem_reserve_ratio = 256 256 32

vm.memory_failure_early_kill = 0

vm.memory_failure_recovery = 1

net.core.wmem_max = 124928

net.core.rmem_max = 124928

net.core.wmem_default = 124928

net.core.rmem_default = 124928

net.core.optmem_max = 20480

net.ipv4.igmp_max_memberships = 20

net.ipv4.tcp_mem = 378336 504448 756672

net.ipv4.tcp_wmem = 4096 16384 4194304

net.ipv4.tcp_rmem = 4096 87380 4194304

net.ipv4.udp_mem = 378336 504448 756672

net.ipv4.udp_rmem_min = 4096

net.ipv4.udp_wmem_min = 4096

[root@oracle ~]# /sbin/sysctl -a | grep sem

kernel.sem = 250 32000 32 128

[root@oracle ~]# /sbin/sysctl -a | grep shm

kernel.shmmax = 68719476736

kernel.shmall = 4294967296

kernel.shmmni = 4096

kernel.shm_rmid_forced = 0

vm.hugetlb_shm_group = 0

[root@oracle ~]# /sbin/sysctl -a | grep file-max

fs.file-max = 400512

[root@oracle ~]# /sbin/sysctl -a | grep ip_local_port_range

net.ipv4.ip_local_port_range = 32768 61000

[root@oracle ~]# /sbin/sysctl -a | grep rmem_default

net.core.rmem_default = 124928

[root@oracle ~]# /sbin/sysctl -a | grep rmem_max

net.core.rmem_max = 124928

[root@oracle ~]# /sbin/sysctl -a | grep wmem_default

net.core.wmem_default = 124928

[root@oracle ~]# /sbin/sysctl -a | grep wmem_max

net.core.wmem_max = 124928

在/etc/sysctl.conf文件的最后添加如下内容:

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmall = 2097152

kernel.shmmax = 2147483648

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

[root@oracle ~]# vi /etc/sysctl.conf

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmall = 2097152

kernel.shmmax = 2147483648

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

[root@oracle ~]# sysctl -p

net.ipv4.ip_forward = 0

net.ipv4.conf.default.rp_filter = 1

net.ipv4.conf.default.accept_source_route = 0

kernel.sysrq = 0

kernel.core_uses_pid = 1

net.ipv4.tcp_syncookies = 1

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

kernel.msgmnb = 65536

kernel.msgmax = 65536

kernel.shmmax = 68719476736

kernel.shmall = 4294967296

fs.aio-max-nr = 1048576

fs.file-max = 6815744

kernel.shmall = 2097152

kernel.shmmax = 2147483648

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

4.6 配置oracle用户

备注:

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 4096

oracle hard nofile 65536

oracle soft stack 10240

在/etc/security/limits.conf文件最后添加如下内容:

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 4096

oracle hard nofile 65536

oracle soft stack 10240

[root@oracle ~]# vi /etc/security/limits.conf

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 4096

oracle hard nofile 65536

oracle soft stack 10240

在/etc/pam.d/login文件最后添加如下内容:

session required /lib/security/pam_limits.so

session required pam_limits.so

[root@oracle ~]# vi /etc/pam.d/login

session required /lib/security/pam_limits.so

session required pam_limits.so

在/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

[root@oracle ~]# vi /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

[root@oracle ~]# source /etc/profile

在/home/oracle/.bash_profile文件最后添加如下内容:

#Oracle Settings

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

ORACLE_HOSTNAME=oracle.kely.com; export ORACLE_HOSTNAME

ORACLE_UNQNAME=orcl; 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=orcl; 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

[root@oracle ~]# vi /home/oracle/.bash_profile

#Oracle Settings

TMP=/tmp; export TMP

TMPDIR=$TMP; export TMPDIR

ORACLE_HOSTNAME=oracle.kely.com; export ORACLE_HOSTNAME

ORACLE_UNQNAME=orcl; 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=orcl; 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

[root@oracle ~]# source /home/oracle/.bash_profile

[root@oracle ~]# su - oracle

[oracle@oracle ~]$ env | grep ORA

ORACLE_UNQNAME=orcl

ORACLE_SID=orcl

ORACLE_BASE=/u01/app/oracle

ORACLE_HOSTNAME=oracle.kely.com

ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1


网站栏目:基于RHEL6.5安装Oracle11g详细教程(4)——安装Oracle前的准备
网站路径:http://lswzjz.com/article/gpsgsp.html