Linux下面oracle环境的搭建

技术小大人 2017-11-23

linux Oracle SQL 数据库 配置 DB Server database vim

标题:Linux下面oracle环境的搭建

主题:

Oracle数据库环境准备


第一部分:安装oracle软件包

1.安装

 VMware Tools


安装vmware-tools工具

步骤1、点击---->虚拟机----->安装Vmware Tools

wKiom1mQaR-yJiXuAAEND3jnwgE257.png-wh_50

步骤2、df -h

[root@server253 ~]# df -h

Filesystem            Size  Used Avail Use% Mounted on

/dev/sda2              20G  8.3G   11G  45% /

/dev/sda1              99M   12M   83M  12% /boot

tmpfs                 1.5G     0  1.5G   0% /dev/shm

/dev/scd0             2.8G  2.8G     0 100% /media/Enterprise Linux dvd 20090908


步骤3、挂在VMwareTools镜像

mount /dev/scd0 /mnt/

df -h

[root@server253 ~]# df -h

Filesystem            Size  Used Avail Use% Mounted on

/dev/sda2              20G  8.3G   11G  45% /

/dev/sda1              99M   12M   83M  12% /boot

tmpfs                 1.5G     0  1.5G   0% /dev/shm

/dev/scd0             2.8G  2.8G     0 100% /media/Enterprise Linux dvd 20090908

/dev/scd0             2.8G  2.8G     0 100% /mnt


步骤4、cp /mnt/VMwareTools… /etc/opt/

cd /opt/

ls


步骤5、解压VMwareTools包

tar -zxvf VMwareTools…

cd vmware-tools-distrib

ls


步骤6、./vmware-install.pl

一路回车

最后reboot一下


2.配置ip地址

  计算机名

  配置主机

  防火墙设置

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


1,配置IP地址

vim /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0

BOOTPROTO=none

HWADDR=00:0C:29:D3:D9:8D

ONBOOT=yes

IPADDR=192.168.1.253

NETMASK=255.255.255.0

 

/etc/init.d/network restart

chkconfig network on

ifconfig eth0

 

2,配置计算机名字

vim /etc/sysconfig/network

NETWORKING=yes

NETWORKING_IPV6=no

HOSTNAME=server253.oracle.com

 

修改临时主机名

hostname server253.oracle.com

 

3,配置主机

vim /etc/hosts

# Do not remove the following line, or    various programs

# that require network functionality    will fail.

127.0.0.1               localhost.localdomain    localhost

::1             localhost6.localdomain6    localhost6

192.168.1.253   server253.oracle.com    server253

 

ping server253.oracle.com

ping server253

 

4,防火墙设置

system-config-securitylevel

wKioL1mQaUTRzwN0AACbFVtqW7A287.png-wh_50

wKiom1mQaVPD6I6EAACfeHFf7s4666.png-wh_50

 

3.配置yum仓   库
  1. 点击虚拟机---->设置----->CD\DVD(SATA)---->使用ISO映像文件(M)---->

设备状态---->勾选上已连接

df -h

mount /dev/scd0 /mnt/

vim /etc/yum.repos.d/server.repo


[base]                                                                   

name=rhel5.4

baseurl=file:///mnt/Server

enabled=1

gpgcheck=0


4.检查软件的   必要性

Checking the Software Requirements

binutils-2.15.92.0.2-13.EL4

compat-db-4.1.25-9   -----

compat-libstdc++-296-2.96-132.7.2

control-center-2.8.0-12

gcc-3.4.3-22.1.EL4

gcc-c++-3.4.3-22.1.EL44

glibc-2.3.4-2.9

glibc-common-2.3.4-2.9

libstdc++-3.4.3-22.1

libstdc++-devel-3.4.3-22.1

make-3.80-5

pdksh-5.2.14-30

sysstat-5.0.5-1

setarch-1.6-1

 

[root@server253 ~]rpm -qa|grep compat-db

[root@server253 ~]# yum -y install  compat-db

 

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

[root@server253 ~]# yum -y install pdksh

 

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

[root@server253 ~]# yum -y install  sysstat

5.检查网络步   骤

1.   ifconfig eth0

eth0      Link encap:Ethernet  HWaddr 00:0C:29:D3:D9:8D 

          inet addr:192.168.1.253  Bcast:192.168.1.255  Mask:255.255.255.0

          inet6 addr:    fe80::20c:29ff:fed3:d98d/64 Scope:Link

          UP BROADCAST RUNNING    MULTICAST  MTU:1500  Metric:1

          RX packets:112 errors:0 dropped:0    overruns:0 frame:0

          TX packets:78 errors:0 dropped:0    overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:14414 (14.0 KiB)  TX bytes:16767 (16.3 KiB)

          Base address:0x2000    Memory:fd5c0000-fd5e0000

  1.       vim /etc/sysconfig/network


  2.      system-config-securitylevel

wKioL1mQaW7T0Nh2AAAsEpUv94Q987.png

wKioL1mQaYjj3bcxAAAzyhvd63A965.png

 

6.配置名称解   析

vim /etc/hosts

# Do not remove the following line, or    various programs

# that require network functionality    will fail.

127.0.0.1               localhost.localdomain    localhost

::1             localhost6.localdomain6    localhost6

192.168.1.253   server253.oracle.com    server253

ping server253.oracle.com

ping server253

7. 创建安装软    件需要账户    名和组













8. 判断nobody    是否存在

Creating Required Operating System Groups  and Users

创建三个用户

[root@server253 ~]# useradd dba

[root@server253 ~]# useradd oinstall

[root@server253 ~]# useradd oper

 

[root@server253 ~]# id oracle

uid=500(oracle) gid=500(oracle)  groups=500(oracle)

 

将用户加入到组

usermod -g oinstall -G  oinstall,dba,oper,oracle oracle

[root@server253 ~]# id oracle

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

8,Verifying that the User nobody Exists 判断nobody是否存在

原因:外部作业必须存在nobody

 

[root@server253 ~]# id nobody

uid=99(nobody) gid=99(nobody)  groups=99(nobody)

9. 内核参数

Configuring Kernel Parameters

vi /etc/sysctl.conf

kernel.shmall = 2097152

kernel.shmmax = 2147483648

kernel.shmmni = 4096

kernel.sem = 250 32000 100 128

fs.file-max = 65536

net.ipv4.ip_local_port_range = 1024    65000

net.core.rmem_default = 1048576

net.core.rmem_max = 1048576

net.core.wmem_default = 262144

net.core.wmem_max = 262144

-shmall :该参数表示系统依次可以使用的共享内存段的总容量(以页为单位)。默认值是2097152,通