1. ํํ์ด์ง ์ ์ ํ ์ํ๋ ๋ฒ์ ์ Oracle DB ๋ค์ด๋ก๋
Oracle DB Download link
https://www.oracle.com/database/technologies/oracle-database-software-downloads.html
RedHat release ๋ฒ์ ํ์ธ
cat /etc/redhat-release uname -r

Linux update ์งํ
yum update -y
๊ธฐ๋ณธ ์ค์น ํ๋ก๊ทธ๋จ
Oracle DB ์ค์น ์ ํ์๋ก ์ค์น๋์ด์์ด์ผ ํ๋ ํ๋ก๊ทธ๋จ์ ์ค์นํด์ค๋ค.
yum install -y binutils.x86_64 compat-libcap1.x86_64 gcc.x86_64 gcc-c++.x86_64 glibc.i686 glibc.x86_64 glibc-devel.i686 glibc-devel.x86_64 ksh compat-libstdc++-33 libaio.i686 libaio.x86 libaio-devel.i686 libaio-devel.x86_64 libgcc.i686 libgcc.x86_64 libstdc++-devel.i686 libstdc++-devel.x86_64 libXi.i686 libXi.x86_64 libXtst.i686 libXst.x86_64 make.x86_64 sysstat.x86_64 zip unzip



Oracle ์ฌ์ฉ์, ๊ทธ๋ฃน ์์ฑ
groupadd oinstall groupadd dba useradd -g oinstall -G dba oracle && passwd oracle
oracle ๊ณ์ ํ๊ฒฝ ๋ณ์ ์ค์
cd /home/oracle mkdir db chown -R oracle:oinstall db chmod -R 775 db chmod g+s db

Oracle .bash_profile ์ธํ
vi /home/oracle/.bash_profile
๋ณ๊ฒฝ ์
.bash_profile
Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
...
๋ณ๊ฒฝ ํ
.bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
export TMP=/tmp
export TMPDIR=/tmp
export ORACLE_BASE=/home/oracle/db
export ORACLE_SID=orcl
export ORACLE_HOME=$ORACLE_BASE/product/12.2.0/dbhome_1
export ORACLE_HOME_LISTNER=$ORACLE_HOME/bin/lsnrctl
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH=$ORACLE_HOME/bin:$PATH
...

์ปค๋ ์ค์ ์์
vi /etc/sysctl.conf
๋ณ๊ฒฝ ์

์ฝ๋ ์ถ๊ฐ
fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 1987162112 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 = 1048586
๋ณ๊ฒฝ ํ

Kernel update
sysctl -p
์ ๋ฐ์ดํธ ๋ด์ฉ ํ์ธ

๊ณ์ limit ์ค์
vi /etc/security/limits.conf
๋ณ๊ฒฝ ์

limit ์ค์
oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536
๋ณ๊ฒฝ ํ

Oracle Install
๋ค์ด๋ก๋ ๋ฐ์ Oracle DB ์ค์นํ์ผ ์์ถ ํด์
unzip Oracle Database 12.2.0.1.0 for Linux x86-64.zip su - oracle cd /home/oracle/database
Oracle ์คํ


Xwindow๊ฐ ์์ด ์๋ฌ๊ฐ ์คํจ๊ฐ ๋์ง๋ง ์ค์น๋ฅผ ๊ณ์ ์งํํ์๋ค.
[oracle@localhost database] ./runInstaller
Starting Oracle Universal Installer...
Checking Temp space: must be greater than 500 MB. Actual 4093 MB Passed
Checking swap space: must be greater than 150 MB. Actual 1639 MB Passed
Checking monitor: must be configured to display at least 256 colors
>>> Could not execute auto check for display colors using command /usr/bin/xdpyinfo. Check if the DISPLAY variable is set. Failed <<<<
Some requirement checks failed. You must fulfill these requirements before
continuing with the installation,
Continue? (y/n) [n] y
>>> Ignoring required pre-requisite failures. Continuing...
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2021-10-13_05-12-18AM. Please wait ...
DISPLAY not set. Please set the DISPLAY and try again.
Depending on the Unix Shell, you can use one of the following commands as examples to set the DISPLAY environment variable:
- For csh: % setenv DISPLAY 192.168.1.128:0.0
- For sh, ksh and bash: $ DISPLAY=192.168.1.128:0.0; export DISPLAY
Use the following command to see what shell is being used:
echo $SHELL
Use the following command to view the current DISPLAY environment variable setting:
echo $DISPLAY
- Make sure that client users are authorized to connect to the X Server.
To enable client users to access the X Server, open an xterm, dtterm or xconsole as the user that started the session and type the following command:
% xhost +
To test that the DISPLAY environment variable is set correctly, run a X11 based program that comes with the native operating system such as 'xclock':
% <full path to xclock.. see below>
If you are not able to run xclock successfully, please refer to your PC-X Server or OS vendor for further assistance.
Typical path for xclock: /usr/X11R6/bin/xclock
์ดํ ์ค์น
xhost + xclock xterm
GUI Interface install (GNOME) for RHEL 7
yum groupinstall "Server with GUI" ln -sf /lib/systemd/system/runlevel5.target /etc/systemd/system/default.target reboot


