您的位置:首页 > 数据库 > Oracle

CentOS 5.x安装Oracle 11g R2

2013-07-17 20:47 429 查看
配置yum源:

#vi /etc/yum.repos.d/yum.repo
[CentOS]
name=CentOS
baseurl=file:///mnt/
gpgcheck=0
enabled=1

# yum clean all


一.硬件要求:

内存 1G

硬盘 5G

Swap 2G

 

二.软件包要求:

compat-libstdc++
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

 

三.安装前的配置:

1).创建oracle用户和oinstall dba用户组
# /usr/sbin/groupadd oinstall //创建用户组
# /usr/sbin/groupadd dba //创建用户组
# /usr/sbin/useradd -m -g oinstall -G dba oracle //创建用户
#id oracle //查看用户oracle的属性


 

2).设置oracle用户的口令
#passwd oracle


 

3).创建oracle用户的安装目录
#mkdir -p /u01/app/oracle
#chown -R oracle:oinstall /u01/app 更改目录的所有者和属组
#chmod -R 755 /u01/app 更改目录的权限


 

4).更改系统的核心参数
# cat >> /etc/sysctl.conf <<EOF
> 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=4194304
> net.core.wmem_default=262144
> net.core.rmem_max=4194304
> net.core.wmem_max=262144
> EOF


 

5).为oracle用户设置可使用的文件和进程数限制
# cat >> /etc/security/limits.conf <<EOF
> oracle soft nproc 2047
> oracle hard nproc 16384
> oracle soft nofile 1024
> oracle hard nofile 65536
> EOF


 

# cat >> /etc/pam.d/login <<EOF
> session required /lib/security/pam_limits.so
> EOF


 

6).更改bash || ksh || cshell 的默认profile文件内容
#cat >> /etc/profile <<EOF
> if [ $USER = "oracle" ]; then
>  if [ $SHELL = "/bin/bash" ];
>  then
> ulimit -p 16384
> ulimit -n 65536
> else
> ulimit -u 16384 -n 65536
> fi
> umask 022
> fi
> EOF


 

7).允许所有客户端连接X服务器
# xhost +


 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: