Linux7静默安装Oracle11g教程,亲测实用有效!

 

1.查看swap大小,若小于150m,需添加增加虚拟空间

dd if=/dev/zero of=/swapadd bs=1024 count=2006424
mkswap /swapadd
swapon /swapadd
重启系统虚拟空间会消失,除非打开/etc/fstab文件,加入
/swap swap swap default 0 0

2.查看操作系统信息

[root@docker ~]# uname -m
x86_64
[root@docker ~]# cat /etc/redhat-release 
centos linux release 7.1.1503 (core)

3.安装前的准备

a.修改主机名,linux7以上系统用:hostnamectl set-hostname hostname 

 

4.关闭selinux:vi /etc/selinux/config,设置如下,重启系统reboot;

 

5.检查以下服务是否安装

binutils-2.23.52.0.1-12.el7.x86_64 
compat-libcap1-1.10-3.el7.x86_64 
compat-libstdc++-33-3.2.3-71.el7.i686
compat-libstdc++-33-3.2.3-71.el7.x86_64
gcc-4.8.2-3.el7.x86_64 
gcc-c++-4.8.2-3.el7.x86_64 
glibc-2.17-36.el7.i686 
glibc-2.17-36.el7.x86_64 
glibc-devel-2.17-36.el7.i686 
glibc-devel-2.17-36.el7.x86_64 
ksh
libaio-0.3.109-9.el7.i686 
libaio-0.3.109-9.el7.x86_64 
libaio-devel-0.3.109-9.el7.i686 
libaio-devel-0.3.109-9.el7.x86_64 
libgcc-4.8.2-3.el7.i686 
libgcc-4.8.2-3.el7.x86_64 
libstdc++-4.8.2-3.el7.i686 
libstdc++-4.8.2-3.el7.x86_64 
libstdc++-devel-4.8.2-3.el7.i686 
libstdc++-devel-4.8.2-3.el7.x86_64 
libxi-1.7.2-1.el7.i686 
libxi-1.7.2-1.el7.x86_64 
libxtst-1.2.2-1.el7.i686 
libxtst-1.2.2-1.el7.x86_64 
make-3.82-19.el7.x86_64 
sysstat-10.1.5-1.el7.x86_64
unixodbc-2.3.1-6.el7.x86_64 or later
unixodbc-2.3.1-6.el7.i686 or later
unixodbc-devel-2.3.1-6.el7.x86_64 or later
unixodbc-devel-2.3.1-6.el7.i686 or later

view code

 

若担心系统包比较旧可考虑先更新程序包:yum -y upgrade,(提示:等待时间比较长!)

用yum进行安装所需服务:

yum -y install binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33*i686 compat-libstdc++-33*.devel compat-libstdc++-33 compat-libstdc++-33*.devel gcc gcc-c++ glibc glibc*.i686 glibc-devel glibc-devel*.i686 ksh libaio libaio*.i686 libaio-devel libaio-devel*.devel libgcc libgcc*.i686 libstdc++ libstdc++*.i686 libstdc++-devel libstdc++-devel*.devel libxi libxi*.i686 libxtst libxtst*.i686 make sysstat unixodbc unixodbc*.i686 unixodbc-devel unixodbc-devel*.i686

检查31个包是否都有安装,版本号只能大于规定的版本,不能小于

rpm -q binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libxi libxtst  make sysstat  unixodbc unixodbc-devel

