[root@sjlabs ~]# id
uid=0(root) gid=0(root) groups=0(root) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
>> 아래 명령어로 생성 후
[root@foxjin3 20250106-22:57:48]:ORAPUPPY:[/root]
$ groupadd -g 54321 dba
[root@foxjin3 20250106-22:57:49]:ORAPUPPY:[/root]
$ useradd -u 54321 -g 54321 oracle
useradd: warning: the home directory already exists.
Not copying any file from skel directory into it.
Creating mailbox file: File exists
[root@foxjin3 20250106-22:57:56]:ORAPUPPY:[/root]
$ id oracle
uid=54321(oracle) gid=54321(dba) groups=54321(dba)
$ su - oracle
[oracle@foxjin3 ~]$ id
uid=54321(oracle) gid=54321(dba) groups=54321(dba) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
(scp용으로..)
- (root로) passwd oracle
- 패스워드 2번 입력
[root@foxjin3 20250106-23:14:44]:ORAFOX:[/root] $ passwd oracle Changing password for user oracle. New password: Retype new password:
(oracle 계정에서)
# User specific environment and startup programs
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19c/dbhome_1
export ORA_INVENTORY=/u01/app/oraInventory
export ORACLE_SID=ORAFOX
#export INST_ID=1
#export DATA_DIR=/u02/oradata
export ORACLE_UNQNAME=ORAFOX
export ORACLE_UNQNAME_LOWER=`echo $ORACLE_UNQNAME | tr A-Z a-z`
export ORACLE_SID=${ORACLE_UNQNAME}$INST_ID
export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch
#export TNS_ADMIN=$ORACLE_HOME/network/admin
#export NLS_LANG=American_America.KO16KSC5601
export PATH=/usr/sbin:/usr/local/bin:$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export DIAGNOSTIC_DEST='/u01/app/oracle'
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export PS1="[\u@\h \D{%Y%m%d-%H:%M:%S}]:\$ORACLE_SID:\$ORACLE_PDB_SID[\$PWD]
$ "
alias unpdb='unset ORACLE_PDB_SID'
alias sd='sqlplus / as sysdba'
alias bdump='cd $DIAGNOSTIC_DEST/diag/rdbms/${ORACLE_UNQNAME_LOWER}/${ORACLE_SID}/trace'
alias t_dbalert='tail -30f $DIAGNOSTIC_DEST/diag/rdbms/${ORACLE_UNQNAME_LOWER}/${ORACLE_SID}/trace/alert*.log'
alias oratop='$ORACLE_HOME/suptools/oratop/oratop -r / as sysdba'
[root@foxjin3 20250106-23:00:24]:ORAPUPPY:[/root]
$ mkdir /oramedia
[root@foxjin3 20250106-23:00:42]:ORAPUPPY:[/root]
$ chown oracle:dba /oramedia
[root@foxjin3 20250106-23:01:10]:ORAPUPPY:[/root]
$ ls -al /
total 28
dr-xr-xr-x. 18 root root 240 Jan 6 23:00 .
dr-xr-xr-x. 18 root root 240 Jan 6 23:00 ..
lrwxrwxrwx. 1 root root 7 Oct 9 2021 bin -> usr/bin
dr-xr-xr-x. 5 root root 4096 Jan 6 02:21 boot
drwxr-xr-x. 18 root root 3220 Jan 6 22:46 dev
drwxr-xr-x. 142 root root 8192 Jan 6 22:57 etc
drwxr-xr-x. 4 root root 36 Jan 6 22:52 home
lrwxrwxrwx. 1 root root 7 Oct 9 2021 lib -> usr/lib
lrwxrwxrwx. 1 root root 9 Oct 9 2021 lib64 -> usr/lib64
drwxr-xr-x. 2 root root 6 Oct 9 2021 media
drwxr-xr-x. 2 root root 6 Oct 9 2021 mnt
drwxr-xr-x. 2 root root 6 Oct 9 2021 opt
drwxr-xr-x. 2 oracle dba 6 Jan 6 23:00 oramedia
[root@foxjin3 20250106-23:03:00]:ORAPUPPY:[/root]
$ ls -al /
total 28
dr-xr-xr-x. 20 root root 262 Jan 6 23:02 .
dr-xr-xr-x. 20 root root 262 Jan 6 23:02 ..
lrwxrwxrwx. 1 root root 7 Oct 9 2021 bin -> usr/bin
dr-xr-xr-x. 5 root root 4096 Jan 6 02:21 boot
drwxr-xr-x. 18 root root 3220 Jan 6 22:46 dev
drwxr-xr-x. 142 root root 8192 Jan 6 22:57 etc
drwxr-xr-x. 4 root root 36 Jan 6 22:52 home
lrwxrwxrwx. 1 root root 7 Oct 9 2021 lib -> usr/lib
lrwxrwxrwx. 1 root root 9 Oct 9 2021 lib64 -> usr/lib64
drwxr-xr-x. 2 root root 6 Oct 9 2021 media
drwxr-xr-x. 2 root root 6 Oct 9 2021 mnt
drwxr-xr-x. 2 root root 6 Oct 9 2021 opt
drwxr-xr-x. 2 oracle dba 6 Jan 6 23:00 oramedia
dr-xr-xr-x. 270 root root 0 Jan 6 22:46 proc
dr-xr-x---. 15 root root 4096 Jan 6 22:46 root
drwxr-xr-x. 44 root root 1240 Jan 6 22:48 run
lrwxrwxrwx. 1 root root 8 Oct 9 2021 sbin -> usr/sbin
drwxr-xr-x. 2 root root 6 Oct 9 2021 srv
dr-xr-xr-x. 13 root root 0 Jan 6 22:46 sys
drwxrwxrwt. 17 root root 4096 Jan 6 23:01 tmp
drwxr-xr-x. 2 oracle dba 6 Jan 6 23:02 u01
drwxr-xr-x. 2 oracle dba 6 Jan 6 23:02 u02
drwxr-xr-x. 12 root root 144 Jan 6 00:42 usr
drwxr-xr-x. 21 root root 4096 Jan 6 00:53 var
[root@foxjin3 20250106-23:33:59]:ORAFOX:[/oramedia/19c_basemedia]
$ mkdir -p /u01/app/oracle/product/19c/dbhome_1
[root@foxjin3 20250106-23:34:06]:ORAFOX:[/oramedia/19c_basemedia]
$ chown -R oracle:dba /u01
ssh oracle@n4 mkdir -p /oramedia/19c_base
scp ./19c_base/* oracle@n4:/oramedia/19c_base
[oracle@foxjin3 20250106-23:40:43]:ORAFOX:[/oramedia/19c_basemedia]
$ ls
LINUX.X64_193000_db_home.zip
[oracle@foxjin3 20250106-23:40:44]:ORAFOX:[/oramedia/19c_basemedia]
$ unzip LINUX.X64_193000_db_home.zip -d $ORACLE_HOME
[oracle@foxjin3 20250106-23:41:00]:ORAFOX:[/oramedia/19.20]
$ ls -al
total 4894804
drwxr-xr-x. 2 oracle dba 174 Jan 6 23:24 .
drwxr-xr-x. 4 oracle dba 40 Jan 6 23:24 ..
-rwxr-xr-x. 1 oracle dba 127314614 Jan 6 23:23 OJVM_p35354406_190000_Linux-x86-64.zip
-rwxr-xr-x. 1 oracle dba 2990370786 Jan 6 23:23 p35319490_190000_Linux-x86-64.zip
-rwxr-xr-x. 1 oracle dba 1769419773 Jan 6 23:24 p35320081_190000_Linux-x86-64.zip
-rwxr-xr-x. 1 oracle dba 125167420 Jan 6 23:24 p6880880_190000_Linux-x86-64.zip
[oracle@foxjin3 20250106-23:41:02]:ORAFOX:[/oramedia/19.20]
$ unzip p6880880_190000_Linux-x86-64.zip -d $ORACLE_HOME
replace /u01/app/oracle/product/19c/dbhome_1/OPatch/docs/cversion.txt? [y]es, [n]o, [A]ll, [N]one, [r]ename: A <<<<<<<<
------ 압축 풀고 해당 경로에서 확인
[oracle@foxjin3 20250106-23:43:37]:ORAFOX:[/oramedia/19.20]
$ cd $ORACLE_HOME/OPatch
[oracle@foxjin3 20250106-23:44:24]:ORAFOX:[/u01/app/oracle/product/19c/dbhome_1/OPatch]
$ ./opatch version
OPatch Version: 12.2.0.1.39
OPatch succeeded.
[oracle@foxjin3 20250106-23:44:29]:ORAFOX:[/u01/app/oracle/product/19c/dbhome_1/OPatch]
[oracle@foxjin3 20250106-23:46:32]:ORAFOX:[/u01/app/oracle/product/19c/dbhome_1]
$ find ./ -name *.rsp
./network/install/netca_typ.rsp
./network/install/netca_clt.rsp
./install/response/db_install.rsp
./inventory/response/db_install.rsp
./inventory/response/oracle.server_EE.rsp
./assistants/dbca/dbca.rsp
./assistants/netca/netca.rsp
>> 해당 파일 특정 경로에 복사
[oracle@foxjin3 20250106-23:48:27]:ORAFOX:[/u01/app/oracle/product/19c/dbhome_1]
$ cp ./install/response/db_install.rsp /oramedia
[oracle@foxjin3 20250106-23:48:27]:ORAFOX:[/u01/app/oracle/product/19c/dbhome_1]
$ scp /oramedia/db_install.rsp root@192.168.0.120:/oramedia
The authenticity of host '192.168.0.120 (192.168.0.120)' can't be established.
ECDSA key fingerprint is SHA256:uhOb2gfGZe8gS+m1cQ1fzF0Q4Q/PrMxCW3btaSGEcXg.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.0.120' (ECDSA) to the list of known hosts.
root@192.168.0.120's password:
Permission denied, please try again.
root@192.168.0.120's password:
db_install.rsp 100% 19KB 15.7MB/s 00:00
[oracle@cubjin4 20250107-20:18:24]:ORACUB:['/oramedia]
$ cat db_install.rsp | grep -v ^# | grep -v '^$' > dbi.rsp
[oracle@foxjin3 20250106-23:58:57]:ORAFOX:[/oramedia/19.20]
$ ls -al
total 4896520
drwxr-xr-x. 3 oracle dba 4096 Jan 6 23:58 .
drwxr-xr-x. 4 oracle dba 62 Jan 6 23:48 ..
drwxr-xr-x. 5 oracle dba 81 Jul 16 2023 35320081
-rwxr-xr-x. 1 oracle dba 127314614 Jan 6 23:23 OJVM_p35354406_190000_Linux-x86-64.zip
-rwxr-xr-x. 1 oracle dba 2990370786 Jan 6 23:23 p35319490_190000_Linux-x86-64.zip
-rwxr-xr-x. 1 oracle dba 1769419773 Jan 6 23:56 p35320081_190000_Linux-x86-64.zip
-rwxr-xr-x. 1 oracle dba 125167420 Jan 6 23:24 p6880880_190000_Linux-x86-64.zip
-rw-rw-r--. 1 oracle dba 1749054 Jul 18 2023 PatchSearch.xml
[oracle@foxjin3 20250106-23:59:04]:ORAFOX:[/oramedia/19.20]
$ unzip p35320081_190000_Linux-x86-64.zip
dnf install -y bc
dnf install -y binutils
dnf install -y elfutils-libelf
dnf install -y elfutils-libelf-devel
dnf install -y fontconfig-devel
dnf install -y glibc
dnf install -y glibc-devel
dnf install -y ksh
dnf install -y libaio
dnf install -y libaio-devel
dnf install -y libXrender
dnf install -y libX11
dnf install -y libXau
dnf install -y libXi
dnf install -y libXtst
dnf install -y libgcc
dnf install -y libnsl
dnf install -y librdmacm
dnf install -y libstdc++
dnf install -y libstdc++-devel
dnf install -y libxcb
dnf install -y libibverbs
dnf install -y make
dnf install -y policycoreutils
dnf install -y policycoreutils-python-utils
dnf install -y smartmontools
dnf install -y sysstat
[root@cubjin4 ~]# cat /etc/sysctl.conf
# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
fs.aio-max-nr = 3145728
fs.file-max = 6815744
kernel.shmall = 1959245 (docs, mos 확인)
kernel.shmmax = 4012533760 (docs, mos 확인)
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
panic_on_oops = 1
netdev_max_backlog = 1000
kernel.randomize_va_space = 0
### oracle datafile이 filesyste(fs)에 있는 경우. (파일 캐시를 안써서..)
vm.min_free_kbytes = 524288
vm.swappiness = 1
vm.dirty_background_ratio = 3
vm.dirty_ratio = 80
vm.dirty_expire_centisecs = 500
vm.dirty_writeback_centisecs = 100
#* soft core 0
#* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#@student - maxlogins 4
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oracle hard memlock 134217728 (docs, mos 확인)
oracle soft memlock 134217728 (docs, mos 확인)
oracle soft data unlimited
oracle hard data unlimited
# End of file
[root@cubjin4 transparent_hugepage]# cat enabled
[always] madvise never
--- 변경 절차
[root@cubjin4 transparent_hugepage]# vi /etc/systemd/system/disable-thp.service
[root@cubjin4 transparent_hugepage]# cat /etc/systemd/system/disable-thp.service
[Unit]
Description=Disable Transparent Huge Pages (THP)
[Service]
Type=simple
ExecStart=/bin/sh -c "echo 'never' >/sys/kernel/mm/transparent_hugepage/enabled && echo 'never' >/sys/kernel/mm/transparent_hugepage/defrag"
[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl start disable-thp
systemctl enable disable-thp
systemctl status disable-thp
-- 확인
[root@cubjin4 transparent_hugepage]# cat enabled
always madvise [never]
상태확인
systemctl status avahi-daemon
systemctl status avahi-daemon.socket
중지
systemctl stop avahi-daemon
systemctl stop avahi-daemon.socket
Disable
systemctl disable avahi-daemon
systemctl disable avahi-daemon.socket
제거
systemctl mask avahi-daemon
systemctl mask avahi-daemon.socket
/etc/selinux/config
SELINUX=disabled
#상태확인
systemctl status firewalld
#종료 / disable
systemctl stop firewalld
systemctl disable firewalld
#심볼릭링크 제거
systemctl mask firewalld
cd /usr/lib/tmpfiles.d
vi tmp.conf
### (doc id 2455193.1)
x /tmp/.oracle*
x /var/tmp/.oracle*
x /usr/tmp/.oracle*
#재기동 및 상태확인
systemctl restart systemd-tmpfiles-clean.timer
systemctl status systemd-tmpfiles-clean.timer
[oracle@foxjin3 20250107-00:02:53]:ORAFOX:[/u01/app/oracle/product/19c/dbhome_1]
$ ./runInstaller -help=y
ERROR: Unable to verify the graphical display setup. This application requires X display. Make sure that xdpyinfo exist under PATH variable.
[INS-04007] Invalid argument passed from command line: -help=y
Usage: runInstaller [<flag>] [<option>]
Following are the possible flags:
-help - display help.
-silent - run in silent mode. The inputs can be a response file or a list of command line variable value pairs.
[-ignorePrereqFailure - ignore all prerequisite checks failures.]
-responseFile - specify the complete path of the response file to use.
-logLevel - enable the log of messages up to the priority level provided in this argument. Valid options are: severe, warning, info, config, fine, finer, finest.
-executePrereqs | -executeConfigTools | -createGoldImage
-executePrereqs - execute the prerequisite checks only.
-executeConfigTools - execute the config tools for an installed home.
-createGoldImage - create a gold image from the current Oracle home.
-destinationLocation - specify the complete path to where the created gold image will be located.
[-exclFiles - specify the complete paths to the files to be excluded from the new gold image.]
-debug - run in debug mode.
-printdiskusage - log the debug information for the disk usage.
-printmemory - log the debug information for the memory usage.
-printtime - log the debug information for the time usage.
-waitForCompletion - wait for the completion of the installation, instead of spawning the installer and returning the console prompt.
-noconfig - do not execute the config tools.
-noconsole - suppress the display of messages in the console. The console is not allocated.
-ignoreInternalDriverError - ignore any internal driver errors.
-noCopy - perform the configuration without copying the software on to the remote nodes.
-applyRU - apply release update to the Oracle home.
-applyOneOffs - apply one-off patch to the Oracle home. Multiple one-off patches can be passed as a comma separated list of locations.
./runInstaller -silent -applyRU /oramedia/19.20/35320081 -responseFile /oramedia/db_install.rsp
[oracle@cowjin1 20250225-19:48:20]:ORACOW1:[/u02/app/oracle/product/19c/dbhome_1]
$ ./runInstaller -silent -applyRU /oramedia/35320081 -responseFile /oramedia/db_install.rsp
Preparing the home to patch...
Applying the patch /oramedia/35320081...
Successfully applied the patch.
The log can be found at: /u01/app/oraInventory/logs/InstallActions2025-02-25_07-49-11PM/installerPatchActions_2025-02-25_07-49-11PM.log
Launching Oracle Database Setup Wizard...
[WARNING] [INS-08101] Unexpected error while executing the action at state: 'supportedOSCheck'
CAUSE: No additional information available.
ACTION: Contact Oracle Support Services or refer to the software manual.
SUMMARY:
- java.lang.NullPointerException
[oracle@foxjin3 20250107-00:44:57]:ORAFOX:[/u01/app/oracle/product/19c/dbhome_1]
$ export CV_ASSUME_DISTID=RHEL7.6
[oracle@cubjin4 20250107-21:44:22]:ORACUB:[/u01/app/oracle/product/19c/dbhome_1]
$ ./runInstaller -silent -applyRU /oramedia/19.20/35320081 -responseFile /oramed ia/dbi.rsp
Preparing the home to patch...
Applying the patch /oramedia/19.20/35320081...
Successfully applied the patch.
The log can be found at: /tmp/InstallActions2025-01-07_09-44-25PM/installerPatch Actions_2025-01-07_09-44-25PM.log
Launching Oracle Database Setup Wizard...
The response file for this session can be found at:
/u01/app/oracle/product/19c/dbhome_1/install/response/db_2025-01-07_09-44-25PM. rsp
You can find the log of this install session at:
/tmp/InstallActions2025-01-07_09-44-25PM/installActions2025-01-07_09-44-25PM.lo g
As a root user, execute the following script(s):
1. /u01/app/oraInventory/orainstRoot.sh
2. /u01/app/oracle/product/19c/dbhome_1/root.sh
Execute /u01/app/oraInventory/orainstRoot.sh on the following nodes:
[cubjin4]
Execute /u01/app/oracle/product/19c/dbhome_1/root.sh on the following nodes:
[cubjin4]
Successfully Setup Software.
Moved the install session logs to:
/u01/app/oraInventory/logs/InstallActions2025-01-07_09-44-25PM
[root@cubjin4 product]# sh /u01/app/oraInventory/orainstRoot.sh
Changing permissions of /u01/app/oraInventory.
Adding read,write permissions for group.
Removing read,write,execute permissions for world.
Changing groupname of /u01/app/oraInventory to dba.
The execution of the script is complete.
[root@cubjin4 product]# sh /u01/app/oracle/product/19c/dbhome_1/root.sh
Check /u01/app/oracle/product/19c/dbhome_1/install/root_cubjin4_2025-01-07_21-48-38-706854737.log for the output of root script
항목 | db_install.rsp | dbca.rsp |
---|---|---|
용도 | Oracle 소프트웨어 설치 | 데이터베이스 생성 및 구성 |
실행 도구 | runInstaller | dbca (Database Configuration Assistant) |
설정 대상 | Oracle 홈, 설치 유형, 사용자 그룹 | 데이터베이스 이름, 저장소, 초기화 파라미터 등 |
적용 범위 | 소프트웨어 설치에만 사용 | 데이터베이스 생성 및 설정 |
사용 명령 | ./runInstaller -silent -responseFile | dbca -silent -responseFile |