The full system requirements are here
Your CentOS box should have swap equal to 2xRAM.
기본적으로 필요한걸 설치한다.- [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:
- [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 <-- 주석처리 Step 2: Configure 11g XE Database and Options
When installation completes, run '/etc/init.d/oracle-xe configure' to configure and start the database.
Unless you wish to change the ports, except the defaults and set SYS/SYSTEM password.
- [root@ms3 Disk1]# /etc/init.d/oracle-xe configure
-
- Oracle Database 11g Express Edition Configuration
- -------------------------------------------------
- This will configure on-boot properties of Oracle Database 11g Express
- Edition. The following questions will determine whether the database should
- be starting upon system boot, the ports it will use, and the passwords that
- will be used for database accounts. Press <enter> to accept the defaults.
- Ctrl-C will abort.
-
- Specify the HTTP port that will be used for Oracle Application Express [8080]:
-
- Specify a port that will be used for the database listener [1521]:
-
- Specify a password to be used for database accounts. Note that the same
- password will be used for SYS and SYSTEM. Oracle recommends the use of
- different passwords for each database account. This can be done after
- initial configuration:
- Confirm the password:
-
- Do you want Oracle Database 11g Express Edition to be started on boot (y/n) [y]:y
-
- Starting Oracle Net Listener...Done
- Configuring database...Done
- Starting Oracle Database 11g Express Edition instance...Done
- Installation completed successfully.</enter>
The installation created the directory /u01 under which Oracle XE is installed.
Step 3: Set the Environment
To set the required Oracle environment variables, use the oracle_env.sh the script included under cd /u01/app/oracle/product/11.2.0/xe/bin- [root@ms3 Disk1]# cd /u01/app/oracle/product/11.2.0/xe/bin
To set the environment for your current session run '. ./oracle_env.sh':
- [root@ms3 bin]# . ./oracle_env.sh
To set the environment permanently for users, add the following to the .bashrc or .bash_profile of the users you want to access the environment:
- . /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh
You should now be able to access SQL*Plus
- [root@ms3 bin]# sqlplus /nolog
-
- SQL*Plus: Release 11.2.0.2.0 Production on Wed Sep 21 08:17:26 2011
-
- Copyright (c) 1982, 2011, Oracle. All rights reserved.
-
- SQL> connect sys/Password as sysdba
- Connected.
- SQL>
Step 4: Allow Remote Access to Oracle 11g XE GUI
To allow remote access to Oracle 11g XE GUI (as well as Application Express GUI) issue the following from SQL*Plus
- SQL> EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);
-
- PL/SQL procedure successfully completed.
You should now be able to access the Oracle 11g XE Home Page GUI at:
http://localhost:8080/apex/f?p=4950:1
Replace localhost above with your IP or domain as required.
Log in as SYSTEM using the password you selected in Step 2 above.
(여기까지 하면 기본적인 운영은 가능할 듯 by 오리너구리) |