Linux(CentOS)에 Oracle 11g XE 설치하기
http://egloos.zum.com/zicman/v/3032298
클라우드 서버에서 작동시킬 경우에는
. 마지막에 systemctl stop firewalld 명령어로 방화벽도 중지를 시켜줘야 정상적으로 동작하는 것 같다.
. 나머지는 아래 순서로 진행하면 됨.
The full system requirements are here
Your CentOS box should have swap equal to 2xRAM.
기본적으로 필요한걸 설치한다.
- [root@ms3 ~]# yum install libaio bc flex
You can download the Oracle XE rpm, oracle-xe-11.2.0-1.0.x86_64.rpm.zip, from the OTN here
- [root@ms3 ~]# wget http://download.oracle.com/otn/linux/oracle11g/xe/oracle-xe-11.2.0-1.0.x86_64.rpm.zip?AuthParam=1352953218_8ea418096de61b5700d4352f4e503b27 -O xe/oracle-xe-11.2.0-1.0.x86_64.rpm.zip
Unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip:
- [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:
- [root@ms3 ~]# cd Disk1
- [root@ms3 Disk1]# ls
- 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
- [root@ms3 Disk1]# rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm
- Preparing... ########################################### [100%]
- 1:oracle-xe ########################################### [100%]
- Executing post-install steps...
- You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database.
- [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 <-- 주석처리