1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
| ###########################
## INSTALLATION SILENT MODE
###########################
yum update
vim /etc/hosts
<IP-address> <fully-qualified-machine-name> <machine-name>
#groups for database management
groupadd -g 54321 oinstall
groupadd -g 54322 dba
groupadd -g 54323 oper
groupadd -g 54324 backupdba
groupadd -g 54325 dgdba
groupadd -g 54326 kmdba
groupadd -g 54327 asmdba
groupadd -g 54328 asmoper
groupadd -g 54329 asmadmin
useradd -u 54321 -g oinstall -G dba,oper,backupdba,dgdba,kmdba oracle
passwd oracle
# install packages dependencies
vim /etc/sysctl.conf
>>>
--kernel parameters for 12gR1 installation
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
>>>
/sbin/sysctl -p
vim /etc/security/limits.conf
>>>
--shell limits for users oracle 12gR1
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
>>>
# Bash profile for oracle user
vim /home/oracle/.bash_profile
>>>
# Oracle Settings
export TMP=/tmp
export ORACLE_HOSTNAME= [oel6.dbaora.com](http://oel6.dbaora.com)
export ORACLE_UNQNAME=ORA12C
export ORACLE_BASE=/ora01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1
export ORACLE_SID=ORA12C
PATH=/usr/sbin:$PATH:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
alias cdob='cd $ORACLE_BASE'
alias cdoh='cd $ORACLE_HOME'
alias tns='cd $ORACLE_HOME/network/admin'
alias envo='env | grep ORACLE'
umask 022
envo
>>>
# Directory structure
mkdir -p /ora01/app/oracle/product/12.1.0/db_1
chown oracle:oinstall -R /ora01
# Setting selinux permissive
vim /etc/selinux/config
>>>
SELINUX=permissive
setenforce Permissive
>>>
# Disable firewall
service iptables stop
chkconfig iptables off
# From now, use oracle user and set response files
./runInstaller -silent -responseFile /home/oracle/database/response/db_install.rsp
sqlplus / as sysdba
netca -silent -responseFile /home/oracle/database/response/netca.rsp
lsnrctl status
mkdir /ora01/app/oracle/oradata
mkdir /ora01/app/oracle/flash_recovery_area
dbca -silent -responseFile /home/oracle/database/response/dbca.rsp
# Verifying
sqlplus / as sysdba
show parameter db_name
show con_id
show con_name
select DBMS_XDB_CONFIG.GETHTTPSPORT from dual;
# Set ORA12C to Y
vim /etc/oratab
>>>
ORA12C:/ora01/app/oracle/product/12.1.0/db_1:Y
>>>
#######################
### INSTALLATION
#######################
ip a | grep inet # set ip address
# add required groups
/usr/sbin/groupadd -g 501 oinstall
/usr/sbin/groupadd -g 502 dba
/usr/sbin/groupadd -g 503 oper
# oracle user
/usr/sbin/useradd -u 502 -g oinstall -G dba,oper oracle
passwd oracle
# Kernel configurations
vim /etc/sysctl.conf
>>>
kernel.shmmni = 4096
kernel.shmmax = 4398046511104
kernel.shmall = 1073741824
kernel.sem = 250 32000 100 128
fs.aio-max-nr = 1048576
fs.file-max = 6815744
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
>>>
# apply changes
/sbin/sysctl -p
# shell limits
vim /etc/security/limits.conf
>>>
oracle soft nproc 131072
oracle hard nproc 131072
oracle soft nofile 131072
oracle hard nofile 131072
oracle soft core unlimited
oracle hard core unlimited
oracle soft memlock 50000000
oracle hard memlock 50000000
>>>
# update oracle bash profile
vim /home/oracle/.bash_profile
>>>
#Oracle Settings
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=O7-unixmen
export ORACLE_UNQNAME=orcl
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1
export ORACLE_SID=orcl
export PATH=/usr/sbin:$PATH
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
>>>
# required packages
yum groupinstall "GNOME Desktop" -y
yum groupinstall "Development Tools" -y
yum install binutils -y
yum install compat-libstdc++-33 -y
yum install compat-libstdc++-33.i686 -y
yum install gcc -y
yum install gcc-c++ -y
yum install glibc -y
yum install glibc.i686 -y
yum install glibc-devel -y
yum install glibc-devel.i686 -y
yum install ksh -y
yum install libgcc -y
yum install libgcc.i686 -y
yum install libstdc++ -y
yum install libstdc++.i686 -y
yum install libstdc++-devel -y
yum install libstdc++-devel.i686 -y
yum install libaio -y
yum install libaio.i686 -y
yum install libaio-devel -y
yum install libaio-devel.i686 -y
yum install libXext -y
yum install libXext.i686 -y
yum install libXtst -y
yum install libXtst.i686 -y
yum install libX11 -y
yum install libX11.i686 -y
yum install libXau -y
yum install libXau.i686 -y
yum install libxcb -y
yum install libxcb.i686 -y
yum install libXi -y
yum install libXi.i686 -y
yum install make -y
yum install sysstat -y
yum install unixODBC -y
yum install unixODBC-devel -y
yum install zlib-devel -y
# set directory
mkdir -p /u01/app/oracle/product/12.1.0
chown -R oracle:oinstall /u01/
chmod 775 /u01/app
# disable selinux
vim /etc/selinux/config
SELINUX=permissive
# install oracle
su - oracle
unzip linuxamd64_12c_database_1of2.zip
unzip linuxamd64_12c_database_2of2.zip
cd database
./runInstaller
# with GUI
yum groupinstall "GNOME Desktop" -y
xhost + # as root.
export DISPLAY=:0.0 # as oracle
# After installation
vi /etc/oratab
orcl:/u01/app/oracle/product/12.1.0/db_1:Y
# testing commands
lsnrctl
LSNRCTL> status
# starting oracle service
dbstart /u01/app/oracle/product/12.1.0/db_1
dbstart `echo $ORACLE_HOME`
$ sqlplus /nolog
SQL> connect / as sysdba
SQL> startup
|