개발

리눅스 오라클 11g express edition 설치

에드몽단테스 2014. 9. 1. 22:10

서버 오라클 11g 설치



  1. 리눅스용 오라클 다운로드
    - oracle-xe-11.2.0-1.0.x86_64.rpm.zip
    - 버전중에 express edition  이 있는데, 이것은 개인 개발자용이고 무료이며 약간의 제약이 있다.
  2. 압축파일을 해제하면 rpm 인데 rpm설치를 한다.
    # rpm -ivh oracle-xe-11.2.0-1.0.x86_64.rpm
  3. # /etc/init.d/oracle-xe configure
  4. 설치가 진행되는 도중 http 포트와 listener 포트를 묻는다.
    http : 8080
    listener : 1521
  5. sys 혹은 system 계정에서 사용할 비밀번호를 세팅한다.
    ****


오라클 실행 : /etc/init.d/oracle-xe start
오라클 종료 : /etc/init.d/oracle-xe stop

오라클 삭제 : rpm 삭제로 진행한다.
# rpm -e oracle-xe

설치가 완료되면 oracle 계정의 home 은 다음과 같다.
# pwd
/u01/app/oracle/

sqlpus를 oracle 계정에서 사용하도록 할 것인데, 약간의 조작이 필요하다.
우선 환경변수가 세팅되어야 하는데 쉘종류에 따라 샘플을 제공하고 있다.

Bourne, Bash or Korn shell:
/u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh

C or tcsh shell :
/u01/app/oracle/product/11.2.0/xe/bin/oracle_env.csh

200번 서버는 bash를 사용하기 때문에 profile을 다음과 같이 만들었다.
/u01/app/oracle/.bash_profile

export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe
export ORACLE_SID=XE
export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`
export PATH=$ORACLE_HOME/bin:$PATH

이제 sqlplus를 사용해보자

# su - oracle
$ sqlplus system
password : ****

sql>

마지막으로 원격지의 클라이언트가 조작할 수 있도록 변수 설정을 하자.
SQL> EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);

PL/SQL procedure successfully completed.

끝~


반응형