내맘대로긍정이 알려주는
Oracle 23ai 신기능
무료 세미나 발표자료
OS환경 : Oracle Linux 7.2 (64bit)
DB 환경 : Oracle Database 18c (Exa only) V974953-01
방법 : Oracle 18c Exa 버전 silent mode 설치 메뉴얼(정식18c 버전X)
설치파일 다운로드
HARDWARE 구성 정보
1
2
3
4
|
RAM 4GB,
HDD 50GB,
OS CD : Oracle Linux Release 7 Update 2 for x86_64 (64 Bit)
DB 설치파일 : Oracle Database (Exadata and SuperCluster) 18.0.0.0.0 for Linux x86-64(V974953-01.zip)
|
호스트 네임 : oracle18
Network 설정
1
2
3
4
|
eth0
IP/Netmask/GW
192.168.0.60/255.255.255.0/192.168.0.1
DNS 168.126.63.1
|
파티션 설정
1
2
|
swap 4000
/ max size
|
/etc/hosts 설정
1
2
3
|
# vi /etc/hosts
# Public(eth0)
192.168.0.60 oracle18 oracle18
|
자동 환경 설정
1
|
# yum -y install oracle-database-server-12cR2-preinstall
|
환경 설정 수동
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# vi /etc/sysctl.conf
fs.file-max = 6815744
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.panic_on_oops = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.default.rp_filter = 2
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500
|
sysctl -p 로 확인
limits.conf 설정
1
2
3
4
5
6
7
|
# vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
vi /etc/pam.d/login
Session required pam_limits.so
|
profile 설정
1
2
3
4
5
6
7
8
9
10
|
# vi /etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
umask 022
fi
|
필수 RPM 설치
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
|
# vi yum.sh
yum install -y binutils-2.20.51.0.2-5.36.el6
yum install -y compat-libcap1-1.10-1
yum install -y compat-libstdc++-33-3.2.3-69.el6
yum install -y compat-libstdc++-33-3.2.3-69.el6
yum install -y e2fsprogs-1.41.12-14.el6
yum install -y e2fsprogs-libs-1.41.12-14.el6
yum install -y glibc-2.12-1.7.el6
yum install -y glibc-2.12-1.7.el6
yum install -y glibc-devel-2.12-1.7.el6
yum install -y glibc-devel-2.12-1.7.el6
yum install -y ksh
yum install -y libaio-0.3.107-10.el6
yum install -y libaio-0.3.107-10.el6
yum install -y libaio-devel-0.3.107-10.el6
yum install -y libaio-devel-0.3.107-10.el6
yum install -y libX11-1.5.0-4.el6
yum install -y libX11-1.5.0-4.el6
yum install -y libXau-1.0.6-4.el6
yum install -y libXau-1.0.6-4.el6
yum install -y libXi-1.3
yum install -y libXi-1.3
yum install -y libXtst-1.0.99.2
yum install -y libXtst-1.0.99.2
yum install -y libgcc-4.4.4-13.el6
yum install -y libgcc-4.4.4-13.el6
yum install -y libstdc++-4.4.4-13.el6
yum install -y libstdc++-4.4.4-13.el6
yum install -y libstdc++-devel-4.4.4-13.el6
yum install -y libstdc++-devel-4.4.4-13.el6
yum install -y libxcb-1.8.1-1.el6
yum install -y libxcb-1.8.1-1.el6
yum install -y make-3.81-19.el6
yum install -y smartmontools-5.43-1.el6
yum install -y sysstat-9.0.4-11.el6
yum install -y kmod-oracleasm
yum install -y oracleasm-support*
yum install -y oracleasm*
yum install -y oracleasmlib
yum install -y devel gcc
yum install -y gcc-c++
yum install -y libaio-devel
yum install -y unixODBC
# sh yum.sh*network
사정상 한번에 설치 안될 수 있으니*sh yum.sh 한 세번정도 입력
Loaded plugins: refresh-packagekit, security, ulninfoExisting lock /var/run/yum.pid:
another copy is running as pid 3393.Another app is currently holding the yum lock;
waiting for it to exit... The other application is:
PackageKit Memory : 43 M RSS (360 MB VSZ)
Started: Fri Jan 13 19:59:18 2017 - 03:40 ago
State : Running, pid: 3393
이런 메세지가 나타나면 새 세션 열어서
# rm -rf /var/run/yum.pid
|
그룹 및 유저 생성
1
2
|
# groupadd dba -g 500
# useradd oracle -g 500 -G 500
|
패스워드 설정
1
|
# passwd oracle
|
설치 디렉토리 생성(oracle database SW 설치용)
1
2
3
4
5
6
|
$ mkdir -p /app/oraInventory
$ mkdir -p /app/oracle/cfgtoollogs
$ mkdir -p /app/oracle/product/18.1.0/db_1
$ chown -R oracle:dba /app
$ chmod -R 775 /app
|
ftp로 /app/oracle/product/18.1.0/db_1/에 DB 설치파일 넣어주기
(이전 버전까지는 /app/media/ 에 넣는경우가 보통이었는데
18c 부터는 설치파일 압축을 푼 곳이 곧 ORACLE_HOME이 되기 때문에 위에 적은 위치에 압축을 해제함)
.bash_profile 수정
1
2
3
4
5
6
7
8
9
10
11
12
13
|
# su - oracle
$ vi .bash_profile
export TMP=/app/tmp;
export TMPDIR=$TMP;
export ORACLE_HOSTNAME=orcl;
export ORACLE_UNQNAME=orcl;
export ORACLE_BASE=/app/oracle;
export DB_HOME=$ORACLE_BASE/product/18.1.0/db_1;
export ORACLE_HOME=$DB_HOME;
export ORACLE_SID=orcl;
export PATH=/usr/sbin:$PATH:$ORACLE_HOME/bin:$PATH;
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
|
적용
1
|
$ . ./.bash_profile
|
엔진 압축 해제
1
2
|
$ cd /app/oracle/product/18.1.0/db_1/
$ unzip V974953-01.zip
|
response 파일 경로로 이동 후 파일 복제
1
2
3
|
$ cd $ORACLE_HOME/install/response/
$ cp db_install.rsp ~/db_install.rsp
$ cd ~
|
rsp 파일 열어서 수정
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
$ vi db_install.rsp
각부분 아래와 같이 수정
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v18.0.0
oracle.install.option=INSTALL_DB_SWONLY
UNIX_GROUP_NAME=dba
INVENTORY_LOCATION=/app/oraInventory
ORACLE_HOME=/app/oracle/product/18.1.0/db_1
ORACLE_BASE=/app/oracle
oracle.install.db.InstallEdition=EE
oracle.install.db.OSDBA_GROUP=dba
oracle.install.db.OSOPER_GROUP=dba
oracle.install.db.OSBACKUPDBA_GROUP=dba
oracle.install.db.OSDGDBA_GROUP=dba
oracle.install.db.OSKMDBA_GROUP=dba
oracle.install.db.OSRACDBA_GROUP=dba
|
설치 전 사전 검증
1
2
3
4
5
6
7
|
$ cd $ORACLE_HOME
$ ./runInstaller -silent -executePrereqs -responseFile ~/db_install.rsp
Launching Oracle Database Setup Wizard...
[WARNING] [INS-13014] Target environment does not meet some optional requirements.
CAUSE: Some of the optional prerequisites are not met. See logs for details. /tmp/InstallActions2018-06-27_10-49-40AM/installActions2018-06-27_10-49-40AM.log
ACTION: Identify the list of failed prerequisite checks from the log: /tmp/InstallActions2018-06-27_10-49-40AM/installActions2018-06-27_10-49-40AM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
|
로그 확인
1
2
3
4
5
6
7
|
-------------List of failed Tasks------------------
INFO: [Jun 27, 2018 10:50:02 AM] *********************************************
INFO: [Jun 27, 2018 10:50:02 AM] Physical Memory: This is a prerequisite condition to test whether the system has at least 8GB (8388608.0KB) of total physical memory.
INFO: [Jun 27, 2018 10:50:02 AM] Severity:IGNORABLE
INFO: [Jun 27, 2018 10:50:02 AM] OverallStatus:VERIFICATION_FAILED
INFO: [Jun 27, 2018 10:50:02 AM]
-----------------End of failed Tasks List----------------
|
로그 확인 결과
물리 메모리가 8GB여야 하는데 그것보다 작아서 아래 경고메세지가 나옴
다른 조건은 모두 충족함
물리메모리를 더 늘리지않고 무시하고 진행
DBMS 설치
1
|
$ ./runInstaller -ignorePrereqFailure -waitforcompletion -silent -responseFile ~/db_install.rsp
|
ignore 옵션 사용방법이 바뀌었음
참고로 18c 이전에는 ignore 옵션을 아래와 같은 방법으로 사용했었음
1
|
$ ./runInstaller -ignoreSysPrereqs -ignorePrereq -waitforcompletion -showProgress -silent -responseFile ~/db_install.rsp
|
실행 후 로그
1
2
3
4
5
6
7
8
|
Launching Oracle Database Setup Wizard...
[WARNING] [INS-13014] Target environment does not meet some optional requirements.
CAUSE: Some of the optional prerequisites are not met. See logs for details. installActions2018-06-27_11-13-22AM.log
ACTION: Identify the list of failed prerequisite checks from the log: installActions2018-06-27_11-13-22AM.log. Then either from the log file or from installation manual find the appropriate configuration to meet the prerequisites and fix it manually.
The response file for this session can be found at:
/app/oracle/product/18.1.0/db_1/install/response/db_2018-06-27_11-13-22AM.rsp
You can find the log of this install session at:
/tmp/InstallActions2018-06-27_11-13-22AM/installActions2018-06-27_11-13-22AM.log
|
인스톨 중인것 확인
새 세션 열어서 로그 확인
1
2
3
4
5
6
7
8
9
10
11
|
$ tail -30f /tmp/InstallActions2018-06-27_11-13-22AM/installActions2018-06-27_11-13-22AM.log
As a root user, execute the following script(s):
1. /app/oraInventory/orainstRoot.sh
2. /app/oracle/product/18.1.0/db_1/root.sh
Execute /app/oraInventory/orainstRoot.sh on the following nodes:
[oracle18]
Execute /oracle/app/oracle/product/18.1.0/db_1/root.sh on the following nodes:
[oracle18]
Successfully Setup Software with warning(s).
Moved the install session logs to:
/app/oraInventory/logs/InstallActions2018-06-27_11-13-22AM
|
새로 열었던 세션에서 root 계정으로 접속
위에 빨간 표시한 스크립트 입력
1
2
|
# /app/oraInventory/orainstRoot.sh
# /app/oracle/product/18.1.0/db_1/root.sh
|
리스너 생성
response 파일 경로로 이동 후 파일 복제
1
2
3
|
$ cd $ORACLE_HOME/assistants/netca
$ cp netca.rsp ~/netca.rsp
$ cd ~
|
=> dbca.rsp, netca.rsp등 파일들이 $ORACLE_HOME/assistants/으로 위치가 변경됨
rsp 파일 열어서 아래와 같은지 확인(수정X)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
$ vi netca.rsp
[GENERAL]
RESPONSEFILE_VERSION="12.2"
CREATE_TYPE="CUSTOM"
[oracle.net.ca]
INSTALLED_COMPONENTS={"server","net8","javavm"}
INSTALL_TYPE=""typical""
LISTENER_NUMBER=1
LISTENER_NAMES={"LISTENER"}
LISTENER_PROTOCOLS={"TCP;1521"}
LISTENER_START=""LISTENER""
NAMING_METHODS={"TNSNAMES","ONAMES","HOSTNAME"}
NSN_NUMBER=1
NSN_NAMES={"EXTPROC_CONNECTION_DATA"}
NSN_SERVICE={"PLSExtProc"}
NSN_PROTOCOLS={"TCP;HOSTNAME;1521"}
|
=> RESPONSEFILE_VERSION 이 12.2 인걸 확인가능함
NETCA 실행
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
$ netca /silent /responseFile ~/netca.rsp
Parsing command line arguments:
Parameter "silent" = true
Parameter "responsefile" = /home/oracle/netca.rsp
Done parsing command line arguments.
Oracle Net Services Configuration:
Profile configuration complete.
Oracle Net Listener Startup:
Running Listener Control:
/oracle/app/oracle/product/18.1.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
|
리스너 상태 확인
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
$ lsnrctl status
LSNRCTL for Linux: Version 18.0.0.0.0 - Production on 27-JUN-2018 11:31:55
Copyright (c) 1991, 2017, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracle18)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 18.0.0.0.0 - Production
Start Date 27-JUN-2018 11:25:14
Uptime 0 days 0 hr. 6 min. 41 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /app/oracle/product/18.1.0/db_1/network/admin/listener.ora
Listener Log File /app/oracle/diag/tnslsnr/oracle18/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracle18)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully
|
DB 설치
DBCA로 바로 설치 시 에러발생
아래 메뉴얼로 진행 시 에러 발생함
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
|
response 파일 경로로 이동 후 파일 복제
$ cd $ORACLE_HOME/assistants/dbca
$ cp dbca.rsp ~/dbca.rsp
$ cd ~
rsp 파일 열어서 수정
$ vi dbca.rsp
각부분 아래와 같이 수정
responseFileVersion=/oracle/assistants/rspfmt_dbca_response_schema_v12.2.0
gdbName=orcl
sid=orcl
databaseConfigType=SI
templateName=General_Purpose.dbc
sysPassword=oracle
systemPassword=oracle
datafileDestination=/app/oracle/oradata
storageType=FS
characterSet=AL32UTF8
nationalCharacterSet=AL16UTF16
listeners=LISTENER
databaseType=MULTIPURPOSE
automaticMemoryManagement=TRUE
totalMemory=1024
DBCA 실행
12c R2부터는 createDatabase 옵션을 추가로 입력해주어야함
$ dbca -silent -createDatabase -responseFile ~/dbca.rsp
실행 후 로그
[WARNING] [DBT-06208] The 'SYS' password entered does not conform to the Oracle recommended standards.
CAUSE:
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
[WARNING] [DBT-06208] The 'SYSTEM' password entered does not conform to the Oracle recommended standards.
CAUSE:
a. Oracle recommends that the password entered should be at least 8 characters in length, contain at least 1 uppercase character, 1 lower case character and 1 digit [0-9].
b.The password entered is a keyword that Oracle does not recommend to be used as password
ACTION: Specify a strong password. If required refer Oracle documentation for guidelines.
Prepare for db operation
=> sys와 system 패스워드가 취약하다고 말하는것 무시해도됨
Prepare for db operation
10% complete
Copying database files
12% complete
[WARNING] ORA-12754: Feature 'startup' is disabled due to missing capability 'Runtime Environment'.
[FATAL] ORA-01034: ORACLE not available
40% complete
100% complete
[FATAL] ORA-01034: ORACLE not available
10% complete
0% complete
Look at the log file "/oracle/app/oracle/cfgtoollogs/dbca/ORAC/ORAC.log" for further details.
=> 설치 진행 중 에러발생(Exa 장비가 아닌데 Exa Only DB를 설치하려고 해서 나는 에러)
|
DBCA로 설치가 안되기 때문에 수동설치 진행
pfile 생성
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
$ cd $ORACLE_HOME/dbs/
$ vi initorcl.ora (파일없어서 생성해야함)
db_name='orcl'
memory_target=1024M
processes =300
audit_file_dest='/app/oracle/admin/orcl/adump'
audit_trail ='db'
db_block_size=8192
db_recovery_file_dest='/app/oracle/fast_recovery_area'
db_recovery_file_dest_size=2G
diagnostic_dest='/app/oracle'
dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'
open_cursors=300
remote_login_passwordfile='EXCLUSIVE'
undo_tablespace='UNDOTBS1'
control_files = '/app/oracle/oradata/orcl/control01.ctl','/app/oracle/oradata/orcl/control02.ctl'
compatible ='18.1.0'
remote_login_passwordfile=EXCLUSIVE
nls_territory='AMERICA'
_exadata_feature_on=true
|
=> 제일 아래 파라미터가 Exa 장비가 아닌데 Exa Only DB를 설치하려고 해서 나는 에러를 발생 안하게 해주는 파라미터
pfile에 적은 경로 생성
1
2
|
$ mkdir -p /app/oracle/admin/orcl/adump
$ mkdir -p /app/oracle/fast_recovery_area
|
sqlplus 에서 nomount 로 startup
1
2
|
$ sqlplus / as sysdba
SQL> startup nomount
|
vi 로 createdb.sql 생성 후 아래 스크립트 입력
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
|
$vi createdb.sql
CREATE DATABASE orcl
LOGFILE
GROUP 1 ('/app/oracle/oradata/orcl/redo01.log') SIZE 10M reuse,
GROUP 2 ('/app/oracle/oradata/orcl/redo02.log') SIZE 10M reuse,
GROUP 3 ('/app/oracle/oradata/orcl/redo03.log') SIZE 10M reuse
MAXLOGFILES 5
MAXLOGMEMBERS 5
MAXLOGHISTORY 1
MAXDATAFILES 100
MAXINSTANCES 1
DATAFILE '/app/oracle/oradata/orcl/system01.dbf' SIZE 325M reuse
AUTOEXTEND ON NEXT 10m MAXSIZE UNLIMITED
UNDO TABLESPACE undotbs1
DATAFILE '/app/oracle/oradata/orcl/undotbs01.dbf' SIZE 600M reuse
AUTOEXTEND ON NEXT 10m MAXSIZE 1000m
sysaux DATAFILE '/app/oracle/oradata/orcl/sysaux01.dbf' SIZE 600M reuse
AUTOEXTEND ON NEXT 10m MAXSIZE UNLIMITED
DEFAULT TEMPORARY TABLESPACE temp
TEMPFILE '/app/oracle/oradata/orcl/temp01.dbf' SIZE 50M REUSE
CHARACTER SET KO16MSWIN949;
@?/rdbms/admin/catalog.sql
@?/rdbms/admin/catproc.sql
@?/sqlplus/admin/pupbld.sql
@?/sqlplus/admin/plustrce.sql
@?/rdbms/admin/utlrp.sql
!echo ---End of File ---
|
sqlplus 에서 @createdb.sql 실행
1
2
|
$ sqlplus / as sysdba
SQL> @createdb.sql
|
정상 설치 후 db 버전 및 상태 확인
1
2
3
4
5
6
7
|
SQL> select instance_name, version, status from v$instance;
INSTANCE_NAME VERSION STATUS
---------------- ----------------- ------------
ORAKHNP 18.0.0.0.0 OPEN
1 row selected.
|
참조 :
'ORACLE > Install' 카테고리의 다른 글
oracle grid opatch 방법 (0) | 2018.11.05 |
---|---|
Oracle Linux 7.2에 Enterprise Manager 에이전트 설치 후기 (0) | 2018.10.08 |
Oracle 12cR2 수동 설치 메뉴얼 (0) | 2018.05.08 |
ORACLE DBA 또는 DB엔지니어의 필수품(OS 별 오라클 설치시 필요한 패치 및 설정 문서. ) (0) | 2018.04.03 |
dbca silent mode deleteDB 실행하기(테스트 db 날릴때 유용) (2) | 2018.03.23 |