Chinaunix首页 | 论坛 | 博客
  • 博客访问: 570128
  • 博文数量: 201
  • 博客积分: 7734
  • 博客等级: 少将
  • 技术积分: 1994
  • 用 户 组: 普通用户
  • 注册时间: 2010-04-09 19:18
文章分类

全部博文(201)

文章存档

2011年(28)

2010年(173)

分类: Oracle

2010-06-12 22:33:14

1、软件包要求:
在安装Oracle 11gR2前,需要先安装以下软件包。
查看系统那些包没有安装:
[root@linscora ~]# yum list compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel glibc.i686 glibc-devel glibc-common gcc gcc-c++ libgcc libaio libaio-devel libstdc++ libstdc++-devel unixODBC unixODBC-devel sysstat binutils make
Loaded plugins: rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
Installed Packages
binutils.i386                          2.17.50.0.6-12.el5              installed
elfutils-libelf.i386                   0.137-3.el5                     installed
glibc-common.i386                      2.5-42                          installed
libaio.i386                            0.3.106-3.2                     installed
libgcc.i386                            4.1.2-46.el5                    installed
libstdc++.i386                         4.1.2-46.el5                    installed
make.i386                              1:3.81-3.el5                    installed
Available Packages
compat-libstdc++-33.i386               3.2.3-61                        rh436   
elfutils-libelf-devel.i386             0.137-3.el5                     rh436   
gcc.i386                               4.1.2-46.el5                    rh436   
gcc-c++.i386                           4.1.2-46.el5                    rh436   
glibc.i686                             2.5-42                          rh436   
glibc-devel.i386                       2.5-42                          rh436   
libaio-devel.i386                      0.3.106-3.2                     rh436   
libstdc++-devel.i386                   4.1.2-46.el5                    rh436   
sysstat.i386                           7.0.2-3.el5                     rh436   
unixODBC.i386                          2.2.11-7.1                      rh436   
unixODBC-devel.i386                    2.2.11-7.1                      rh436   

installed 表示已经安装的包,rh436表示没有安装的包。(rh436是我仓库定义的一个名字)
[root@linscora ~]# cat /etc/yum.repos.d/rh436.repo
[rh436] #就是这个定义的
name=rh436
baseurl=
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[rh436-vt]
name=rh436-vt
baseurl=
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[rh436-cluster]
name=rh436-cluster
baseurl=
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[rh436-cluster-storage]
name=rh436-cluster-storage
baseurl=
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[rh436-updates]
name=rh436-updates
baseurl=
enabled=0
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

下面用yum安装这些末安装的包:
yum list compat-libstdc++-33 elfutils-libelf elfutils-libelf-devel glibc glibc-devel glibc-common gcc gcc-c++ libgcc libaio libaio-devel libstdc++ libstdc++-devel unixODBC unixODBC-devel sysstat binutils make

2、安装前的配置:
(1)创建oracle用户和oinstall、dba用户组
[root@linscora ~]# echo $SHELL
/bin/bash
[root@linscora ~]# groupadd oinstall
[root@linscora ~]# groupadd dba
[root@linscora ~]# useradd -m -g oinstall -G dba oracle
[root@linscora ~]# id oracle
uid=500(oracle) gid=500(oinstall) groups=500(oinstall),501(dba)
[root@linscora ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.

(2)创建Oracle的安装目录。
[root@linscora ~]# mkdir -p /u01/app/oracle
[root@linscora ~]# chown -R oracle.oinstall /u
[root@linscora ~]# chown -R oracle.oinstall /u01/app/
[root@linscora ~]# chmod -R 775 /u01/app/
(3)更改系统的核心参数,以满足Oracle 11g的安装最小参数要求。
[root@linscora ~]# cat >> /etc/sysctl.conf <> kernel.shmmni = 4096
> kernel.sem = 250 32000 100 250 250
> fs.file-max = 6815744
> net.ipv4.ip_local_port_range = 9000 65500
> net.core.rmem_default = 4194304
> net.core.wmem_default = 262144
> net.core.rmem_max = 4194304
> net.core.wmem_max = 1048576
>fs.aio-max-nr = 1048576
> EOF
使参数生效:
[root@linscora ~]# sysctl -p
(4)为oracle用户设置可使用的文件和进程数限制。
[root@linscora ~]# cat >> /etc/security/limits.conf <> oracle soft nproc 2047
> oracle hard nproc 16384
> oracle soft nofile 1024
> oracle hard nofile 65536
> EOF
[root@linscora ~]# cat >> /etc/pam.d/login <> session required /lib/security/pam_limits.so
> EOF
(5)更改bash、ksh、及cshell的默认profile文件的内容。
[root@linscora ~]# cat >> /etc/profile <> if [ \$USER = "oracle" ]; then
>   if [ \$SHELL = "/bin/ksh" ];
> then
> ulimit -p 16384
> ulimit -n 65536
> else
> ulimit -u 16384 -n 65536
> fi
> umask 022
> fi
> EOF
[root@linscora ~]# cat >> /etc/csh.login <> if ( \$USER == "oracle") then
> limit maxproc 16384
> limit descriptors 65536
> umask 022
> endif
> EOF
(6)
允许所有客户端连接X服务器。
[root@linscora ~]# xhost +
阅读(757) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~