CentOS 7 - Oracle SE 19c 설치
페이지 정보
작성자 상석하대 쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 에필로그 댓글 0건 조회 2,686회 작성일 22-06-09 16:32본문
-. 컴파일러 설치
yum -y install gcc-c++
-. selinux 해제
cat /etc/sysconfig/selinux
sed -i 's/^SELINUX=.*/SELINUX=permissive/g' /etc/sysconfig/selinux
setenforce permissive
getenforce
-. 호스트 설정
echo "192.168.0.75 db db.local" >> /etc/hosts
cat /etc/hosts 또는 hostname
-. 다운로드
https://www.oracle.com/database/technologies/oracle-database-software-downloads.html#19c
-. 설치 준비
yum -y install https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-19c-1.0-3.el7.x86_64.rpm
-. 계정 추가, 확인
groupadd asmdba
gpasswd -a oracle asmdba
cat /etc/passwd *oracle 확인
cat /etc/group *oinstall, dba, oper, backupdba, dgdba, kmdba, racdba 확인
-. 커널 매개변수, 제한사항 자동설정 확인
cat /etc/sysctl.conf
cat /etc/security/limits.d/oracle-database-preinstall-19c.conf
-. 방화벽 처리
firewall-cmd --zone=public --add-port=3938/tcp --add-port=1521/tcp --add-port=5500/tcp --add-port=5520/tcp --permanent
firewall-cmd --reload
firewall-cmd --list-ports
-. SQL 설치
mkdir -p /app/oracle/product/19.3.0/dbhome_1
chown -R oracle:oinstall /app
mkdir -p /app/oradata
mkdir -p /app/oraInventory
chown -R oracle:oinstall /app/oracle /app/oradata /app/oraInventory
chmod -R 775 /app/oracle /app/oradata /app/oraInventory
su - oracle
vi .bash_profile
export TMP=/tmp
export TMPDIR=$TMP
export ORACLE_HOSTNAME=db.local
export ORACLE_UNQNAME=ORCL
export ORACLE_BASE=/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.3.0/dbhome_1
export ORA_INVENTORY=/app/oraInventory
export ORACLE_SID=ORCL
export DATA_DIR=/app/oradata
export PATH=$ORACLE_HOME/bin:$PATH
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
export NLS_LANG=KOREAN_KOREA.AL32UTF8
source .bash_profile
cd /app/oracle/product/19.3.0/dbhome_1 또는 cd $ORACLE_HOME
unzip LINUX.X64_193000_db_home.zip
-. 리스너 설치
vi install/response/db_install.rsp
oracle.install.option=INSTALL_DB_SWONLY
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/app/oraInventory
ORACLE_HOME=/app/oracle/product/19.3.0/dbhome_1
ORACLE_BASE=/app/oracle
oracle.install.db.InstallEdition=SE2
oracle.install.db.OSDBA_GROUP=dba
oracle.install.db.OSOPER_GROUP=
oracle.install.db.OSBACKUPDBA_GROUP=dba
oracle.install.db.OSDGDBA_GROUP=dba
oracle.install.db.OSKMDBA_GROUP=dba
oracle.install.db.OSRACDBA_GROUP=dba
oracle.install.db.rootconfig.executeRootScript=true
oracle.install.db.rootconfig.configMethod=ROOT
./runInstaller -silent -responseFile $ORACLE_HOME/install/response/db_install.rsp
netca -silent -responseFile $ORACLE_HOME/assistants/netca/netca.rsp
lsnrctl status
lsnrctl stop
lsnrctl start
-. 인스턴스 제어
sqlplus / as sysdba
SQL> startup
SQL> shutdown immediate
quit;
-. 데이터베이스 설정
vi assistants/dbca/dbca.rsp
gdbName=db.local
sid=ORCL
createAsContainerDatabase=false
templateName=General_Purpose.dbc
sysPassword=비밀번호
systemPassword=비밀번호
datafileDestination=/app/oradata
storageType=FS
characterSet=AL32UTF8
nationalCharacterSet=AL16UTF16
listeners=LISTENER
databaseType=MULTIPURPOSE
sampleSchema=TRUE
totalMemory=16384
dbca -silent -createDatabase -responsefile $ORACLE_HOME/assistants/dbca/dbca.rsp
-. 자동 시작
vi /etc/oratab
N -> Y 변경
-. 시작, 중지 스크립트
vi /home/oracle/start_all.sh
#!/bin/bash
. /home/oracle/.bash_profile
export ORAENV_ASK=NO
. oraenv
export ORAENV_ASK=YES
dbstart \$ORACLE_HOME
vi /home/oracle/stop_all.sh
#!/bin/bash
. /home/oracle/.bash_profile
export ORAENV_ASK=NO
. oraenv
export ORAENV_ASK=YES
dbshut \$ORACLE_HOME
chown oracle:oinstall /home/oracle/start_all.sh
chown oracle:oinstall /home/oracle/stop_all.sh
chmod u+x /home/oracle/start_all.sh
chmod u+x /home/oracle/stop_all.sh
-. 데몬 설정
vi /etc/systemd/system/oracle.service
[Unit]
Description=Oracle Database Service
After=syslog.target network.target
[Service]
LimitMEMLOCK=infinity
LimitNOFILE=65535
RemainAfterExit=yes
User=oracle
Group=oinstall
Restart=no
ExecStart=/bin/bash -c /home/oracle/start_all.sh
ExecStop=/bin/bash -c /home/oracle/stop_all.sh
[Install]
WantedBy=multi-user.target
systemctl daemon-reload
-. 데몬 제어
systemctl start oracle.service
systemctl status oracle.service
systemctl enable oracle.service
-. 변수, 로깅 설정,
su - oracle
vi $ORACLE_HOME/bin/dbstart
export ORACLE_HOME=/app/oracle/product/19.3.0/dbhome_1
mkdir -p -- $ORACLE_HOME/network/log
LOG=$ORACLE_HOME/network/log/listener.log
-. 프로세스 확인
ps -ef | grep tns
ps -ef | grep pmon
댓글목록
등록된 댓글이 없습니다.