반응형
1. 의존 라이브러리 설치
root 계정으로 설치
yum -y install compat-libstdc++-33.x86_64 binutils elfutils-libelf elfutils-libelf-devel yum -y install glibc glibc-common glibc-devel glibc-headers gcc gcc-c++ libaio-devel yum -y install libaio libgcc libstdc++ libstdc++ make sysstat unixODBC unixODBC-devel yum -y install unzip yum -y install compat-libstdc++-33.x86_64 binutils elfutils-libelf elfutils-libelf-devel |
마지막에 Complete! 문구 출력 확인
(Nothing to do 라고 출력이 되면 이미 최신버전으로 다운로드 되어잇는것을 의미합니다.)
2. 파라미터 및 유저 리소스 설정
# /etc/sysctl.conf |
# Controls the maximum shared segment size, in bytes kernel.shmmax = 68719476736 # Controls the maximum number of shared memory segments, in pages kernel.shmall = 10523004 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 fs.aio-max-nr = 1048576 fs.file-max = 6815744 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 |
변경 후 파라미터 값 적용
# /sbin/sysctl -p |
유저의 자원 사용 제한값을 설정
# vi /etc/security/limits.conf (맨밑 추가) oracle soft nproc 2048 oracle hard nproc 65536 oracle soft nofile 1024 oracle hard nofile 65536 |
3. 환경변수 설정
vi .bash_profile export ORACLE_BASE=/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 export ORACLE_SID=orcl export NLS_LANG=AMERICAN_AMERICA.AL32UTF8 export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib export PATH=$PATH:$ORACLE_HOME/bin # alias alias ss='sqlplus / as sysdba' |
4. ORACLE 설치하기
압축해제
# unzip V17530-01_1of2.zip # unzip V17530-01_2of2.zip |
# xhost + # su - oracle # cd database # ./runinstaller |
※ xhost + 했을 때 command not found 또는 unable to open display로 뜨면
방법1. GUI 용 서버 설치 # yum groupinstall 'Server with GUI' 방법2. GNOME Desktop 설치 # yum groupinstall 'GNOME Desktop' yum install xorg* export DISPLAY=localhost:0.0 |
error 발생 시
'install' 에러 # cd /usr/oracle/app/product/11.2.0/dbhome_1/ctx/lib # vi ins_ctx.mk ctxhx: $(CTXHXOBJ) $(LINK_CTXHX) $(CTXHXOBJ) $(INSO_LINK) 변경 ctxhx: $(CTXHXOBJ) -static $(LINK_CTXHX) $(CTXHXOBJ) $(INSO_LINK) |
'agent nmhs' 에러 # cd /usr/oracle/app/product/11.2.0/dbhome_1/sysman/lib # vi ins_emagent.mk $(SYSMANBIN) emdctl: $(MK_EMAGENT_NMECTL) 변경 $(SYSMANBIN) emdctl: $(MK_EMAGENT_NMECTL) -lnnz11 |
[root@localhost ~]# /usr/oracle/oraInventory/orainstRoot.sh Changing permissions of /app/oraInventory. Adding read,write permissions for group. Removing read,write,execute permissions for world. Changing groupname of /app/oraInventory to dba. The execution of the script is complete. [root@localhost ~]# /usr/oracle/app/product/11.2.0/dbhome_1/root.sh Running Oracle 11g root.sh script... The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /app/oracle/product/11.2.0/dbhome_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: [ENTER]키 누르세용 Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ... Creating /etc/oratab file... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root.sh script. Now product-specific root actions will be performed. Finished product-specific root actions. |
# netca
NEXT
Add
NEXT
오라클 기본포트 1521 확인 후 NEXT
#dbca
데이터 베이스 계정 생성
SQLDeveloper에 연결하기 (외부접속하기)
listener.ora 파일
(서버 ip xx.xx.xx.xx 자리에 작성)
SID_LIST_LISTENER = (SID_LIST = (SID_DESC = (SID_NAME = orcl) (ORACLE_HOME = /app/oracle/product/11.2.0/dbhome_1) ) ) LISTENER = (DESCRIPTION_LIST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = xx.xx.xx.xx)(PORT = 1521)) (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) ) ) ADR_BASE_LISTENER = /app/oracle |
tnsnames.ora 파일
(여러분 서버 ip를 xx.xx.xx.xx 자리에 넣어주세여)
... LISTENER_ORCL = (ADDRESS = (PROTOCOL = TCP)(HOST = xx.xx.xx.xx)(PORT = 1521)) ORACLR_CONNECTION_DATA = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521)) ) (CONNECT_DATA = (SID = CLRExtProc) (PRESENTATION = RO) ) ) ORCL = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = xx.xx.xx.xx)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl) ) ) |
'linux > CentOS' 카테고리의 다른 글
Tomcat 설치 및 확인 (0) | 2022.03.21 |
---|---|
<리눅스 네트워크 관리> (0) | 2021.01.19 |
Linux [계정관리] (0) | 2021.01.19 |
RHEL 7 Teaming 설정 방법 (0) | 2021.01.19 |
[CentOS7] 리눅스 DNS 서버 구축 (0) | 2021.01.05 |