블로그 이미지
귓가를 스치는 음악소리도 즐길 줄 알자 ^^ Tyamo

카테고리

♥Tyamo♥ (159)
MyLifeStyle (79)
TOEIC (25)
Qualification (17)
Robotics (10)
Programing (4)
Trevel (4)
My Diary (14)
Wish List (5)
Network (0)
Total91,896
Today14
Yesterday20

'10g'에 해당되는 글 1건

  1. 2007/12/22 ORACLE 10g 설치하기
사용자 삽입 이미지

일단 실습 환경이 필요 하기에 10g를 설치해 보기로 결정 하였다.

진도도 빠른데 실습 환경 조차 갖춰져 있지 않으면 곤란할것 같아서 였다.

http://www.oracle.com/technology/global/kr/pub/articles/smiley_10gdb_install.html#sles9

여기에 가면 레드햇 엔터프라이즈 4에서 설치하는 방법이 나온다.

엔터프라이즈 4를 구해서 깔아 보았으나 이미지가 불량한지라 쉽게 구할수

있는 센트 OS 쪽으로 갈아 탔다.

CentOS는 웹상에서 무료로 배포하며 레드햇 엔터프라이즈의 복사본과

같으니 4.6을 구해서 VMware에 설치하 였다. -  무려 한시간 반...ㅡ,.ㅡ

그다음에 네트워크 설정해 주고 ~ 으쌰....

오라클 가서 다운을 받으면 됩니당~ rpm 패키지 필요한것들 골라서 깔기

구차는 my부류의 사람들은 OS 설치할때 풀팩으로 체크해 주는 센스~

자 ~ 이제 다운을 끝냈으니 -_-;; 다운도 개념없이 오래 걸리니 미리 걸어 놓고 하는 센스

정확히 10g 릴리즈2 입니다. 설치야 뭐~ 쓱싹 펌 해온 이대로 하면 오케이~

http://blog.naver.com/sjungmin777/100035697971  요기서 퍼왔어염~ ^^

[root@localhost ~]# cd
[root@localhost ~]# groupadd oinstall
[root@localhost ~]# groupadd dba
[root@localhost ~]# useradd -g oinstall -g dba -d /oracle oracle