[root@docker ~]# rpm -q binutils compat-libcap1 compat-libstdc++-33 gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libxi libxtst  make sysstat  unixodbc unixodbc-devel
binutils-2.23.52.0.1-55.el7.x86_64
compat-libcap1-1.10-7.el7.x86_64
compat-libstdc++-33-3.2.3-72.el7.x86_64
compat-libstdc++-33-3.2.3-72.el7.i686
gcc-4.8.5-4.el7.x86_64
gcc-c++-4.8.5-4.el7.x86_64
glibc-2.17-106.el7_2.8.x86_64
glibc-2.17-106.el7_2.8.i686
glibc-devel-2.17-106.el7_2.8.x86_64
glibc-devel-2.17-106.el7_2.8.i686
ksh-20120801-22.el7_1.3.x86_64
libaio-0.3.109-13.el7.x86_64
libaio-0.3.109-13.el7.i686
libaio-devel-0.3.109-13.el7.x86_64
libaio-devel-0.3.109-13.el7.i686
libgcc-4.8.5-4.el7.x86_64
libgcc-4.8.5-4.el7.i686
libstdc++-4.8.5-4.el7.x86_64
libstdc++-4.8.5-4.el7.i686
libstdc++-devel-4.8.5-4.el7.x86_64
libstdc++-devel-4.8.5-4.el7.i686
libxi-1.7.2-2.1.el7.x86_64
libxi-1.7.4-2.el7.i686
libxtst-1.2.2-2.1.el7.x86_64
libxtst-1.2.2-2.1.el7.i686
make-3.82-21.el7.x86_64
sysstat-10.1.5-7.el7.x86_64
unixodbc-2.3.1-11.el7.x86_64
unixodbc-2.3.1-11.el7.i686
unixodbc-devel-2.3.1-11.el7.x86_64
unixodbc-devel-2.3.1-11.el7.i686

view code

 

6.创建oinstall和dba组

/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba

 

7.创建oracle用户

/usr/sbin/useradd -g oinstall -g dba oracle

 

8.设置oracle密码

passwd oracle

 

9.验证创建及所属组是否正确:id oracle

[root@docker ~]# id oracle
uid=1001(oracle) gid=1001(oinstall) groups=1001(oinstall),1002(dba)

 

 

10.配置内核参数

[root@docker ~]# vim /etc/sysctl.conf 

# system default settings live in /usr/lib/sysctl.d/00-system.conf.
# to override those settings, enter new settings here, or in an /etc/sysctl.d/<name>.conf file
#
# for more information, see sysctl.conf(5) and sysctl.d(5).
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 7516192768 #7g
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

参数的值不能小于上面的配置,因为这是oracle官方建议的最小值,所以生产环境建议调整为这些参数,以优化系统性能。

注意:kernel.shmmax的值,#最低:536870912,最大值:比物理内存小1个字节的值,建议比物理内存小一点点就可以(过小的话后期会导致数据库实例无法启动或无法监听)

参数解释:

 

shmmax=物理内存*80%*80%,单位是字节
kernel.shmmax:表示单个共享内存段的最大值,以字节为单位,此值一般为物理内存的一半,不过大一点也没关系,这里设定的为4gb,即“4294967295/1024/1024/1024=4g”。
kernel.shmmin:表示单个共享内存段的最小值,默认为1byte
kernel.shmall:表示整个系统范围内可用共享内存页的总量,单位是页(page),在32位系统上一页等于4kb,也就是4096字节。计算公式是:shmmax/page_size
kernel.shmmni:表示整个系统范围内内存段的最大数量,一般为4096.
ip_local_port_range  :表示端口的范围。在监听器帮助客户端进程和服务器进程建立连接时,会用到指定范围内的端口。
kernel.sem  :表示设置的信号量,这4个参数内容大小固定。
net.core.rmem_default  :表示接收套接字缓冲区大小的缺省值(以字节为单位)。
net.core.rmem_max  :表示接收套接字缓冲区大小的最大值(以字节为单位)
net.core.wmem_default  :表示发送套接字缓冲区大小的缺省值(以字节为单位)。
net.core.wmem_max  :表示发送套接字缓冲区大小的最大值(以字节为单位)。

参数解释

 

修改后使之生效

/sbin/sysctl -p

 

11.修改用户权限

vim  /etc/security/limits.conf

#在末尾添加
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
oracle hard stack 10240

 

12.在/etc/pam.d/login 文件中,使用文本编辑器或vi命令增加或修改以下内容

