Misc Notes

Install oracle11g on oracle linux 7

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
# official preinstall
sudo yum install oracle-rdbms-server-11gR2-preinstall

# other prerequirments
sudo yum install binutils compat-libcap1 compat-libstdc++ gcc gcc-c++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libXi libXtst make sysstat cpp elfutils elfutils-libelf elfutils-libelf-devel elfutils-libs glibc-common glibc-headers libgomp mpfrnss-softokn-freebl sysstat tzdata-java unixODBC unixODBC-devel cloog-ppl kernel-headers libtool-ltdl ppl

# folders
sudo mkdir -p /opt/oracle
sudo mkdir -p /opt/oracle/product/112010/db_1
sudo mkdir /opt/oracle/oradata
sudo mkdir /opt/oracle/inventory
sudo mkdir /opt/oracle/flash_recovery_area
sudo chown -R oracle:oinstall /opt/oracle
sudo chmod -R 775 /opt/oracle

# db_install.rsp
vi /home/oracle/database/response/db_install.rsp

oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=xxxx
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/opt/oracle/inventory
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/opt/oracle/product/112010/db_1
ORACLE_BASE=/opt/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.DBA_GROUP=oinstall
oracle.install.db.OPER_GROUP=oinstall
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
oracle.install.db.config.starterdb.globalDBName=orcl
oracle.install.db.config.starterdb.SID=orcl
oracle.install.db.config.starterdb.memoryLimit=1024
oracle.install.db.config.starterdb.password.ALL=xxxx
DECLINE_SECURITY_UPDATES=true

./runInstaller -silent -responseFile /home/oracle/database/response/db_install.rsp -ignorePrereq

# create listener
vi /home/oracle/database/response/netca.rsp

INSTALL_TYPE=""custom""
LISTENER_NUMBER=1
LISTENER_NAMES={"LISTENER"}
LISTENER_PROTOCOLS={"TCP;1521"}
LISTENER_START=""LISTENER""

export DISPLAY=127.0.0.1:0.0
netca -silent -responseFile /home/oracle/database/response/netca.rsp

# create database
vi /home/oracle/database/response/dbca.rsp

RESPONSEFILE_VERSION = "11.2.0"
OPERATION_TYPE = "createDatabase"
GDBNAME = "orcl"
SID = "ORCL"
TEMPLATENAME = "General_Purpose.dbc"
SYSPASSWORD = "oracle"
SYSTEMPASSWORD = "sys"
SYSMANPASSWORD = "sys"
DBSNMPPASSWORD = "sys"
DATAFILEDESTINATION = /opt/oracle/oradata
RECOVERYAREADESTINATION = /opt/oracle/flash_recovery_area
CHARACTERSET = "ZHS16GBK"
TOTALMEMORY = "10240"

dbca -silent -responseFile /home/oracle/database/response/dbca.rsp

# edit scripts
vi /opt/oracle/product/112010/db_1/bin/dbstart
ORACLE_HOME_LISTNER=$ORACLE_HOME

vi /opt/oracle/product/112010/db_1/bin/dbshut
ORACLE_HOME_LISTNER=$ORACLE_HOME

vi /etc/oratab
orcl:/opt/oracle/product/112010/db_1:Y

# other
sudo firewall-cmd --zone=public --add-port=1521/tcp --permanent
sudo firewall-cmd --reload