Centos 7.x
**root 에서 실행.
vim /etc/sysctl.conf
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
# Maximum shared segment size in bytes
# 물리서버의 Memory에 따라 값이 다르다
kernel.shmmax = 48000000000
# # Maximum number of shared memory segments in pages
kernel.shmall = 8194211
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.panic_on_oops = 1
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
vm.swappiness = 1
fs.file-max = 6815744
wq 저장 후 /sbin/sysctl -p 적용.
적용 된 값 확인
sysctl -a | grep kernel.shmall
sysctl -a | grep kernel.shmmax
위에 언급된 kernel.shmmax, kernel.shmall 값을 구할땐 아래 쉘스크립트를 사용.
shmmni 값은 getconf PAGESIZE 로 확인 할 것.
vi shmsetup.sh
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
#!/bin/bash
# http://archives.postgresql.org/pgsql-admin/2010-05/msg00285.php
# Output lines suitable for sysctl configuration based
# on total amount of RAM on the system. The output
# will allow up to 50% of physical memory to be allocated
# into shared memory.
# On Linux, you can use it as follows (as root):
#
# ./shmsetup >> /etc/sysctl.conf
# sysctl -p
# Early FreeBSD versions do not support the sysconf interface
# used here. The exact version where this works hasn't
# been confirmed yet.
page_size=`getconf PAGE_SIZE`
phys_pages=`getconf _PHYS_PAGES`
if [ -z "$page_size" ]; then
echo Error: cannot determine page size
exit 1
fi
if [ -z "$phys_pages" ]; then
echo Error: cannot determine number of memory pages
exit 2
fi
shmall=`expr $phys_pages / 2`
shmmax=`expr $shmall \* $page_size`
echo \# Maximum shared segment size in bytes
echo kernel.shmmax = $shmmax
echo \# Maximum number of shared memory segments in pages
echo kernel.shmall = $shmall
wq 후 chmod 700 shmsetup.sh
./shmsetup.sh 확인.
vim /etc/security/limits.conf
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
~~~~~~~~~~~~~~
# End of file
#For Oracle
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240
ll /lib64/security/pam_limits.so 확인 후
vim /etc/pam.d/login
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
제일 하단에
session required /lib64/security/pam_limits.so
추가
su - oracle
vim .bash_profile
export PATH 밑에 추가
#####################################################
# Oracle Settings
#####################################################
PS1="`hostname`:\$PWD>"
export ORACLE_BASE=/home/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_DOC=$ORACLE_HOME/doc
export ORACLE_SID=SID추가;
export ORACLE_OWNER=oracle
export ORACLE_TERM=xterm
export TEMPDIR=/tmp
export TEMP=/tmp
#American_America.KO16KSC5601; 값이 아닐 수 있음 보편적으로
#American_America.AL32UTF8; 값을 더 많이 설정함.
export NLS_LANG=American_America.KO16KSC5601;
export TNS_ADMIN=$ORACLE_HOME/network/admin
export NLS_DATE_FORMAT=yyyymmddhh24miss
export PATH=$PATH:$ORACLE_HOME/bin:/bin:/usr/bin/java/bin:/bin:/usr/bin:/usr/sbin:/etc:/usr/etc
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
export LANG=C
export EDITOR=vi
alias ss='sqlplus "/as sysdba"'
stty erase ^H
stty erase ^?
저장 후 source .bash_profile로 적용.
Centos 7.x에 ORACLE 설치 및 설정 변수 값은 모두 설정이 완료 되었다.
**https://kyoungho.tistory.com/126 oracle 설치 참고. (공개(보호)걸려있음 필요 시 댓글)
** oracle 설치 전 OS설치시 GUI모드로 먼저 설치하면 한결 편함.......
** xlock 때문에 고생 많이 함...아래 순서대로 하면 해결.
root : yum install xorg* -y
root : export DISPLAY=:1
root : xhost +
oracle 셸 : export DISPLAY=:1
oracle 셸 : xclock & --> 백그라운드로 실행시켜줘야 xclock 셀에서 빠져나올수 있음.
이후 vncviwer로 접속해 확인해보면
뜨는걸 확인할 수 있다.
'공부 > 서버운영관리' 카테고리의 다른 글
[서버운영관리] xshell Socket error Event : 32 Error: 10053 (0) | 2022.09.20 |
---|---|
[xen]xenserver pv storage host adapter ...... (0) | 2022.07.20 |
[oracle] 초기 설정 및 설치 (0) | 2022.07.06 |
Synology NAS 설정. (0) | 2022.05.11 |
ICT보안실무_그룹정책관리 (0) | 2020.11.03 |
댓글