์ดํ ๋ค์ oracle ๊ณ์ ์ database ํด๋ ๋ด ์ค์น ํ์ผ์ ์คํํ์ฌ ์งํํ๋ค.

Oracle DB Install
๋ณด์ ๋ฉ์ผ ์์ ๊ฑฐ๋ถ ํ next

2. DB ์์ฑํ๊ธฐ -> next

3. Server class -> next

4. Single instance database installation -> next

5. Advanced install -> next

6. Enterprise Edition -> next

7. Oracle install path ์ค์ -> next

8. Oracle ์ธ๋ฒคํ ๋ฆฌ ์ค์ -> next

9. DB type ์ค์ -> next

10. ๊ธ๋ก๋ฒ ์ด๋ฆ, SID, Pluggable ์ค์ -> next

11. ๋ฉ๋ชจ๋ฆฌ ์ค์ -> character sets

12. character sets ์ค์ (AL32UTF8) -> next

12. ์ค๋ผํด ํ์ผ ์์คํ ์ค์ -> next

12. EM(Enterprise Manager) ์ค์ -> next

13. ๋ณต๊ตฌ ๊ด๋ จ ์ค์ -> next

14. ๋น๋ฐ๋ฒํธ ์ค์ -> next

15. ๊ทธ๋ฃน ์ค์ -> next -> install

16. ์คํ ์ฌ์ด์ฆ ์ค์


17. oracle ์ค์น์ ๊ดํ ์ ๋ณด ํ์ธ

18. ์ค์น ์งํ

19. ์ค์น ์ค ๋ช ๋ น์ด ์ ๋ ฅ ์ฐฝ์ด ๋จ๋ฉด ์ ๋ ฅ ํ ์ค์น ์ฐฝ์์ ok ํด๋ฆญ ํ ์งํ


21. oracle ํ๊ฒฝ๋ณ์ ์ฌ์ค์
์ฉ๋๋๋ฌธ์ ๋ณ๊ฒฝํ oracle path ์ฌ ์ง์ , ์คํ

.bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PAT
export TMP=/tmp
#export TMPDIR=/tmp
#export ORACLE_BASE=/home/oracle/db
#export ORACLE_SID=orcl
#export ORACLE_HOME=$ORACLE_BASE/product/12.2.0/dbhome_1
#export ORACLE_HOME_LISTNER=$ORACLE_HOME/bin/lsnrctl
#export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
#PATH=$PATH:$HOME/.local/bin:$HOME/bin
#export PATH=$ORACLE_HOME/bin:$PATHH
export ORACLE_BASE=/oracle12.2
export ORACLE_HOME=$ORACLE_BASE/lnventory
#ORACLE_BASE = /oracle12.2; export ORACLE_BASE
#ORACLE_HOME= /$ORACLE_BASE/lnventory; export ORACLE_HOME
ORACLE_HOME_LISTNER=$ORACLE_HOME/bin/lsnrctl; export ORACLE_HOME_LISTNER
ORACLE_SID=orcl; export ORACLE_SID
LD_LIBRATY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/lib64; export LD_LIBRAY=PATH
LCASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
export NLS_LANG=KOREAN_KOREA.AL32UTF8
PATH=$ORACLE_HOME/bin:$PATH:$HOME/.local/bin:$HOME/bin; export PATH

Oracle Database ์ค์น ์๋ฃ
