Oracle DataBase 的安装过程:
检查 Oracle 11g 的软件依赖环境
[root@localhost binary]# 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 | grep "not installed"
package compat-libcap1 is not installed
package compat-libstdc++-33 is not installed
package gcc is not installed
package gcc-c++ is not installed
package glibc-devel is not installed
package ksh is not installed
package libaio-devel is not installed
package libstdc++-devel is not installed
package sysstat is not installed
package unixODBC-devel is not installed
[root@localhost binary]# yum -y install 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
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
- base: mirrors.aliyun.com
- extras: mirrors.aliyun.com
- updates: mirrors.aliyun.com
Package libaio-0.3.109-13.el7.x86_64 already installed and latest version
Package libXi-1.7.9-1.el7.x86_64 already installed and latest version
Package libXtst-1.2.3-1.el7.x86_64 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package binutils.x86_64 0:2.27-34.base.el7 will be updated
---> Package binutils.x86_64 0:2.27-41.base.el7_7.3 will be an update
---> Package compat-libcap1.x86_64 0:1.10-7.el7 will be installed
---> Package compat-libstdc++-33.x86_64 0:3.2.3-72.el7 will be installed
---> Package gcc.x86_64 0:4.8.5-39.el7 will be installed
--> Processing Dependency: libgomp = 4.8.5-39.el7 for package: gcc-4.8.5-39.el7.x86_64
--> Processing Dependency: cpp = 4.8.5-39.el7 for package: gcc-4.8.5-39.el7.x86_64
--> Processing Dependency: libmpfr.so.4()(64bit) for package: gcc-4.8.5-39.el7.x86_64
--> Processing Dependency: libmpc.so.3()(64bit) for package: gcc-4.8.5-39.el7.x86_64
---> Package gcc-c++.x86_64 0:4.8.5-39.el7 will be installed
---> Package glibc.x86_64 0:2.17-260.el7_6.4 will be updated
--> Processing Dependency: glibc = 2.17-260.el7_6.4 for package: glibc-common-2.17-260.el7_6.4.x86_64
---> Package glibc.x86_64 0:2.17-292.el7 will be an update
---> Package glibc-devel.x86_64 0:2.17-292.el7 will be installed
--> Processing Dependency: glibc-headers = 2.17-292.el7 for package: glibc-devel-2.17-292.el7.x86_64
--> Processing Dependency: glibc-headers for package: glibc-devel-2.17-292.el7.x86_64
---> Package ksh.x86_64 0:20120801-140.el7_7 will be installed
---> Package libaio-devel.x86_64 0:0.3.109-13.el7 will be installed
---> Package libgcc.x86_64 0:4.8.5-36.el7_6.1 will be updated
---> Package libgcc.x86_64 0:4.8.5-39.el7 will be an update
---> Package libstdc++.x86_64 0:4.8.5-36.el7_6.1 will be updated
---> Package libstdc++.x86_64 0:4.8.5-39.el7 will be an update
---> Package libstdc++-devel.x86_64 0:4.8.5-39.el7 will be installed
---> Package make.x86_64 1:3.82-23.el7 will be updated
---> Package make.x86_64 1:3.82-24.el7 will be an update
---> Package sysstat.x86_64 0:10.1.5-18.el7_7.1 will be installed
--> Processing Dependency: libsensors.so.4()(64bit) for package: sysstat-10.1.5-18.el7_7.1.x86_64
---> Package unixODBC.x86_64 0:2.3.1-11.el7 will be updated
---> Package unixODBC.x86_64 0:2.3.1-14.el7 will be an update
---> Package unixODBC-devel.x86_64 0:2.3.1-14.el7 will be installed
--> Running transaction check
---> Package cpp.x86_64 0:4.8.5-39.el7 will be installed
---> Package glibc-common.x86_64 0:2.17-260.el7_6.4 will be updated
---> Package glibc-common.x86_64 0:2.17-292.el7 will be an update
---> Package glibc-headers.x86_64 0:2.17-292.el7 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2.17-292.el7.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.17-292.el7.x86_64
---> Package libgomp.x86_64 0:4.8.5-36.el7_6.1 will be updated
---> Package libgomp.x86_64 0:4.8.5-39.el7 will be an update
---> Package libmpc.x86_64 0:1.0.1-3.el7 will be installed
---> Package lm_sensors-libs.x86_64 0:3.4.0-8.20160601gitf9185e5.el7 will be installed
---> Package mpfr.x86_64 0:3.1.1-4.el7 will be installed
--> Running transaction check
---> Package kernel-headers.x86_64 0:3.10.0-1062.18.1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===================================================================================================
Package Arch Version Repository Size
Installing:
compat-libcap1 x86_64 1.10-7.el7 base 19 k
compat-libstdc++-33 x86_64 3.2.3-72.el7 base 191 k
gcc x86_64 4.8.5-39.el7 base 16 M
gcc-c++ x86_64 4.8.5-39.el7 base 7.2 M
glibc-devel x86_64 2.17-292.el7 base 1.1 M
ksh x86_64 20120801-140.el7_7 updates 884 k
libaio-devel x86_64 0.3.109-13.el7 base 13 k
libstdc++-devel x86_64 4.8.5-39.el7 base 1.5 M
sysstat x86_64 10.1.5-18.el7_7.1 updates 315 k
unixODBC-devel x86_64 2.3.1-14.el7 base 55 k
Updating:
binutils x86_64 2.27-41.base.el7_7.3 updates 5.9 M
glibc x86_64 2.17-292.el7 base 3.6 M
libgcc x86_64 4.8.5-39.el7 base 102 k
libstdc++ x86_64 4.8.5-39.el7 base 305 k
make x86_64 1:3.82-24.el7 base 421 k
unixODBC x86_64 2.3.1-14.el7 base 413 k
Installing for dependencies:
cpp x86_64 4.8.5-39.el7 base 5.9 M
glibc-headers x86_64 2.17-292.el7 base 687 k
kernel-headers x86_64 3.10.0-1062.18.1.el7 updates 8.8 M
libmpc x86_64 1.0.1-3.el7 base 51 k
lm_sensors-libs x86_64 3.4.0-8.20160601gitf9185e5.el7 base 42 k
mpfr x86_64 3.1.1-4.el7 base 203 k
Updating for dependencies:
glibc-common x86_64 2.17-292.el7 base 11 M
libgomp x86_64 4.8.5-39.el7 base 158 k
Transaction Summary
Install 10 Packages (+6 Dependent packages)
Upgrade 6 Packages (+2 Dependent packages)
Total download size: 65 M
Downloading packages:
Delta RPMs disabled because /usr/bin/applydeltarpm not installed.
(1/24): compat-libcap1-1.10-7.el7.x86_64.rpm | 19 kB 00:00:00
(2/24): binutils-2.27-41.base.el7_7.3.x86_64.rpm | 5.9 MB 00:00:01
(3/24): compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm | 191 kB 00:00:01
(4/24): cpp-4.8.5-39.el7.x86_64.rpm | 5.9 MB 00:00:01
(5/24): gcc-c++-4.8.5-39.el7.x86_64.rpm | 7.2 MB 00:00:02
(6/24): glibc-2.17-292.el7.x86_64.rpm | 3.6 MB 00:00:01
(7/24): gcc-4.8.5-39.el7.x86_64.rpm | 16 MB 00:00:05
(8/24): glibc-devel-2.17-292.el7.x86_64.rpm | 1.1 MB 00:00:00
(9/24): glibc-headers-2.17-292.el7.x86_64.rpm | 687 kB 00:00:00
(10/24): libaio-devel-0.3.109-13.el7.x86_64.rpm | 13 kB 00:00:00
(11/24): libgcc-4.8.5-39.el7.x86_64.rpm | 102 kB 00:00:00
(12/24): libgomp-4.8.5-39.el7.x86_64.rpm | 158 kB 00:00:00
(13/24): libmpc-1.0.1-3.el7.x86_64.rpm | 51 kB 00:00:00
(14/24): glibc-common-2.17-292.el7.x86_64.rpm | 11 MB 00:00:03
(15/24): libstdc++-4.8.5-39.el7.x86_64.rpm | 305 kB 00:00:00
(16/24): ksh-20120801-140.el7_7.x86_64.rpm | 884 kB 00:00:01
(17/24): lm_sensors-libs-3.4.0-8.20160601gitf9185e5.el7.x86_64.rpm | 42 kB 00:00:00
(18/24): make-3.82-24.el7.x86_64.rpm | 421 kB 00:00:00
(19/24): libstdc++-devel-4.8.5-39.el7.x86_64.rpm | 1.5 MB 00:00:00
(20/24): mpfr-3.1.1-4.el7.x86_64.rpm | 203 kB 00:00:00
(21/24): unixODBC-2.3.1-14.el7.x86_64.rpm | 413 kB 00:00:00
(22/24): unixODBC-devel-2.3.1-14.el7.x86_64.rpm | 55 kB 00:00:00
(23/24): sysstat-10.1.5-18.el7_7.1.x86_64.rpm | 315 kB 00:00:00
(24/24): kernel-headers-3.10.0-1062.18.1.el7.x86_64.rpm | 8.8 MB 00:00:02
Total 6.0 MB/s | 65 MB 00:00:10
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Updating : libgcc-4.8.5-39.el7.x86_64 1/32
Updating : glibc-common-2.17-292.el7.x86_64 2/32
Updating : glibc-2.17-292.el7.x86_64 3/32
warning: /etc/nsswitch.conf created as /etc/nsswitch.conf.rpmnew
Installing : mpfr-3.1.1-4.el7.x86_64 4/32
Installing : libmpc-1.0.1-3.el7.x86_64 5/32
Updating : libstdc++-4.8.5-39.el7.x86_64 6/32
Installing : libstdc++-devel-4.8.5-39.el7.x86_64 7/32
Installing : cpp-4.8.5-39.el7.x86_64 8/32
Updating : unixODBC-2.3.1-14.el7.x86_64 9/32
Updating : libgomp-4.8.5-39.el7.x86_64 10/32
Installing : lm_sensors-libs-3.4.0-8.20160601gitf9185e5.el7.x86_64 11/32
Updating : binutils-2.27-41.base.el7_7.3.x86_64 12/32
Installing : kernel-headers-3.10.0-1062.18.1.el7.x86_64 13/32
Installing : glibc-headers-2.17-292.el7.x86_64 14/32
Installing : glibc-devel-2.17-292.el7.x86_64 15/32
Installing : gcc-4.8.5-39.el7.x86_64 16/32
Installing : gcc-c++-4.8.5-39.el7.x86_64 17/32
Installing : sysstat-10.1.5-18.el7_7.1.x86_64 18/32
Installing : unixODBC-devel-2.3.1-14.el7.x86_64 19/32
Updating : 1:make-3.82-24.el7.x86_64 20/32
Installing : ksh-20120801-140.el7_7.x86_64 21/32
Installing : compat-libcap1-1.10-7.el7.x86_64 22/32
Installing : compat-libstdc++-33-3.2.3-72.el7.x86_64 23/32
Installing : libaio-devel-0.3.109-13.el7.x86_64 24/32
Cleanup : libstdc++-4.8.5-36.el7_6.1.x86_64 25/32
Cleanup : binutils-2.27-34.base.el7.x86_64 26/32
Cleanup : 1:make-3.82-23.el7.x86_64 27/32
Cleanup : libgomp-4.8.5-36.el7_6.1.x86_64 28/32
Cleanup : unixODBC-2.3.1-11.el7.x86_64 29/32
Cleanup : glibc-common-2.17-260.el7_6.4.x86_64 30/32
Cleanup : glibc-2.17-260.el7_6.4.x86_64 31/32
Cleanup : libgcc-4.8.5-36.el7_6.1.x86_64 32/32
Verifying : unixODBC-2.3.1-14.el7.x86_64 1/32
Verifying : kernel-headers-3.10.0-1062.18.1.el7.x86_64 2/32
Verifying : gcc-4.8.5-39.el7.x86_64 3/32
Verifying : libstdc++-4.8.5-39.el7.x86_64 4/32
Verifying : unixODBC-devel-2.3.1-14.el7.x86_64 5/32
Verifying : libgcc-4.8.5-39.el7.x86_64 6/32
Verifying : libgomp-4.8.5-39.el7.x86_64 7/32
Verifying : 1:make-3.82-24.el7.x86_64 8/32
Verifying : ksh-20120801-140.el7_7.x86_64 9/32
Verifying : sysstat-10.1.5-18.el7_7.1.x86_64 10/32
Verifying : lm_sensors-libs-3.4.0-8.20160601gitf9185e5.el7.x86_64 11/32
Verifying : libstdc++-devel-4.8.5-39.el7.x86_64 12/32
Verifying : gcc-c++-4.8.5-39.el7.x86_64 13/32
Verifying : compat-libcap1-1.10-7.el7.x86_64 14/32
Verifying : libmpc-1.0.1-3.el7.x86_64 15/32
Verifying : glibc-2.17-292.el7.x86_64 16/32
Verifying : glibc-common-2.17-292.el7.x86_64 17/32
Verifying : glibc-devel-2.17-292.el7.x86_64 18/32
Verifying : binutils-2.27-41.base.el7_7.3.x86_64 19/32
Verifying : mpfr-3.1.1-4.el7.x86_64 20/32
Verifying : compat-libstdc++-33-3.2.3-72.el7.x86_64 21/32
Verifying : cpp-4.8.5-39.el7.x86_64 22/32
Verifying : libaio-devel-0.3.109-13.el7.x86_64 23/32
Verifying : glibc-headers-2.17-292.el7.x86_64 24/32
Verifying : glibc-2.17-260.el7_6.4.x86_64 25/32
Verifying : libgomp-4.8.5-36.el7_6.1.x86_64 26/32
Verifying : binutils-2.27-34.base.el7.x86_64 27/32
Verifying : libstdc++-4.8.5-36.el7_6.1.x86_64 28/32
Verifying : unixODBC-2.3.1-11.el7.x86_64 29/32
Verifying : 1:make-3.82-23.el7.x86_64 30/32
Verifying : libgcc-4.8.5-36.el7_6.1.x86_64 31/32
Verifying : glibc-common-2.17-260.el7_6.4.x86_64 32/32
Installed:
compat-libcap1.x86_64 0:1.10-7.el7 compat-libstdc++-33.x86_64 0:3.2.3-72.el7
gcc.x86_64 0:4.8.5-39.el7 gcc-c++.x86_64 0:4.8.5-39.el7
glibc-devel.x86_64 0:2.17-292.el7 ksh.x86_64 0:20120801-140.el7_7
libaio-devel.x86_64 0:0.3.109-13.el7 libstdc++-devel.x86_64 0:4.8.5-39.el7
sysstat.x86_64 0:10.1.5-18.el7_7.1 unixODBC-devel.x86_64 0:2.3.1-14.el7
Dependency Installed:
cpp.x86_64 0:4.8.5-39.el7 glibc-headers.x86_64 0:2.17-292.el7
kernel-headers.x86_64 0:3.10.0-1062.18.1.el7 libmpc.x86_64 0:1.0.1-3.el7
lm_sensors-libs.x86_64 0:3.4.0-8.20160601gitf9185e5.el7 mpfr.x86_64 0:3.1.1-4.el7
Updated:
binutils.x86_64 0:2.27-41.base.el7_7.3 glibc.x86_64 0:2.17-292.el7
libgcc.x86_64 0:4.8.5-39.el7 libstdc++.x86_64 0:4.8.5-39.el7
make.x86_64 1:3.82-24.el7 unixODBC.x86_64 0:2.3.1-14.el7
Dependency Updated:
glibc-common.x86_64 0:2.17-292.el7 libgomp.x86_64 0:4.8.5-39.el7
Complete!
[root@localhost binary]# 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 | grep "not installed"
[root@localhost binary]#
创建安装Oracle所需的组和用户
[root@localhost binary]# groupadd oinstall
groupadd: group 'oinstall' already exists
[root@localhost binary]# groupadd dba
groupadd: group 'dba' already exists
[root@localhost binary]# groupadd oper
groupadd: group 'oper' already exists
[root@localhost binary]# useradd -g oinstall -G dba oracle
useradd: user 'oracle' already exists
[root@localhost binary]# ps -ef | grep oracle
root 20427 18983 0 09:57 pts/1 00:00:00 grep --color=auto oracle
[root@localhost binary]#
[root@localhost binary]# mkdir -p /data/oracle
[root@localhost binary]# chown -R oracle:oinstall /data/oracle
[root@localhost binary]# mkdir -p /data/oraInventory
[root@localhost binary]# chown -R oracle:oinstall /data/oraInventory
[root@localhost binary]# mkdir -p /data/database
[root@localhost binary]# chown -R oracle:oinstall /data/database
[root@localhost binary]#
[root@localhost binary]# passwd oracle
Changing password for user oracle.
New password: 【shujuzhilitest】
Retype new password:
passwd: all authentication tokens updated successfully.
[root@localhost binary]#
配置内核参数和资源限制
[root@localhost binary]# cat -n /etc/sysctl.conf
1 # sysctl settings are defined through files in
2 # /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
3 #
4 # Vendors settings live in /usr/lib/sysctl.d/.
5 # To override a whole file, create a new file with the same in
6 # /etc/sysctl.d/ and put new settings there. To override
7 # only specific settings, add a file with a lexically later
8 # name in /etc/sysctl.d/ and put new settings there.
9 #
10 # For more information, see sysctl.conf(5) and sysctl.d(5).
[root@localhost binary]# cp /etc/sysctl.conf{,.original}
[root@localhost binary]# ls /etc/ | grep sysctl.conf
sysctl.conf
sysctl.conf.original
[root@localhost binary]# cat >> /etc/sysctl.conf << EOF
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 = 1048576
EOF
[root@localhost binary]# cat -n /etc/sysctl.conf
1 # sysctl settings are defined through files in
2 # /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
3 #
4 # Vendors settings live in /usr/lib/sysctl.d/.
5 # To override a whole file, create a new file with the same in
6 # /etc/sysctl.d/ and put new settings there. To override
7 # only specific settings, add a file with a lexically later
8 # name in /etc/sysctl.d/ and put new settings there.
9 #
10 # For more information, see sysctl.conf(5) and sysctl.d(5).
11 fs.aio-max-nr = 1048576
12 fs.file-max = 6815744
13 kernel.shmall = 2097152
14 kernel.shmmax = 536870912
15 kernel.shmmni = 4096
16 kernel.sem = 250 32000 100 128
17 net.ipv4.ip_local_port_range = 9000 65500
18 net.core.rmem_default = 262144
19 net.core.rmem_max = 4194304
20 net.core.wmem_default = 262144
21 net.core.wmem_max = 1048576
[root@localhost binary]#
[root@localhost binary]# sysctl -p
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 = 1048576
[root@localhost binary]#
[root@localhost binary]# cat -n /etc/security/limits.conf
1 # /etc/security/limits.conf
2 #
3 #This file sets the resource limits for the users logged in via PAM.
4 #It does not affect resource limits of the system services.
5 #
6 #Also note that configuration files in /etc/security/limits.d directory,
7 #which are read in alphabetical order, override the settings in this
8 #file in case the domain is the same or more specific.
9 #That means for example that setting a limit for wildcard domain here
10 #can be overriden with a wildcard setting in a config file in the
11 #subdirectory, but a user specific setting here can be overriden only
12 #with a user specific setting in the subdirectory.
13 #
14 #Each line describes a limit for a user in the form:
15 #
16 #
17 #
18 #Where:
19 #can be:
20 # - a user name
21 # - a group name, with @group syntax
22 # - the wildcard , for default entry
23 # - the wildcard %, can be also used with %group syntax,
24 # for maxlogin limit
25 #
26 #can have the two values: soft core 0
27 # - "soft" for enforcing the soft limits
28 # - "hard" for enforcing hard limits
29 #
30 #- can be one of the following:
31 # - core - limits the core file size (KB)
32 # - data - max data size (KB)
33 # - fsize - maximum filesize (KB)
34 # - memlock - max locked-in-memory address space (KB)
35 # - nofile - max number of open file descriptors
36 # - rss - max resident set size (KB)
37 # - stack - max stack size (KB)
38 # - cpu - max CPU time (MIN)
39 # - nproc - max number of processes
40 # - as - address space limit (KB)
41 # - maxlogins - max number of logins for this user
42 # - maxsyslogins - max number of logins on the system
43 # - priority - the priority to run user process with
44 # - locks - max number of file locks the user can hold
45 # - sigpending - max number of pending signals
46 # - msgqueue - max memory used by POSIX message queues (bytes)
47 # - nice - max nice priority allowed to raise to values: [-20, 19]
48 # - rtprio - max realtime priority
49 #
50 #
51 #
52
53 #
54 # hard rss 10000
55 #@student hard nproc 20
56 #@faculty soft nproc 20
57 #@faculty hard nproc 50
58 #ftp hard nproc 0
59 #@student - maxlogins 4
60 soft nofile 65536
61 * hard nofile 65536
62 es soft memlock unlimited
63 es hard memlock unlimited
64
65
66 # End of file
[root@localhost binary]# cp /etc/security/limits.conf{,.original}
[root@localhost binary]# ls /etc/security/ | grep limits.conf
limits.conf
limits.conf.original
[root@localhost binary]#
vim /etc/security/limits.conf
【添加如下内容:
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536】
[root@localhost binary]# cat -n /etc/security/limits.conf
1 # /etc/security/limits.conf
2 #
3 #This file sets the resource limits for the users logged in via PAM.
4 #It does not affect resource limits of the system services.
5 #
6 #Also note that configuration files in /etc/security/limits.d directory,
7 #which are read in alphabetical order, override the settings in this
8 #file in case the domain is the same or more specific.
9 #That means for example that setting a limit for wildcard domain here
10 #can be overriden with a wildcard setting in a config file in the
11 #subdirectory, but a user specific setting here can be overriden only
12 #with a user specific setting in the subdirectory.
13 #
14 #Each line describes a limit for a user in the form:
15 #
16 #
17 #
18 #Where:
19 #
20 # - a user name
21 # - a group name, with @group syntax
22 # - the wildcard , for default entry
23 # - the wildcard %, can be also used with %group syntax,
24 # for maxlogin limit
25 #
26 #
27 # - "soft" for enforcing the soft limits
28 # - "hard" for enforcing hard limits
29 #
30 #
31 # - core - limits the core file size (KB)
32 # - data - max data size (KB)
33 # - fsize - maximum filesize (KB)
34 # - memlock - max locked-in-memory address space (KB)
35 # - nofile - max number of open file descriptors
36 # - rss - max resident set size (KB)
37 # - stack - max stack size (KB)
38 # - cpu - max CPU time (MIN)
39 # - nproc - max number of processes
40 # - as - address space limit (KB)
41 # - maxlogins - max number of logins for this user
42 # - maxsyslogins - max number of logins on the system
43 # - priority - the priority to run user process with
44 # - locks - max number of file locks the user can hold
45 # - sigpending - max number of pending signals
46 # - msgqueue - max memory used by POSIX message queues (bytes)
47 # - nice - max nice priority allowed to raise to values: [-20, 19]
48 # - rtprio - max realtime priority
49 #
50 #
51 #
52
53 #
54 # hard rss 10000
55 #@student hard nproc 20
56 #@faculty soft nproc 20
57 #@faculty hard nproc 50
58 #ftp hard nproc 0
59 #@student - maxlogins 4
60 soft nofile 65536
61 * hard nofile 65536
62 es soft memlock unlimited
63 es hard memlock unlimited
64 oracle soft nproc 2047
65
66 oracle hard nproc 16384
67
68 oracle soft nofile 1024
69
70 oracle hard nofile 65536
71
72 # End of file
[root@localhost binary]#
[root@localhost binary]# cat -n /etc/pam.d/login
1 #%PAM-1.0
2 auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
3 auth substack system-auth
4 auth include postlogin
5 account required pam_nologin.so
6 account include system-auth
7 password include system-auth
8 # pam_selinux.so close should be the first session rule
9 session required pam_selinux.so close
10 session required pam_loginuid.so
11 session optional pam_console.so
12 # pam_selinux.so open should only be followed by sessions to be executed in the user context
13 session required pam_selinux.so open
14 session required pam_namespace.so
15 session optional pam_keyinit.so force revoke
16 session include system-auth
17 session include postlogin
18 -session optional pam_ck_connector.so
[root@localhost binary]# cat >> /etc/pam.d/login << EOF
session required /lib64/security/pam_limits.so
session required pam_limits.so
EOF
[root@localhost binary]# cat -n /etc/pam.d/login
1 #%PAM-1.0
2 auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
3 auth substack system-auth
4 auth include postlogin
5 account required pam_nologin.so
6 account include system-auth
7 password include system-auth
8 # pam_selinux.so close should be the first session rule
9 session required pam_selinux.so close
10 session required pam_loginuid.so
11 session optional pam_console.so
12 # pam_selinux.so open should only be followed by sessions to be executed in the user context
13 session required pam_selinux.so open
14 session required pam_namespace.so
15 session optional pam_keyinit.so force revoke
16 session include system-auth
17 session include postlogin
18 -session optional pam_ck_connector.so
19 session required /lib64/security/pam_limits.so
20 session required pam_limits.so
[root@localhost binary]#
[root@localhost binary]# cat -n /etc/profile
1 # /etc/profile
2
3 # System wide environment and startup programs, for login setup
4 # Functions and aliases go in /etc/bashrc
5
6 # It's NOT a good idea to change this file unless you know what you
7 # are doing. It's much better to create a custom.sh shell script in
8 # /etc/profile.d/ to make custom changes to your environment, as this
9 # will prevent the need for merging in future updates.
10
11 pathmunge () {
12 case ":${PATH}:" in
13 :"$1":)
14 ;;
15 )
16 if [ "$2" = "after" ] ; then
17 PATH=$PATH:$1
18 else
19 PATH=$1:$PATH
20 fi
21 esac
22 }
23
24
25 if [ -x /usr/bin/id ]; then
26 if [ -z "$EUID" ]; then
27 # ksh workaround
28 EUID=/usr/bin/id -u
29 UID=/usr/bin/id -ru
30 fi
31 USER="/usr/bin/id -un
"
32 LOGNAME=$USER
33 MAIL="/var/spool/mail/$USER"
34 fi
35
36 # Path manipulation
37 if [ "$EUID" = "0" ]; then
38 pathmunge /usr/sbin
39 pathmunge /usr/local/sbin
40 else
41 pathmunge /usr/local/sbin after
42 pathmunge /usr/sbin after
43 fi
44
45 HOSTNAME=/usr/bin/hostname 2>/dev/null
46 HISTSIZE=1000
47 if [ "$HISTCONTROL" = "ignorespace" ] ; then
48 export HISTCONTROL=ignoreboth
49 else
50 export HISTCONTROL=ignoredups
51 fi
52
53 export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL
54
55 # By default, we want umask to get set. This sets it for login shell
56 # Current threshold for system reserved uid/gids is 200
57 # You could check uidgid reservation validity in
58 # /usr/share/doc/setup-/uidgid file
59 if [ $UID -gt 199 ] && [ "/usr/bin/id -gn
" = "/usr/bin/id -un
" ]; then
60 umask 002
61 else
62 umask 022
63 fi
64
65 for i in /etc/profile.d/.sh /etc/profile.d/sh.local ; do
66 if [ -r "$i" ]; then
67 if [ "${-#i}" != "$-" ]; then
68 . "$i"
69 else
70 . "$i" >/dev/null
71 fi
72 fi
73 done
74
75 unset i
76 unset -f pathmunge
[root@localhost binary]# cp /etc/profile{,.original}
[root@localhost binary]# ls /etc/ | grep profile
profile
profile.d
profile.original
[root@localhost binary]# cat >> /etc/profile << EOF
if [ $USER = "oracle" ]; thenif [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536
fi
fi
EOF
[root@localhost binary]# cat -n /etc/profile
1 # /etc/profile
2
3 # System wide environment and startup programs, for login setup
4 # Functions and aliases go in /etc/bashrc
5
6 # It's NOT a good idea to change this file unless you know what you
7 # are doing. It's much better to create a custom.sh shell script in
8 # /etc/profile.d/ to make custom changes to your environment, as this
9 # will prevent the need for merging in future updates.
10
11 pathmunge () {
12 case ":${PATH}:" in
13 :"$1":)
14 ;;
15 )
16 if [ "$2" = "after" ] ; then
17 PATH=$PATH:$1
18 else
19 PATH=$1:$PATH
20 fi
21 esac
22 }
23
24
25 if [ -x /usr/bin/id ]; then
26 if [ -z "$EUID" ]; then
27 # ksh workaround
28 EUID=/usr/bin/id -u
29 UID=/usr/bin/id -ru
30 fi
31 USER="/usr/bin/id -un
"
32 LOGNAME=$USER
33 MAIL="/var/spool/mail/$USER"
34 fi
35
36 # Path manipulation
37 if [ "$EUID" = "0" ]; then
38 pathmunge /usr/sbin
39 pathmunge /usr/local/sbin
40 else
41 pathmunge /usr/local/sbin after
42 pathmunge /usr/sbin after
43 fi
44
45 HOSTNAME=/usr/bin/hostname 2>/dev/null
46 HISTSIZE=1000
47 if [ "$HISTCONTROL" = "ignorespace" ] ; then
48 export HISTCONTROL=ignoreboth
49 else
50 export HISTCONTROL=ignoredups
51 fi
52
53 export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL
54
55 # By default, we want umask to get set. This sets it for login shell
56 # Current threshold for system reserved uid/gids is 200
57 # You could check uidgid reservation validity in
58 # /usr/share/doc/setup-/uidgid file
59 if [ $UID -gt 199 ] && [ "/usr/bin/id -gn
" = "/usr/bin/id -un
" ]; then
60 umask 002
61 else
62 umask 022
63 fi
64
65 for i in /etc/profile.d/.sh /etc/profile.d/sh.local ; do
66 if [ -r "$i" ]; then
67 if [ "${-#i}" != "$-" ]; then
68 . "$i"
69 else
70 . "$i" >/dev/null
71 fi
72 fi
73 done
74
75 unset i
76 unset -f pathmunge
77 if [ root = "oracle" ]; then
78
79 if [ /bin/bash = "/bin/ksh" ]; then
80
81 ulimit -p 16384
82
83 ulimit -n 65536
84
85 else
86
87 ulimit -u 16384 -n 65536
88
89 fi
90
91 fi
[root@localhost binary]#
[root@localhost binary]# source /etc/profile
[root@localhost binary]#
[root@localhost binary]# cat /sys/kernel/mm/transparent_hugepage/enabled
[always] madvise never
[root@localhost binary]# echo never > /sys/kernel/mm/transparent_hugepage/enabled
[root@localhost binary]# cat /sys/kernel/mm/transparent_hugepage/enabled
always madvise [never]
[root@localhost binary]#
创建oracle安装目录
[root@localhost binary]# mkdir -p /data/app/
[root@localhost binary]# chown -R oracle:oinstall /data/app/
[root@localhost binary]# chmod -R 775 /data/app/
[root@localhost binary]#
配置oracle用户环境变量
[root@localhost binary]# cat -n /home/oracle/.bash_profile
1 # .bash_profile
2
3 # Get the aliases and functions
4 if [ -f ~/.bashrc ]; then
5 . ~/.bashrc
6 fi
7
8 # User specific environment and startup programs
9
10 PATH=$PATH:$HOME/.local/bin:$HOME/bin
11
12 export PATH
[root@localhost binary]# cp /home/oracle/.bash_profile{,.original}
[root@localhost binary]# ls /home/oracle/ | grep .bash_profile
[root@localhost binary]# ls -a /home/oracle/ | grep .bash_profile
.bash_profile
.bash_profile.original
[root@localhost binary]# cat >> /home/oracle/.bash_profile << EOF
umask 022
export ORACLE_HOSTNAME=oracle11g
export ORACLE_BASE=/data/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/
export ORACLE_SID=orcl
export PATH=.:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/jdk/bin:$PATH
export LC_ALL="en_US"
export LANG="en_US"
export NLS_LANG="AMERICAN_AMERICA.ZHS16GBK"
export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
EOF
[root@localhost binary]# cat -n /home/oracle/.bash_profile
1 # .bash_profile
2
3 # Get the aliases and functions
4 if [ -f ~/.bashrc ]; then
5 . ~/.bashrc
6 fi
7
8 # User specific environment and startup programs
9
10 PATH=$PATH:$HOME/.local/bin:$HOME/bin
11
12 export PATH
13 umask 022
14 export ORACLE_HOSTNAME=oracle11g
15 export ORACLE_BASE=/data/app/oracle
16 export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/
17 export ORACLE_SID=orcl
18 export PATH=.:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/jdk/bin:$PATH
19 export LC_ALL="en_US"
20 export LANG="en_US"
21 export NLS_LANG="AMERICAN_AMERICA.ZHS16GBK"
22 export NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
[root@localhost binary]#
[root@localhost binary]# init 6
解压下载的两个Oracle数据库安装压缩包
[root@oracle11g ~]# ls -F
anaconda-ks.cfg zabbix-release-3.4-1.el7.centos.noarch.rpm zabbix-release-4.0-1.el7.noarch.rpm
src/ zabbix-release-3.4-2.el7.noarch.rpm
[root@oracle11g ~]# ls -F /
bin@ data/ etc/ lib@ media/ opt/ root/ sbin@ sys/ usr/
boot/ dev/ home/ lib64@ mnt/ proc/ run/ srv/ tmp/ var/
[root@oracle11g ~]# ls -F /data/
app/ database/ log/ oracle/ oraInventory/
[root@oracle11g ~]# cd src/
[root@oracle11g src]# ls
binary tar
[root@oracle11g src]# cd binary/
[root@oracle11g binary]# ls -F
linux.x64_11gR2_database_1of2.zip linux.x64_11gR2_database_2of2.zip
[root@oracle11g binary]# pwd -P
/root/src/binary
[root@oracle11g binary]#
[root@oracle11g binary]# yum install -y unzip
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
..............................................................................................................................
Installed:
unzip.x86_64 0:6.0-20.el7
Complete!
[root@oracle11g binary]#
[root@oracle11g binary]# unzip -q linux.x64_11gR2_database_1of2.zip -d /data
[root@oracle11g binary]# unzip -q linux.x64_11gR2_database_2of2.zip -d /data
[root@oracle11g binary]# mkdir -p /data/etc
[root@oracle11g binary]# ls -F /data/
app/ database/ etc/ log/ oracle/ oraInventory/
[root@oracle11g binary]# cp /data/database/response/* /data/etc/
[root@oracle11g binary]#
[root@oracle11g binary]# ls -F /data/
app/ database/ etc/ log/ oracle/ oraInventory/
[root@oracle11g binary]# cat >> /data/etc/db_install.rsp << EOF
oracle.install.option=INSTALL_DB_SWONLY
DECLINE_SECURITY_UPDATES=true
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/data/app/oracle/inventory
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOSTNAME=oracle11g
ORACLE_HOME=/data/app/oracle/product/11.2.0
ORACLE_BASE=/data/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.isCustomInstall=true
oracle.install.db.DBA_GROUP=dba
oracle.install.db.OPER_GROUP=dba
EOF
[root@oracle11g binary]# cat -n /data/etc/db_install.rsp
1 ####################################################################
2 ## Copyright(c) Oracle Corporation 1998,2008. All rights reserved.##
3 ## ##
4 ## Specify values for the variables listed below to customize ##
5 ## your installation. ##
6 ## ##
7 ## Each variable is associated with a comment. The comment ##
8 ## can help to populate the variables with the appropriate ##
9 ## values. ##
10 ## ##
11 ## IMPORTANT NOTE: This file contains plain text passwords and ##
12 ## should be secured to have read permission only by oracle user ##
13 ## or db administrator who owns this installation. ##
14 ## ##
15 ####################################################################
16
17 #------------------------------------------------------------------------------
18 # Do not change the following system generated value.
19 #------------------------------------------------------------------------------
20 oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0
21
22 #------------------------------------------------------------------------------
23 # Specify the installation option.
24 # It can be one of the following:
25 # 1. INSTALL_DB_SWONLY
26 # 2. INSTALL_DB_AND_CONFIG
27 # 3. UPGRADE_DB
28 #-------------------------------------------------------------------------------
29 oracle.install.option=
30
31 #-------------------------------------------------------------------------------
32 # Specify the hostname of the system as set during the install. It can be used
33 # to force the installation to use an alternative hostname rather than using the
34 # first hostname found on the system. (e.g., for systems with multiple hostnames
35 # and network interfaces)
36 #-------------------------------------------------------------------------------
37 ORACLE_HOSTNAME=
38
39 #-------------------------------------------------------------------------------
40 # Specify the Unix group to be set for the inventory directory.
41 #-------------------------------------------------------------------------------
42 UNIX_GROUP_NAME=
43
44 #-------------------------------------------------------------------------------
45 # Specify the location which holds the inventory files.
46 #-------------------------------------------------------------------------------
47 INVENTORY_LOCATION=
48
49 #-------------------------------------------------------------------------------
50 # Specify the languages in which the components will be installed.
51 #
52 # en : English ja : Japanese
53 # fr : French ko : Korean
54 # ar : Arabic es : Latin American Spanish
55 # bn : Bengali lv : Latvian
56 # pt_BR: Brazilian Portuguese lt : Lithuanian
57 # bg : Bulgarian ms : Malay
58 # fr_CA: Canadian French es_MX: Mexican Spanish
59 # ca : Catalan no : Norwegian
60 # hr : Croatian pl : Polish
61 # cs : Czech pt : Portuguese
62 # da : Danish ro : Romanian
63 # nl : Dutch ru : Russian
64 # ar_EG: Egyptian zh_CN: Simplified Chinese
65 # en_GB: English (Great Britain) sk : Slovak
66 # et : Estonian sl : Slovenian
67 # fi : Finnish es_ES: Spanish
68 # de : German sv : Swedish
69 # el : Greek th : Thai
70 # iw : Hebrew zh_TW: Traditional Chinese
71 # hu : Hungarian tr : Turkish
72 # is : Icelandic uk : Ukrainian
73 # in : Indonesian vi : Vietnamese
74 # it : Italian
75 #
76 # Example : SELECTED_LANGUAGES=en,fr,ja
77 #------------------------------------------------------------------------------
78 SELECTED_LANGUAGES=
79
80 #------------------------------------------------------------------------------
81 # Specify the complete path of the Oracle Home.
82 #------------------------------------------------------------------------------
83 ORACLE_HOME=
84
85 #------------------------------------------------------------------------------
86 # Specify the complete path of the Oracle Base.
87 #------------------------------------------------------------------------------
88 ORACLE_BASE=
89
90 #------------------------------------------------------------------------------
91 # Specify the installation edition of the component.
92 #
93 # The value should contain only one of these choices.
94 # EE : Enterprise Edition
95 # SE : Standard Edition
96 # SEONE : Standard Edition One
97 # PE : Personal Edition (WINDOWS ONLY)
98 #------------------------------------------------------------------------------
99 oracle.install.db.InstallEdition=
100
101 #------------------------------------------------------------------------------
102 # This variable is used to enable or disable custom install.
103 #
104 # true : Components mentioned as part of 'customComponents' property
105 # are considered for install.
106 # false : Value for 'customComponents' is not considered.
107 #------------------------------------------------------------------------------
108 oracle.install.db.isCustomInstall=false
109
110 #------------------------------------------------------------------------------
111 # This variable is considered only if 'IsCustomInstall' is set to true.
112 #
113 # Description: List of Enterprise Edition Options you would like to install.
114 #
115 # The following choices are available. You may specify any
116 # combination of these choices. The components you choose should
117 # be specified in the form "internal-component-name:version"
118 # Below is a list of components you may specify to install.
119 #
120 # oracle.rdbms.partitioning:11.2.0.1.0 - Oracle Partitioning
121 # oracle.rdbms.dm:11.2.0.1.0 - Oracle Data Mining
122 # oracle.rdbms.dv:11.2.0.1.0 - Oracle Database Vault
123 # oracle.rdbms.lbac:11.2.0.1.0 - Oracle Label Security
124 # oracle.rdbms.rat:11.2.0.1.0 - Oracle Real Application Testing
125 # oracle.oraolap:11.2.0.1.0 - Oracle OLAP
126 #------------------------------------------------------------------------------
127 oracle.install.db.customComponents=oracle.server:11.2.0.1.0,oracle.sysman.ccr:10.2.7.0.0,oracle.xdk:11.2.0.1.0,oracle.rdbms.oci:11.2.0.1.0,oracle.network:11.2.0.1.0,oracle.network.listener:11.2.0.1.0,oracle.rdbms:11.2.0.1.0,oracle.options:11.2.0.1.0,oracle.rdbms.partitioning:11.2.0.1.0,oracle.oraolap:11.2.0.1.0,oracle.rdbms.dm:11.2.0.1.0,oracle.rdbms.dv:11.2.0.1.0,orcle.rdbms.lbac:11.2.0.1.0,oracle.rdbms.rat:11.2.0.1.0
128
129 ###############################################################################
130 # #
131 # PRIVILEGED OPERATING SYSTEM GROUPS #
132 # ------------------------------------------ #
133 # Provide values for the OS groups to which OSDBA and OSOPER privileges #
134 # needs to be granted. If the install is being performed as a member of the #
135 # group "dba", then that will be used unless specified otherwise below. #
136 # #
137 ###############################################################################
138
139 #------------------------------------------------------------------------------
140 # The DBA_GROUP is the OS group which is to be granted OSDBA privileges.
141 #------------------------------------------------------------------------------
142 oracle.install.db.DBA_GROUP=
143
144 #------------------------------------------------------------------------------
145 # The OPER_GROUP is the OS group which is to be granted OSOPER privileges.
146 #------------------------------------------------------------------------------
147 oracle.install.db.OPER_GROUP=
148
149 #------------------------------------------------------------------------------
150 # Specify the cluster node names selected during the installation.
151 #------------------------------------------------------------------------------
152 oracle.install.db.CLUSTER_NODES=
153
154 #------------------------------------------------------------------------------
155 # Specify the type of database to create.
156 # It can be one of the following:
157 # - GENERAL_PURPOSE/TRANSACTION_PROCESSING
158 # - DATA_WAREHOUSE
159 #------------------------------------------------------------------------------
160 oracle.install.db.config.starterdb.type=
161
162 #------------------------------------------------------------------------------
163 # Specify the Starter Database Global Database Name.
164 #------------------------------------------------------------------------------
165 oracle.install.db.config.starterdb.globalDBName=
166
167 #------------------------------------------------------------------------------
168 # Specify the Starter Database SID.
169 #------------------------------------------------------------------------------
170 oracle.install.db.config.starterdb.SID=
171
172 #------------------------------------------------------------------------------
173 # Specify the Starter Database character set.
174 #
175 # It can be one of the following:
176 # AL32UTF8, WE8ISO8859P15, WE8MSWIN1252, EE8ISO8859P2,
177 # EE8MSWIN1250, NE8ISO8859P10, NEE8ISO8859P4, BLT8MSWIN1257,
178 # BLT8ISO8859P13, CL8ISO8859P5, CL8MSWIN1251, AR8ISO8859P6,
179 # AR8MSWIN1256, EL8ISO8859P7, EL8MSWIN1253, IW8ISO8859P8,
180 # IW8MSWIN1255, JA16EUC, JA16EUCTILDE, JA16SJIS, JA16SJISTILDE,
181 # KO16MSWIN949, ZHS16GBK, TH8TISASCII, ZHT32EUC, ZHT16MSWIN950,
182 # ZHT16HKSCS, WE8ISO8859P9, TR8MSWIN1254, VN8MSWIN1258
183 #------------------------------------------------------------------------------
184 oracle.install.db.config.starterdb.characterSet=AL32UTF8
185
186 #------------------------------------------------------------------------------
187 # This variable should be set to true if Automatic Memory Management
188 # in Database is desired.
189 # If Automatic Memory Management is not desired, and memory allocation
190 # is to be done manually, then set it to false.
191 #------------------------------------------------------------------------------
192 oracle.install.db.config.starterdb.memoryOption=true
193
194 #------------------------------------------------------------------------------
195 # Specify the total memory allocation for the database. Value(in MB) should be
196 # at least 256 MB, and should not exceed the total physical memory available
197 # on the system.
198 # Example: oracle.install.db.config.starterdb.memoryLimit=512
199 #------------------------------------------------------------------------------
200 oracle.install.db.config.starterdb.memoryLimit=
201
202 #------------------------------------------------------------------------------
203 # This variable controls whether to load Example Schemas onto the starter
204 # database or not.
205 #------------------------------------------------------------------------------
206 oracle.install.db.config.starterdb.installExampleSchemas=false
207
208 #------------------------------------------------------------------------------
209 # This variable includes enabling audit settings, configuring password profiles
210 # and revoking some grants to public. These settings are provided by default.
211 # These settings may also be disabled.
212 #------------------------------------------------------------------------------
213 oracle.install.db.config.starterdb.enableSecuritySettings=true
214
215 ###############################################################################
216 # #
217 # Passwords can be supplied for the following four schemas in the #
218 # starter database: #
219 # SYS #
220 # SYSTEM #
221 # SYSMAN (used by Enterprise Manager) #
222 # DBSNMP (used by Enterprise Manager) #
223 # #
224 # Same password can be used for all accounts (not recommended) #
225 # or different passwords for each account can be provided (recommended) #
226 # #
227 ###############################################################################
228
229 #------------------------------------------------------------------------------
230 # This variable holds the password that is to be used for all schemas in the
231 # starter database.
232 #-------------------------------------------------------------------------------
233 oracle.install.db.config.starterdb.password.ALL=
234
235 #-------------------------------------------------------------------------------
236 # Specify the SYS password for the starter database.
237 #-------------------------------------------------------------------------------
238 oracle.install.db.config.starterdb.password.SYS=
239
240 #-------------------------------------------------------------------------------
241 # Specify the SYSTEM password for the starter database.
242 #-------------------------------------------------------------------------------
243 oracle.install.db.config.starterdb.password.SYSTEM=
244
245 #-------------------------------------------------------------------------------
246 # Specify the SYSMAN password for the starter database.
247 #-------------------------------------------------------------------------------
248 oracle.install.db.config.starterdb.password.SYSMAN=
249
250 #-------------------------------------------------------------------------------
251 # Specify the DBSNMP password for the starter database.
252 #-------------------------------------------------------------------------------
253 oracle.install.db.config.starterdb.password.DBSNMP=
254
255 #-------------------------------------------------------------------------------
256 # Specify the management option to be selected for the starter database.
257 # It can be one of the following:
258 # 1. GRID_CONTROL
259 # 2. DB_CONTROL
260 #-------------------------------------------------------------------------------
261 oracle.install.db.config.starterdb.control=DB_CONTROL
262
263 #-------------------------------------------------------------------------------
264 # Specify the Management Service to use if Grid Control is selected to manage
265 # the database.
266 #-------------------------------------------------------------------------------
267 oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=
268
269 #-------------------------------------------------------------------------------
270 # This variable indicates whether to receive email notification for critical
271 # alerts when using DB control.
272 #-------------------------------------------------------------------------------
273 oracle.install.db.config.starterdb.dbcontrol.enableEmailNotification=false
274
275 #-------------------------------------------------------------------------------
276 # Specify the email address to which the notifications are to be sent.
277 #-------------------------------------------------------------------------------
278 oracle.install.db.config.starterdb.dbcontrol.emailAddress=
279
280 #-------------------------------------------------------------------------------
281 # Specify the SMTP server used for email notifications.
282 #-------------------------------------------------------------------------------
283 oracle.install.db.config.starterdb.dbcontrol.SMTPServer=
284
285
286 ###############################################################################
287 # #
288 # SPECIFY BACKUP AND RECOVERY OPTIONS #
289 # ------------------------------------ #
290 # Out-of-box backup and recovery options for the database can be mentioned #
291 # using the entries below. #
292 # #
293 ###############################################################################
294
295 #------------------------------------------------------------------------------
296 # This variable is to be set to false if automated backup is not required. Else
297 # this can be set to true.
298 #------------------------------------------------------------------------------
299 oracle.install.db.config.starterdb.automatedBackup.enable=false
300
301 #------------------------------------------------------------------------------
302 # Regardless of the type of storage that is chosen for backup and recovery, if
303 # automated backups are enabled, a job will be scheduled to run daily at
304 # 2:00 AM to backup the database. This job will run as the operating system
305 # user that is specified in this variable.
306 #------------------------------------------------------------------------------
307 oracle.install.db.config.starterdb.automatedBackup.osuid=
308
309 #-------------------------------------------------------------------------------
310 # Regardless of the type of storage that is chosen for backup and recovery, if
311 # automated backups are enabled, a job will be scheduled to run daily at
312 # 2:00 AM to backup the database. This job will run as the operating system user
313 # specified by the above entry. The following entry stores the password for the
314 # above operating system user.
315 #-------------------------------------------------------------------------------
316 oracle.install.db.config.starterdb.automatedBackup.ospwd=
317
318 #-------------------------------------------------------------------------------
319 # Specify the type of storage to use for the database.
320 # It can be one of the following:
321 # - FILE_SYSTEM_STORAGE
322 # - ASM_STORAGE
323 #------------------------------------------------------------------------------
324 oracle.install.db.config.starterdb.storageType=
325
326 #-------------------------------------------------------------------------------
327 # Specify the database file location which is a directory for datafiles, control
328 # files, redo logs.
329 #
330 # Applicable only when oracle.install.db.config.starterdb.storage=FILE_SYSTEM
331 #-------------------------------------------------------------------------------
332 oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=
333
334 #-------------------------------------------------------------------------------
335 # Specify the backup and recovery location.
336 #
337 # Applicable only when oracle.install.db.config.starterdb.storage=FILE_SYSTEM
338 #-------------------------------------------------------------------------------
339 oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=
340
341 #-------------------------------------------------------------------------------
342 # Specify the existing ASM disk groups to be used for storage.
343 #
344 # Applicable only when oracle.install.db.config.starterdb.storage=ASM
345 #-------------------------------------------------------------------------------
346 oracle.install.db.config.asm.diskGroup=
347
348 #-------------------------------------------------------------------------------
349 # Specify the password for ASMSNMP user of the ASM instance.
350 #
351 # Applicable only when oracle.install.db.config.starterdb.storage=ASM_SYSTEM
352 #-------------------------------------------------------------------------------
353 oracle.install.db.config.asm.ASMSNMPPassword=
354
355 #------------------------------------------------------------------------------
356 # Specify the My Oracle Support Account Username.
357 #
358 # Example : MYORACLESUPPORT_USERNAME=metalink
359 #------------------------------------------------------------------------------
360 MYORACLESUPPORT_USERNAME=
361
362 #------------------------------------------------------------------------------
363 # Specify the My Oracle Support Account Username password.
364 #
365 # Example : MYORACLESUPPORT_PASSWORD=password
366 #------------------------------------------------------------------------------
367 MYORACLESUPPORT_PASSWORD=
368
369 #------------------------------------------------------------------------------
370 # Specify whether to enable the user to set the password for
371 # My Oracle Support credentials. The value can be either true or false.
372 # If left blank it will be assumed to be false.
373 #
374 # Example : SECURITY_UPDATES_VIA_MYORACLESUPPORT=true
375 #------------------------------------------------------------------------------
376 SECURITY_UPDATES_VIA_MYORACLESUPPORT=
377
378 #------------------------------------------------------------------------------
379 # Specify whether user wants to give any proxy details for connection.
380 # The value can be either true or false. If left blank it will be assumed
381 # to be false.
382 #
383 # Example : DECLINE_SECURITY_UPDATES=false
384 #------------------------------------------------------------------------------
385 DECLINE_SECURITY_UPDATES=
386
387 #------------------------------------------------------------------------------
388 # Specify the Proxy server name. Length should be greater than zero.
389 #
390 # Example : PROXY_HOST=proxy.domain.com
391 #------------------------------------------------------------------------------
392 PROXY_HOST=
393
394 #------------------------------------------------------------------------------
395 # Specify the proxy port number. Should be Numeric and atleast 2 chars.
396 #
397 # Example : PROXY_PORT=25
398 #------------------------------------------------------------------------------
399 PROXY_PORT=
400
401 #------------------------------------------------------------------------------
402 # Specify the proxy user name. Leave PROXY_USER and PROXY_PWD
403 # blank if your proxy server requires no authentication.
404 #
405 # Example : PROXY_USER=username
406 #------------------------------------------------------------------------------
407 PROXY_USER=
408
409 #------------------------------------------------------------------------------
410 # Specify the proxy password. Leave PROXY_USER and PROXY_PWD
411 # blank if your proxy server requires no authentication.
412 #
413 # Example : PROXY_PWD=password
414 #------------------------------------------------------------------------------
415 PROXY_PWD=
416 oracle.install.option=INSTALL_DB_SWONLY
417 DECLINE_SECURITY_UPDATES=true
418 UNIX_GROUP_NAME=oinstall
419 INVENTORY_LOCATION=/data/app/oracle/inventory
420 SELECTED_LANGUAGES=en,zh_CN
421 ORACLE_HOSTNAME=oracle11g
422 ORACLE_HOME=/data/app/oracle/product/11.2.0
423 ORACLE_BASE=/data/app/oracle
424 oracle.install.db.InstallEdition=EE
425 oracle.install.db.isCustomInstall=true
426 oracle.install.db.DBA_GROUP=dba
427 oracle.install.db.OPER_GROUP=dba
[root@oracle11g binary]#
安装Oracle
[root@oracle11g binary]# su - oracle
[oracle@oracle11g ~]$ cd /data/database/
[oracle@oracle11g database]$ ls -F
doc/ install/ response/ rpm/ runInstaller* sshsetup/ stage/ welcome.html
[oracle@oracle11g database]$ echo $PATH
.:/product/11.2.0//bin:/product/11.2.0//OPatch:/product/11.2.0//jdk/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/oracle/.local/bin:/home/oracle/bin
[oracle@oracle11g database]$
[oracle@oracle11g database]$ ./runInstaller -silent -responseFile /data/etc/db_install.rsp -ignorePrereq
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 120 MB. Actual 37125 MB Passed
Checking swap space: must be greater than 150 MB. Actual 2047 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2020-04-22_01-38-42PM. Please wait ...[oracle@oracle11g database]$ [WARNING] [INS-32055] The Central Inventory is located in the Oracle base.
CAUSE: The Central Inventory is located in the Oracle base.
ACTION: Oracle recommends placing this Central Inventory in a location outside the Oracle base directory.
[WARNING] [INS-32055] The Central Inventory is located in the Oracle base.
CAUSE: The Central Inventory is located in the Oracle base.
ACTION: Oracle recommends placing this Central Inventory in a location outside the Oracle base directory.
You can find the log of this install session at:
/data/app/oracle/inventory/logs/installActions2020-04-22_01-38-42PM.log
The following configuration scripts need to be executed as the "root" user.
#!/bin/sh
#Root scripts to run
/data/app/oracle/inventory/orainstRoot.sh
/data/app/oracle/product/11.2.0/root.sh
To execute the configuration scripts:
- Open a terminal window
- Log in as "root"
- Run the scripts
- Return to this window and hit "Enter" key to continue
Successfully Setup Software.
【这个提示说明Oracle已经成功安装了,需要用root用户来执行一下相关脚本,现在新开一个tty窗口来用root用户执行脚本】
孟伯 ,20200426
交流联系:微信 1807479153 ,QQ 1807479153