session required /lib64/security/pam_limits.so
session required pam_limits.so

 

13.在/etc/profile 文件中,使用文本编辑器或vi命令增加或修改以下内容

if [ $user = "oracle" ]; then
   if [ $shell = "/bin/ksh" ]; then
       ulimit -p 16384
       ulimit -n 65536
    else
       ulimit -u 16384 -n 65536
   fi
fi

使之生效:source /etc/profile

source /etc/profile

 

14.创建安装目录

mkdir -p /u01/app/
chown -r oracle:oinstall /u01/app/
chmod -r 775 /u01/app/

 

15.配置环境变量

[oracle@docker ~]$ vim ~/.bash_profile 

export oracle_base=/u01/app/oracle
export oracle_sid=dbsrv2

使之生效

source ~/.bash_profile

 

16.解压oracle软件

[root@docker src]# unzip linux.x64_11gr2_database_1of2.zip
[root@docker src]# unzip linux.x64_11gr2_database_2of2.zip

 

17.切换到oracle用户,复制响应文件模板

[oracle@docker ~]$ mkdir etc
[oracle@docker ~]$ cp  /usr/local/src/database/response/* /home/oracle/etc/
[oracle@docker ~]$ ls etc
dbca.rsp  db_install.rsp  netca.rsp

 

18.设置响应文件权限

[oracle@docker ~]$ su - root

[root@docker ~]# chmod 700 /home/oracle/etc/*.rsp

 

19.切换到oracle用户:su – oracle,修改安装oracle软件的响应文件/home/oracle/etc/db_install.rsp

oracle.install.option=install_db_swonly     // 安装类型
oracle_hostname=docker        // 主机名称(hostname查询)
unix_group_name=oinstall     // 安装组
inventory_location=/u01/app/orainventory   //inventory目录(不填就是默认值)
selected_languages=en,zh_cn,zh_tw // 选择语言
oracle_home=/u01/app/oracle/product/11.2.0/db_1    //oracle_home
oracle_base=/u01/app/oracle     //oracle_base
oracle.install.db.installedition=ee     // oracle版本
oracle.install.db.eeoptionsselection=false   //自定义安装,否,使用默认组件
oracle.install.db.dba_group=dba /  / dba用户组
oracle.install.db.oper_group=oinstall // oper用户组
oracle.install.db.config.starterdb.type=general_purpose //数据库类型
oracle.install.db.config.starterdb.globaldbname=orcl //globaldbname
oracle.install.db.config.starterdb.sid=dbsrv2      //sid
oracle.install.db.config.starterdb.memorylimit=81920 //自动管理内存的内存(m)
oracle.install.db.config.starterdb.password.all=oracle //设定所有数据库用户使用同一个密码
security_updates_via_myoraclesupport=false         //(手动写了false)
decline_security_updates=true   //设置安全更新(貌似是有bug,这个一定要选true,否则会无限提醒邮件地址有问题,终止安装。ps:不管地址对不对)

 

20.开始静默安装

[oracle@docker database]$ /data/software//database/runinstaller -silent -responsefile /home/oracle/etc/db_install.rsp

 

21.查看安装日志

tail -f /u01/app/orainventory/logs/installactions2016-08-31_06-56-29pm.log

出现如下提示表示安装完成

[oracle@zyadmin ~]$ /data/software//database/runinstaller -silent -responsefile /home/oracle/etc/db_install.rsp
正在启动 oracle universal installer...

检查临时空间: 必须大于 120 mb。   实际为 33493 mb    通过
检查交换空间: 必须大于 150 mb。   实际为 1959 mb    通过
准备从以下地址启动 oracle universal installer /tmp/orainstall2018-08-18_03-29-11pm. 请稍候...[oracle@zyadmin ~]$ [warning] [ins-13014] 目标环境不满足一些可选要求。
   原因: 不满足一些可选的先决条件。有关详细信息, 请查看日志。/tmp/orainstall2018-08-18_03-29-11pm/installactions2018-08-18_03-29-11pm.log
   操作: 从日志 /tmp/orainstall2018-08-18_03-29-11pm/installactions2018-08-18_03-29-11pm.log 中确定失败的先决条件检查列表。然后, 从日志文件或安装手册中查找满足这些先决条件的适当配置, 并手动进行修复。
可以在以下位置找到本次安装会话的日志:
 /data/u01/app/orainventory/logs/installactions2018-08-18_03-29-11pm.log
^c
[oracle@zyadmin ~]$ tail /data/u01/app/orainventory/logs/installactions2018-08-18_03-29-11pm.log 
信息: 构建客户机共享库
信息: 此 make 操作的输出也可以在以下位置获得: '/data/u01/app/oracle/product/11.2.0/db_1/install/make.log'
信息: 

信息: 开始从衍生进程输出:
信息: ----------------------------------
信息: 

信息: /data/u01/app/oracle/product/11.2.0/db_1/bin/genclntsh

[oracle@zyadmin ~]$ oracle database 11g 的 安装 已成功。
请查看 '/data/u01/app/orainventory/logs/silentinstall2018-08-18_03-29-11pm.log' 以获取详细资料。

以 root 用户的身份执行以下脚本:
    1. /data/u01/app/orainventory/orainstroot.sh
    2. /data/u01/app/oracle/product/11.2.0/db_1/root.sh


successfully setup software.

view code

 

22.使用root用户执行脚本

su - root
/u01/app/orainventory/orainstroot.sh
/u01/app/oracle/product/11.2.0/db_1/root.sh

 常见报错解决办法:

(1)若没有生成orainstroot.sh这个文件,解决办法:删除/etc/orainst.loc文件

(2) 若重装oracle提示:“系统标识符(sid)已经存在,请指定另一个sid”,

   解决办法:把/etc/oratab里面对应的记录注释或者删除掉

 

(3)修改oracle端口:

a.查看监听状态,停止监听

$lsnrctl status

$lsnrctl stop

b.修改配置文件

$vi $oracle_home/network/admin/listener.ora

(修改对应的端口为欲更改端口)

c.登陆并查看local_listener参数

$sqlplus / as sysdba

>show parameter local_listener

(此时value值是空的)

d.修改local_listener参数

>alter system set local_listener="(address=(protocol=tcp)(host=172.16.8.129)(port=1521))";

 (host后面加主机名或者ip,然后就可以查看local_listener参数了)

e.启动监听,查看状态

>lsnrctl start

>lsnrctl status

f.防火墙端口开放

# /sbin/iptables -l input -p tcp --dport 端口 -j accept

# /etc/rc.d/init.d/iptables save

view code

 

a.查看监听状态,停止监听

$lsnrctl status

$lsnrctl stop

b.修改配置文件

$vi $oracle_home/network/admin/listener.ora

(修改对应的端口为欲更改端口)

c.登陆并查看local_listener参数

$sqlplus / as sysdba

>show parameter local_listener

(此时value值是空的)

d.修改local_listener参数

>alter system set local_listener=”(address=(protocol=tcp)(host=172.16.8.129)(port=1521))”;

 (host后面加主机名或者ip,然后就可以查看local_listener参数了)

e.启动监听,查看状态

>lsnrctl start

>lsnrctl status

f.防火墙端口开放

# /sbin/iptables -l input -p tcp –dport 端口 -j accept

# /etc/rc.d/init.d/iptables save

 

23.增加或修改oracle的环境变量

su  - oracle
vim ~/.bash_profile
#for oracle
export oracle_base=/u01/app/oracle
export oracle_sid=dbsrv2
export roacle_pid=ora11g
#export nls_lang=american_america.al32utf8
export ld_library_path=$oracle_home/lib:/usr/lib
export oracle_home=/u01/app/oracle/product/11.2.0/db_1
export path=$path:$oracle_home/bin

export lang="zh_cn.utf-8"
export nls_lang="simplified chinese_china.al32utf8"
export nls_date_format='yyyy-mm-dd hh24:mi:ss'

 

24.配置监听程序:netca /silent /responsefile /home/oracle/etc/netca.rsp

[oracle@docker ~]$ netca /silent /responsefile /home/oracle/etc/netca.rsp

parsing command line arguments:
parameter "silent" = true
parameter "responsefile" = /home/oracle/etc/netca.rsp
done parsing command line arguments.
oracle net services configuration:
profile configuration complete.
oracle net listener startup:
running listener control: 
/u01/app/oracle/product/11.2.0/db_1/bin/lsnrctl start listener
listener control complete.
listener started successfully.
listener configuration complete.
oracle net services configuration successful. the exit code is 0

view code

 

25.启动监听程序:[oracle@docker ~]$ lsnrctl start

[oracle@docker ~]$ lsnrctl start

lsnrctl for linux: version 11.2.0.1.0 - production on 01-sep-2016 11:23:31

copyright (c) 1991, 2009, oracle.  all rights reserved.

starting /u01/app/oracle/product/11.2.0/db_1/bin/tnslsnr: please wait...

tnslsnr for linux: version 11.2.0.1.0 - production
system parameter file is /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
log messages written to /u01/app/oracle/diag/tnslsnr/docker/listener/alert/log.xml
listening on: (description=(address=(protocol=ipc)(key=extproc1521)))
listening on: (description=(address=(protocol=tcp)(host=docker)(port=1521)))

connecting to (description=(address=(protocol=ipc)(key=extproc1521)))
status of the listener
------------------------
alias                     listener
version                   tnslsnr for linux: version 11.2.0.1.0 - production
start date                01-sep-2016 11:23:31
uptime                    0 days 0 hr. 0 min. 0 sec
trace level               off
security                  on: local os authentication
snmp                      off
listener parameter file   /u01/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
listener log file         /u01/app/oracle/diag/tnslsnr/docker/listener/alert/log.xml
listening endpoints summary...
  (description=(address=(protocol=ipc)(key=extproc1521)))
  (description=(address=(protocol=tcp)(host=docker)(port=1521)))
the listener supports no services
the command completed successfully

view code

 

26.静默dbca建库,编辑应答文件

[oracle@docker ~]$ vi etc/dbca.rsp
[general]
responsefile_version = "11.2.0"
operation_type = "createdatabase"
[createdatabase]
gdbname = "dbsrv2"
sid = "dbsrv2"
templatename = "general_purpose.dbc"
characterset = "al32utf8"

 

27.建库:

[oracle@docker ~]$ dbca -silent -responsefile etc/dbca.rsp
[oracle@docker ~]$ dbca -silent -responsefile etc/dbca.rsp

enter sys user password: 
  
enter system user password: 
 
sh: /bin/ksh: no such file or directory
sh: /bin/ksh: no such file or directory
copying database files
1% complete
3% complete
11% complete
18% complete
26% complete
37% complete
creating and starting oracle instance
40% complete
45% complete
50% complete
55% complete
56% complete
57% complete
60% complete
62% complete
completing database creation
66% complete
70% complete
73% complete
74% complete
85% complete
96% complete
100% complete
look at the log file look at the log file "/u01/app/oracle/cfgtoollogs/dbca/orcl11g/orcl11g.log" for further details.

view code

 

至此数据库实例创建成功!

参考博客:https://www.cnblogs.com/zydev/p/5827207.html

官方支持:

https://docs.oracle.com/cd/e11882_01/install.112/e24326/toc.htm#bhcbcfdi

ps:

删除实例:

[oracle@docker ~]$ dbca -silent -deletedatabase -sourcedb dbsrv2

oracle云在redhat 6上的一些参数文件,内存是8g,供参考:

/etc/sysctl.conf

# kernel sysctl configuration file for red hat linux
#
# for binary values, 0 is disabled, 1 is enabled.  see sysctl(8) and
# sysctl.conf(5) for more details.

# controls ip packet forwarding
net.ipv4.ip_forward = 0

# controls source route verification
net.ipv4.conf.default.rp_filter = 1

# do not accept source routing
net.ipv4.conf.default.accept_source_route = 0

# controls the system request debugging functionality of the kernel
kernel.sysrq = 0

# controls whether core dumps will append the pid to the core filename.
# useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1

# controls the use of tcp syncookies
net.ipv4.tcp_syncookies = 1

# disable netfilter on bridges.
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0

# controls the default maxmimum size of a mesage queue
kernel.msgmnb = 65536

# controls the maximum size of a message, in bytes
kernel.msgmax = 65536

# controls the maximum shared segment size, in bytes

# controls the maximum number of shared memory segments, in pages
kernel.shmall = 4294967296

# oracle-rdbms-server-12cr1-preinstall setting for fs.file-max is 6815744

# oracle-rdbms-server-12cr1-preinstall setting for kernel.sem is '250 32000 100 128'

# oracle-rdbms-server-12cr1-preinstall setting for kernel.shmmni is 4096

# oracle-rdbms-server-12cr1-preinstall setting for kernel.shmall is 1073741824 on x86_64

# oracle-rdbms-server-12cr1-preinstall setting for kernel.shmmax is 4398046511104 on x86_64

# oracle-rdbms-server-12cr1-preinstall setting for kernel.panic_on_oops is 1 per orabug 19642132

# oracle-rdbms-server-12cr1-preinstall setting for net.core.rmem_default is 262144

# oracle-rdbms-server-12cr1-preinstall setting for net.core.rmem_max is 4194304

# oracle-rdbms-server-12cr1-preinstall setting for net.core.wmem_default is 262144

# oracle-rdbms-server-12cr1-preinstall setting for net.core.wmem_max is 1048576

# oracle-rdbms-server-12cr1-preinstall setting for fs.aio-max-nr is 1048576

# oracle-rdbms-server-12cr1-preinstall setting for net.ipv4.ip_local_port_range is 9000 65500

kernel.panic = 10
xen.independent_wallclock = 1

# oracle-rdbms-server-11gr2-preinstall setting for fs.file-max is 6815744
fs.file-max = 6815744

# oracle-rdbms-server-11gr2-preinstall setting for kernel.sem is '250 32000 100 128'
kernel.sem = 250 32000 100 128

# oracle-rdbms-server-11gr2-preinstall setting for kernel.shmmni is 4096
kernel.shmmni = 4096

# oracle-rdbms-server-11gr2-preinstall setting for kernel.shmall is 1073741824 on x86_64
# oracle-rdbms-server-11gr2-preinstall setting for kernel.shmall is 2097152 on i386

# oracle-rdbms-server-11gr2-preinstall setting for kernel.shmmax is 4398046511104 on x86_64
# oracle-rdbms-server-11gr2-preinstall setting for kernel.shmmax is 4294967295 on i386
kernel.shmmax = 4398046511104

# oracle-rdbms-server-11gr2-preinstall setting for kernel.panic_on_oops is 1 per orabug 19212317
kernel.panic_on_oops = 1

# oracle-rdbms-server-11gr2-preinstall setting for net.core.rmem_default is 262144
net.core.rmem_default = 262144

# oracle-rdbms-server-11gr2-preinstall setting for net.core.rmem_max is 4194304
net.core.rmem_max = 4194304

# oracle-rdbms-server-11gr2-preinstall setting for net.core.wmem_default is 262144
net.core.wmem_default = 262144

# oracle-rdbms-server-11gr2-preinstall setting for net.core.wmem_max is 1048576
net.core.wmem_max = 1048576

# oracle-rdbms-server-11gr2-preinstall setting for fs.aio-max-nr is 1048576
fs.aio-max-nr = 1048576

# oracle-rdbms-server-11gr2-preinstall setting for net.ipv4.ip_local_port_range is 9000 65500
net.ipv4.ip_local_port_range = 9000 65500

vm.nr_hugepages = 1404

net.ipv4.conf.all.accept_redirects = 0
net.ipv6.conf.all.accept_redirects = 0
net.ipv4.conf.all.send_redirects = 0

view code

/etc/security/limits.conf

# /etc/security/limits.conf
#
#each line describes a limit for a user in the form:
#<domain>        <type>  <item>  <value>
#where:
#<domain> can be:
#        - a user name
#        - a group name, with @group syntax
#        - the wildcard *, for default entry
#        - the wildcard %, can be also used with %group syntax,
#                 for maxlogin limit
#<type> can have the two values:
#        - "soft" for enforcing the soft limits
#        - "hard" for enforcing hard limits
#<item> can be one of the following:
#        - core - limits the core file size (kb)
#        - data - max data size (kb)
#        - fsize - maximum filesize (kb)
#        - memlock - max locked-in-memory address space (kb)
#        - nofile - max number of open file descriptors
#        - rss - max resident set size (kb)
#        - stack - max stack size (kb)
#        - cpu - max cpu time (min)
#        - nproc - max number of processes
#        - as - address space limit (kb)
#        - maxsyslogins - max number of logins on the system
#        - priority - the priority to run user process with
#        - locks - max number of file locks the user can hold
#        - sigpending - max number of pending signals
#        - msgqueue - max memory used by posix message queues (bytes)
#        - nice - max nice priority allowed to raise to values: [-20, 19]
#        - rtprio - max realtime priority
#<domain>      <type>  <item>         <value>

#*               soft    core            0
#*               hard    rss             10000
#@student        hard    nproc           20
#@faculty        soft    nproc           20
#@faculty        hard    nproc           50
#ftp             hard    nproc           0
# end of file

# oracle-rdbms-server-11gr2-preinstall setting for nofile soft limit is 1024
oracle soft nofile 1024

# oracle-rdbms-server-11gr2-preinstall setting for nofile hard limit is 65536
oracle hard nofile 65536

# oracle-rdbms-server-11gr2-preinstall setting for nproc soft limit is 16384
# refer orabug15971421 for more info.
oracle soft nproc 16384

# oracle-rdbms-server-11gr2-preinstall setting for nproc hard limit is 16384
oracle hard nproc 16384

# oracle-rdbms-server-11gr2-preinstall setting for stack soft limit is 10240kb
oracle soft stack 10240

# oracle-rdbms-server-11gr2-preinstall setting for stack hard limit is 32768kb
oracle hard stack 32768

# oracle-rdbms-server-11gr2-preinstall setting for memlock hard limit is maximum of {128gb (x86_64) / 3gb (x86) or 90 % of ram}
oracle hard memlock 134217728

# oracle-rdbms-server-11gr2-preinstall setting for memlock soft limit is maximum of {128gb (x86_64) / 3gb (x86) or 90% of ram}
oracle soft memlock 134217728

view code

~/.bashrc

# user specific aliases and functions
umask 0022
oracle_home=/u01/app/oracle/product/11.2.0/dbhome_1; export oracle_home
oh=/u01/app/oracle/product/11.2.0/dbhome_1; export oh
oracle_unqname=testdb; export oracle_unqname
oracle_hostname=testdb.compute-gbsinsooft908.oraclecloud.internal; export oracle_hostname
path=/sbin:/bin:/usr/sbin:/usr/bin:/u01/app/oracle/product/11.2.0/dbhome_1/bin:/u01/app/oracle/product/11.2.0/dbhome_1/opatch; export path
ld_library_path=/u01/app/oracle/product/11.2.0/dbhome_1/lib; export ld_library_path
emkey_location=/u02/app/oracle/oradata/admin/testdb/dbs; export emkey_location
oracle_sid=testdb; export oracle_sid
tfa_home=/var/opt/oracle/tfa; export tfa_home

view code

(0)
上一篇 2022年3月22日
下一篇 2022年3月22日

相关推荐