数据库
首页 > 数据库> > linux 安装Oracle 11g

linux 安装Oracle 11g

作者:互联网

https://blog.csdn.net/bjywxc/article/details/104696121/

安装包

 linux.x64_11gR2_database_1of2.zip
 linux.x64_11gR2_database_2of2.zip 


 

需要的软件包支持:

通过查看Oracle安装文档中列出的Package Requirements可以查看在不同平台上需要的软件包,下面列出Asianux 3, Oracle Enterprise Linux 5.0, and Red Hat Enterprise Linux 5.0的要求,检查

下系统是否安装过这些包,如果没在对应的系统光盘查找对应的rpm包并安装。

检查工作:依次执行:rpm -qa | grep 下面软件包

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
unixODBC-2.2.11
unixODBC-devel-2.2.11


1      安装前准备

  1. Linux操作系统的内核至少为2.6. 16.21。查看操作系统内核版本的命令如下:

uname –r

  1. Linux主机内存必须大于等于1G,交换空间swap的大小为4G(内存为1~2G时,swap为起1.5倍,如果大于2G,swap等于内存大小)。
  2. /tmp的空间需要大于500M,不少于1G。
  3. 系统磁盘空间不能少于6G空间。

 

2      创建用户组和用户

  1. 创建oracle和oinstall组

/usr/sbin/groupadd  dba

/usr/sbin/groupadd oinstall

  1. 创建oracle用户

/useradd –g oinstall –G dba oracle

  1. 为用户oracle设置密码

#passwd oracle

[root@oracle ~]# groupadd dba
[root@oracle ~]# groupadd oinstall
[root@oracle ~]# useradd -g oinstall -G dba oracle
[root@oracle ~]# passwd oracle
Changing password for user oracle..
New password: 
BAD PASSWORD: The password is shorter than 8 characters
Retype new password: 
passwd: all authentication tokens updated successfully.
[root@oracle ~]#

 


 

修改内核参数

root用户:修改 /etc/sysctl.conf 文件,加上如下参数

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 = 1048586

为使上述配置生效而不重启系统,执行如下命令

# /sbin/sysctl -p


修改用户限制

root用户:修改 /etc/security/limits.conf 文件,加上下面的参数

oracle           soft    nproc   2047
oracle           hard    nproc   16384
oracle           soft    nofile  1024
oracle           hard    nofile  65536


修改用户验证选项

root用户下:修改/etc/pam.d/login文件加上如下参数

session    required     pam_limits.so


修改用户配置文件

root用户下:修改/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

 


 

标签:oinstall,11g,4.1,用户,devel,oracle,linux,Oracle,root
来源: https://www.cnblogs.com/justtosee/p/15040037.html