Oracle linux5下安装Oracle 11g

1.实验环境

[root@ocm2 ~]# cat /proc/version 
Linux version 2.6.18-164.el5 (mockbuild@ca-build10.us.oracle.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Thu Sep 3 02:16:47 EDT 2009

2.检查前提条件

2.1 检查硬件需求

[root@ocm2 Server]# grep MemTotal /proc/meminfo #查看RAM大小  Minimum: 1 GB of RAM  Recommended: 2 GB of RAM or more
MemTotal:      2075432 kB 
[root@ocm2 Server]# grep SwapTotal /proc/meminfo #查看swap space
SwapTotal:     4128760 kB
RAMSwap Space
Between 1 GB and 2 GB1.5 times the size of the RAM
Between 2 GB and 16 GBEqual to the size of the RAM
More than 16 GB16 GB
[root@ocm2 Server]# uname -m  #查看当前系统版本
i686
[root@ocm2 Server]# df -h /tmp/ #查看是否有足够空间安装软件,至少4.4G空间
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       45G  4.8G   38G  12% /

2.2 检查软件需求

2.2.1 检查必须的包

Asianux Server 3, Oracle Linux 5, and Red Hat Enterprise Linux 5 The following packages (or later versions) must be installed:
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
elfutils-libelf-devel-static-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-common-2.5
glibc-devel-2.5
glibc-headers-2.5
kernel-headers-2.6.18
ksh-20060214
libaio-0.3.106
libaio-devel-0.3.106 
libgcc-4.1.2
libgomp-4.1.2
libstdc++-4.1.2 
libstdc++-devel-4.1.2
make-3.81
sysstat-7.0.2

[root@ocm2 Server]# rpm -qa | grep binutils
binutils-2.17.50.0.6-12.el5
[root@ocm2 Server]# rpm -qa | grep compat-libstdc
compat-libstdc++-296-2.96-138
compat-libstdc++-33-3.2.3-61
[root@ocm2 Server]# rpm -qa | grep elfutils-libelf
elfutils-libelf-devel-static-0.137-3.el5
elfutils-libelf-0.137-3.el5
elfutils-libelf-devel-0.137-3.el5
[root@ocm2 Server]# rpm -qa | grep gcc-
gcc-c++-4.1.2-46.el5
compat-gcc-34-3.4.6-4
libgcc-4.1.2-46.el5
gcc-4.1.2-46.el5
compat-gcc-34-c++-3.4.6-4
gcc-gfortran-4.1.2-46.el5
compat-libgcc-296-2.96-138
[root@ocm2 Server]# rpm -qa | grep glibc
glibc-common-2.5-42
glibc-devel-2.5-42
glibc-headers-2.5-42
glibc-2.5-42
[root@ocm2 Server]# rpm -qa | grep kernel-headers
kernel-headers-2.6.18-164.el5
[root@ocm2 Server]# rpm -qa | grep ksh-
ksh-20080202-14.el5
[root@ocm2 Server]# rpm -qa | grep libaio-
libaio-0.3.106-3.2
libaio-devel-0.3.106-3.2
[root@ocm2 Server]# rpm -qa | grep libgcc-
libgcc-4.1.2-46.el5
compat-libgcc-296-2.96-138
[root@ocm2 Server]# rpm -qa | grep libgomp-
libgomp-4.4.0-6.el5
[root@ocm2 Server]# rpm -qa | grep libstdc++
compat-libstdc++-296-2.96-138
compat-libstdc++-33-3.2.3-61
libstdc++-4.1.2-46.el5
libstdc++-devel-4.1.2-46.el5
[root@ocm2 Server]# rpm -qa | grep make
imake-1.0.2-3
automake14-1.4p6-13
automake17-1.7.9-7
make-3.81-3.el5
automake15-1.5-16
automake-1.9.6-2.1
automake16-1.6.3-8
[root@ocm2 Server]# rpm -qa | grep sysstat
sysstat-7.0.2-3.el5

2.2.2 检查内核参数

[root@ocm2 Server]# vi /etc/sysctl.conf
[root@ocm2 Server]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 1
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 8192
kernel.shmmax = 4294967295
kernel.shmall = 1073741824
fs.file-max = 327679
kernel.msgmni = 2878
kernel.sem = 250 32000 100 142
kernel.shmmni = 4096
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 262144
fs.aio-max-nr = 3145728
net.ipv4.ip_local_port_range = 1024 65000
fs.aio-max-nr = 1048576  --加入此行以下的内容
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
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

2.2.3 创建组和用户

/usr/sbin/groupadd oinstall
/usr/sbin/groupadd -g 502 dba
/usr/sbin/groupadd -g 503 oper
/usr/sbin/useradd -u 502 -g oinstall -G dba,asmdba oracle
passwd oracle

2.2.4 检查资源限制

Resource Shell Limit Resource Soft Limit Hard Limit

Open file descriptors

nofile

at least 1024

at least 65536

Number of processes available to a single user

nproc

at least 2047

at least 16384

Size of the stack segment of the process

stack

at least 10240 KB

at least 10240 KB, and at most 32768 KB

[root@ocm2 Server]# ulimit -Sn  #如果不足则去/etc/security/limits.conf修改
1024  
[root@ocm2 Server]# ulimit -Hn
1024
[root@ocm2 Server]# ulimit -Su
32768
[root@ocm2 Server]# ulimit -Hu
32768
[root@ocm2 Server]# ulimit -Ss
10240
[root@ocm2 Server]# ulimit -Hs
unlimited

2.2.5 创建目录

[root@ocm2 Server]# mkdir -p /u01/app/oracle
[root@ocm2 Server]# mkdir -p /u01/app/oraInventory
[root@ocm2 Server]# mkdir -p /u01/app/oracle/product/11.2.0/dbhome_1
[root@ocm2 Server]# mkdir -p /u01/app/oracle/oradata
[root@ocm2 Server]# mkdir -p /u01/app/oracle/fast_recovery_area
[root@ocm2 Server]# chown -R oracle:oinstall /u01/app/oracle/
[root@ocm2 Server]# chmod -R 775 /u01/app/oracle/

3.开始执行安装

按步骤一步步执行,最后执行脚本

[root@ocm2 ~]# /u01/app/oraInventory/orainstRoot.sh 
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.

Changing groupname of /u01/app/oraInventory to oinstall.
The execution of the script is complete.
[root@ocm2 ~]# /u01/app/oracle/product/11.2.0/dbhome_1/root.sh 
Performing root user operation for Oracle 11g 

The following environment variables are set as:
    ORACLE_OWNER= oracle
    ORACLE_HOME=  /u01/app/oracle/product/11.2.0/dbhome_1

Enter the full pathname of the local bin directory: [/usr/local/bin]: 
   Copying dbhome to /usr/local/bin ...
   Copying oraenv to /usr/local/bin ...
   Copying coraenv to /usr/local/bin ...


Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Finished product-specific root actions.




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值