[root@localhost ~]# id oracle
uid=501(oracle) gid=502(dba) groups=502(dba)
[root@localhost ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.


이제 다운받은 오라클을 오라클 /oracle 폴더에 넣어 소유권을 사용자 ”oracle", 그룹 “oinstall”로 변경합니다.
[root@localhost ~]# chown oracle.oinstall /oracle

오라클 사용자로 로그인하여 옮긴 오라클 파일 압축을 풉니다.

[root@localhost oracle]# ls
10201_database_linux32.zip
[root@localhost oracle]# su oracle
[oracle@localhost ~]$ unzip 10201_database_linux32.zip


압축을 다 푼후 oracle 계정에서 root 계정으로 이동 합니다. exit 명령어를 사용해 root 계정으로 이동 하겠습니다.

root로 계정으로 빠전나온후 /etc/sysctl.conf 환경설정 파일의 커널 파라미터를 수정합니다.

[oracle@localhost ~]$ exit
exit
[root@localhost oracle]# vi /etc/sysctl.conf

======================================================

# Kernel sysctl configuration file for Red Hat Linux
     .....

# Oracle 10gkernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096

 

# semaphores: semmsl, semmns, semopm, semmni
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 5000
net.core.rmem_default=262144
net.core.rmem_max=262144
net.core.wmem_default=262144
net.core.wmem_max=262144

sysctl.conf 파일의 맨 아래에 보라색 부분 글씨를 추가 합니다.


/etc/security/limits.conf 파일을 편집해서, 보안 설정을 수정합니다.

[root@localhost oracle]# vi /etc/security/limits.conf

========================================

*    soft    nproc   2047
*    hard    proc   16384
*    soft    nofile   1024
*    hard    nofile   65536
===============================================

맨 아래 부분에 붙여 넣거나 수정 합니다.


/etc/pam.d/login 파일에 파라미터 보안 설정을 수정합니다.

[root@localhost oracle]# vi /etc/pam.d/login

맨 아래줄에 session을 추가합니다.

========================================

session    required     /lib/security/pam_limits.so

================================================


/etc/profile 파일을 열어서 환경설정을 수정합니다. 맨 아래에 추가 합니다.(글자 및 띄어쓰기 틀리지 않도록 주의 하세요)

최소와 최대값을 지정해주는데 메모리가 부족할시에는 조정을 하여야 합니다.

[root@localhost oracle]# vi /etc/profile

=================================================

if [ $USER = "oracle" ]; then

ulimit -u 4096 -n 16384                 <=== ulimit -u 16384 -n 65536 사이에 조절 합니다.
fi

==============================================


설정을 변경하고 나서, init 6 명령으로 시스템을 재부팅을 한 다음 root 계정으로 로그인 한 후,클라이언트가 어떤 호스트에서든지 연결할 수 있도록 “xhost +” 명령을 입력합니다.

init 6 명령으로 시스템을 재부팅을 합니다.

[root@localhost oracle]# sync

[root@localhost oracle]# sync

[root@localhost oracle]# init 6

Xwindow 상태로 재부팅 완료된후 root 계정으로 로그인 합니다. 로그인후 xhost + 명령어를 치면 어떤 호스트든지 연결할수 있다는 메시지가 뜹니다.
[root@localhost ~]# xhost +
access control disable. clients can connect from any host


오라클 10g는 검증되어진 몇 가지 OS에 대해서만 설치되도록 했기 때문에, /etc/redhat-release 파일을 열어서 “redhat-4" 라고 수정합니다.
# vi etc/redhat-release (파일의 내용을 redhat-4으로 수정)

[root@localhost ~]# vi /etc/redhat-release

CentOS release 4.4 (Final)          <=== 요걸 redhat-4 로변경.

oracle 계정으로 접속해서, oracle 계정 홈 디렉토리에 있는 .bash_profile 파일에 환경변수를 추가합니다.

여기서 중요한점은 su 명령어로 할때 환경변수인 '-' 까지 불러 와야 한다는 것입니다.
[root@localhost ~]# su - oracle 
[oracle@localhost ~]$ vi /oracle/.bash_profile


# .bash_profile

.....

export ORACLE_BASE=/oracle
export TMP=$ORACLE_BASE/tmp
export TMPDIR=$ORACLE_BASE/tmp
export ORACLE_SID=ora10
export LANG=Cexport ORACLE_HOME=$ORACLE_BASE/product/10.1
export ORACLE_OWNER=oracle


추가 해줍니다..


이제 root 계정에서 로그아웃 하고 oracle 계정으로 GUI로 재 로그인 합니다.

oracle 계정으로 로그인후 처음에 옮기고 압축을 푼 /oracle/database/ 폴더의 runInstaller를 실행 하면 오라클 설치 GUI 가 뜨게 됩니다. 만약 글자가 깨지거나 하면 unset LANG 명령을 치면 깨지지 않습니다.

[oracle@localhost ~]$ cd /oracle/database/
[oracle@localhost database]$ ls
doc  install  response  runInstaller  stage  welcome.html
[oracle@localhost database]$ ./runInstaller

위에까지 설치를 다하면 아래그림처럼 터미널을 연후 root 계정으로 변경한후
다음 2가지 커맨드를 실행후 확인 하라고 나옵니다.

[oracle@localhost ~]$ su -

[root@localhost ~]# /oracle/oraInventory/orainstRoot.sh

[root@localhost ~]# /oracle/product/10.1/root.sh

실행후  확인 을 누릅니다.
설치가 완료 되었습니다. ^^

설치후 구동을 위한 환경설정.

/oracle/product/10.1/bin/ 폴더오보면, dbstart와 dbshut파일이 있습니다.

여기에 lsnrctl 파일도 같이 있습니다.


오라클 구동하기 위해 리스너를 띄웁니다.(리스너를 띄우기 위해서는 오라클 계정으로 로그인 해야합니다.)

[root@localhost ~]# su - oracle

[oracle@localhost ~]$ /oracle/product/10.1/bin/lsnrctl start

크리에이티브 커먼즈 라이선스
Creative Commons License
Posted by Tyamo
TAG ,