본문 바로가기

소프트웨어/오라클

Linux에 Oracle 11g XE 설치하기

Linux(CentOS)에 Oracle 11g XE  설치하기 


http://egloos.zum.com/zicman/v/3032298



클라우드 서버에서 작동시킬 경우에는 

. 마지막에 systemctl stop firewalld 명령어로 방화벽도 중지를 시켜줘야 정상적으로 동작하는 것 같다. 

. 나머지는 아래 순서로 진행하면 됨.



--------------------------------------

 CentOS 에서 오라클 11g Express 설치

 

 

The full system requirements are here


Your CentOS box should have swap equal to 2xRAM.

기본적으로 필요한걸 설치한다.

  1. [root@ms3 ~]#  yum install libaio bc flex  


Step 1: Download and Install Oracle 11g XE rpm



You can download the Oracle XE rpm, oracle-xe-11.2.0-1.0.x86_64.rpm.zip, from the OTN here


Unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip:

  1. [root@ms3 ~]# unzip -q oracle-xe-11.2.0-1.0.x86_64.rpm.zip  


This will create the directory Disk1. Change to the Disk1 directory:

  1. [root@ms3 ~]# cd Disk1  
  2. [root@ms3 Disk1]# ls  
  3. oracle-xe-11.2.0-1.0.x86_64.rpm  response  upgrade  


Install the rpm using rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm

  1. [root@ms3 Disk1]# rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm  
  2. Preparing...                ########################################### [100%]  
  3.    1:oracle-xe              ########################################### [100%]  
  4. Executing post-install steps...  
  5. You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database.  
  6.   
  7. [root@ms3 Disk1]#  

 

 

리눅스에서 swap 용량 늘리기

 

free 명령으로 용량을 늘리기 전의 swap 용량을 알아본다.

 

☞ 새로운 스왑 파일의 크기를 알아내신 후 1024를 곱하여 크기를 계산핸 준다.

(예를 들어 256M를 늘리려면 256 × 1024 = 262144, 파일의 크기는 262144입니다.)

 

1. 스왑 파일을 저장할 디렉토리를 만든다.

# mkdir /swap_tmp

 

2. dd명령을 이용해서 swapfile이라는 스왑 파일을 만든다.

# dd if=/dev/zero of=/swap_tmp/swapfile bs=1024 count=262144

 

3. swap_tmp디렉토리로 이동한다.

# cd /swap_tmp

 

4. mkswap 명령을 이용해서 swapfile을 스왑 공간을 쓰도록 만든다.

# mkswap swapfile

 

5. 스왑 파일을 즉시 활성화 하려면 다음의 명령을 입력해 준다.

# swapon swapfile

 

6. 재부팅 후에도 적용하려면 /etc/fatab에 아래의 값을 추가해준다.

# vi /etc/fstab

/swapfile swap swap defaults 1 1

 

 

swap 용량일 늘어난 것을 볼수 있다.

 

 

리눅스에서 swap 용량 제거

1. swapfile을 스왑공간으로 더이상 쓰지 않도록 swapoff 명령으로 스왑공간을 없앤다.

# swapoff swapfile

 

2. swapfile 을 지워버린다.(안지우면 나중에 헷갈린다.)

# rm -rf swapfile

 

3. 부팅 시에도 스왑 공간으로 올라오지 않도록 주석처리하거나 지운다.

# vi /etc/fstab

/swapfile swap swap defaults 1 1 <-- 주석처리