OUI를 띄울 수 없는 상황일 때 Silent Mode를 사용해서 오라클 설치
.rsp 파일에 설치에 관련된 설정들을 미리 써놓고 그 파일을 보면서 알아서 설치가 퓩퓩
RHEL3 설치과정은 생략
하드 20G, 메모리 1024MB
파티션 정보: / - 5000
/boot - 100
/var - 1000
swap - 2000
/home - 나머지
Silent Mod 오라클 설치과정:
계정생성 --> 엔진 설치 전 환경설정 및 패치 + oraInst.loc 생성 + enterprise.rsp 수정 --> 엔진설치
--> patchset.rsp 수정 + 엔진패치 --> dbca.rsp 수정 + DB생성
[모든 작업은 root 로 한다]
1. 설치 전 해야할 일
1. oracle 계정 만들기
[root@server103 root]
# groupadd -g 5000 dba
# useradd -d /home/oracle -g dba oracle
# passwd oracle
2. 설치에 필요한 파일들을 oracle 계정으로 복사하기
필요한 파일들:
1. 오라클 9i > /home/oracle/install
2. 필수 패키지: compat-libgcj-7.3-2.96.118.i386.rpm / compat-libgcj-devel-7.3-2.96.118.i386.rpm
> /home/oracle/install/rpm
3. 리눅스 패치 파일: p3006854_9204_LINUX.zip > /home/oracle/install/patch
4. 오라클 패치 파일: p4547809_92080_LINUX.zip > /home/oracle/install/patchset
2. 오라클 설치 전 환경설정 및 패치
1. 공유 메모리 확인
--> 받아오는 메모리를 커널값에다 입력..(?)
rc.local은 윈도우에서 시작프로그램같은 것. 내용을 추가해주면 부팅 때 마다 실행
[root@server103 root]
# echo '2147483648' > /proc/sys/kernel/shmmax
# vi /etc/rc.d/rc.local
echo '2147483648' > /proc/sys/kernel/shmmax 등록해주기
2. 오라클 설치 파일 압축풀기
아까 복사해둔 install 디렉토리에서 ship_9204_linux_disk1.cpio, ship_9204_linux_disk2.cpio, ship_9204_linux_disk3.cpio 파일을 모두 풀어주기
[root@server103 root]
# cd /home/oracle/install
[root@server103 install]
# cpio -idmv < ship_9204_linux_disk1.cpio && cpio -idmv < ship_9204_linux_disk2.cpio && cpio -idmv < ship_9204_linux_disk3.cpio
다 풀면 Disk1,2,3 디렉토리가 생김
3. 리눅스 패치
리눅스 자바 버전이랑 oracle9i 버전을 맞추기 위해서 p3006854_9204_LINUX.zip 를 이용해 패치
[root@server103 install]
# cd patch (or cd /home/oracle/install/patch)
[root@server103 patch]
# unzip p3006854_9204_LINUX.zip
# cd 3006854/ << 압축푼 폴더
[root@server103 3006854]
# sh rhel3_pre_install.sh << 패치 실행해줘야지 runInstall 가능
Applying patch...
Ensuring permissions are correctly set...
Done.
Patch successfully applied << 이렇게 뜨면 패치 성공
4. 필수 패키지 설치
compat-libgcj-7.3-2.96.118.i386.rpm / compat-libgcj-devel-7.3-2.96.118.i386.rpm 를 설치할것임
[root@server103 3006854]
# cd ../../rpm (or /home/oracle/install/rpm)
[root@server103 rpm]
# rpm -Uvh compat-libgcj-* << 두개 한번에 설치
5. 오라클 환경변수 설정하기
[root@server103 rpm]
# vi /home/oracle/.bash_profile
아래 내용 추가해주기
export DISPLAY=localhost:0.0 << Silent mode로 설치를 수행하더라도 내부적으로는 X Window Connection이 필요하다.
따라서 원격에서 ssh 접속하여 오라클 설치 시 아래와 같은 추가 설정이 필요하다.
export ORACLE_BASE=/home/oracle
export ORACLE_HOME=$ORACLE_BASE/product/9.2
export PATH=$PATH:$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
export ORACLE_OWNER=oracle
export ORACLE_SID=testdb
export ORACLE_TERM=xterm
export LD_ASSUME_KERNEL=2.4.1
export THREADS_FLAG=native
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export NLS_LANG=AMERICAN_AMERICA.KO16KSC5601
export LANG=C
6. oraInst.loc 파일 생성
oraInst.loc 파일은 log파일 저장위치를 지정해주는 파일이다.
[root@server103 rpm]
# vi /etc/oraInst.loc
아래 내용 추가하기
inventory_loc=/home/oracle/oraInventory
inst_group=dba
# chown -R oracle.dba /etc/oraInst.loc
7. enterprise.rsp 수정하기
[root@server103 rpm]
# vi /home/oracle/install/Disk1/response/enterprise.rsp
UNIX_GROUP_NAME="dba"
FROM_LOCATION="/home/oracle/install/Disk1/stage/products.jar"
ORACLE_HOME="/home/oracle/product/9.2"
ORACLE_HOME_NAME="OraHome"
s_cfgtyperet="Software Only"
마지막으로
[root@server103 font]
# chown -R oracle.dba /home/oracle
3. 오라클 설치 (엔진설치)
재부팅 후 oracle계정으로 로그인
[oracle@server103 oracle]
$ cd install/Disk1 (or cd /home/oracle/install/Disk1)
[oracle@server103 Disk1]
$ ./runInstaller -silent -responseFile /home/oracle/install/Disk1/response/enterprise.rsp
$ Initializing Java Virtual Machine from /tmp/OraInstall2012-12-09_06-51-22PM/jre/bin/java. Please wait...
이렇게 나오면서 설치 되는 것을 볼 수 있다. (설치과정을 보고 싶지 않으면 옵션에 -noconsole 을 추가하면 됨)
또한 log파일로 설치되고 있는 것을 확인 할 수 있다.
새 터미널을 열고
[oracle@server103 oracle]
$ cd oraInventory/logs (or /home/oracle/oraInventory/logs)
[oracle@server103 logs]
$ tail -f ins(Tab키)
설치가 잘 끝났다고 나오면 (The installation was successful 이나, log 파일에서 *** End of Installation Page*** 나옴)
확인해보기
oracle 계정에서
[oracle@server103 Disk1]
$ sqlplus /nolog
아무 에러 없이 실행이 되면 설치 성공!
4. 오라클 엔진 패치
[oracle@server103 Disk1]
$ cd ../patchset (or cd /home/oracle/install/patchset
[oracle@server103 patchset]
$ ls
p3948480_9206_LINUX.zip p4163445_92070_LINUX.zip p4547809_92080_LINUX.zip
LINUX앞에 있는 숫자가 버전을 말해줌
마지막 파일 p4547809_92080_LINUX.zip 를 사용해 9.2.0.4.0 버전을 9.2.0.8.0 으로 패치
[oracle@server103 patchset]
$ unzip p4547809_92080_LINUX.zip
$ vi /home/oracle/install/patchset/Disk1/response/patchset.rsp
UNIX_GROUP_NAME="dba"
FROM_LOCATION="/home/oracle/install/patchset/Disk1/stage/products.xml"
ORACLE_HOME="/home/oracle/product/9.2"
ORACLE_HOME_NAME="OraHome"
(enterpirse.rsp 에서 수정한 것이랑 똑같이 하면 된다 LOCATION 빼고)
[oracle@server103 patchset]
$ cd Disk1/
[oracle@server103 Disk1]
$ ./runInstaller -silent -responseFile /home/oracle/install/patchset/Disk1/response/patchset.rsp
% 가 나오면서 설치 과정을 보여줌. (안보고 싶으면 아까 옵션에서 -noconsole 추가하면 됨)
역시 log 파일은 /home/oracle/oraInventory/logs 안에 있다. 에러가 날 경우 확인해보라고 나옴.
마지막에 이렇게 뜸
Warning:*** Alert: A configuration script needs to be run as root for the installation to be complete. Please run /home/oracle/product/9.2/root.sh as root at the end of install. ***
A configuration script needs to be run as root for the installation to be complete. Please run /home/oracle/product/9.2/root.sh as root at the end of install.
The installation of Oracle 9iR2 Patch Set was successful.
[root@server103 root]
# /home/oracle/product/9.2/root.sh
~~ 생략 ~~
Enter the full pathname of the local bin directory: [/usr/local/bin]: <<이거 뜨면 그냥 엔터
패치가 잘 되었는지 확인하기 위해서는
oracle 계정에서
[oracle@server103 oracle]
$ sqlplus /nolog
SQL*Plus: Release 9.2.0.8.0 으로 나오면
패치 성공!
5. DB 생성
[oracle@server103 Disk1]
$ cd ../../Disk1/response (or /home/oracle/install/Disk1/response)
[oracle@server103 response]
$ vi dbca.rsp
GDBNAME = "testdb"
SID = "testdb"
CHARACTERSET = "KO16MSWIN949"
NATIONALCHARACTERSET= "UTF8"
[oracle@server103 response]
$ cd /home/oracle/product/9.2/bin
[oracle@server103 bin]
$ ./dbca -silent -responseFile /home/oracle/install/Disk1/response/dbca.rsp
시간이 꽤 오래걸림.
log 파일이 없는건지 못보는건지 모르겠지만 잘 되고 있는지 간간히 확인할 수 있는 방법은
[oracle@server103 oracle]
$ cd /homeoracle/admin/testdb/create/ << 아 여기가 맞는지 모르겠네................쩝
ls 명령어로 간간히 확인해보면 계속 뭔가가 생성되고 있는걸 확인 할수 있음
확인 방법!
[oracle@server103 bin]
$ sqlplus /nolog
SQL> conn /as sysdba
Connected.
SQL> select status from v$instance;
STATUS
------------------------
OPEN
SQL>
이렇게 뜨면 DB 생성까지 성공!
'오라클 설치 > Single mode' 카테고리의 다른 글
RHEL4 에서 오라클 10g 설치 - Silent Mode (0) | 2012.12.10 |
---|---|
RHEL4 에서 오라클 10g 설치 (0) | 2012.12.10 |
RHEL3 에서 오라클 9i 설치 (0) | 2012.12.09 |
RHEL3 - Oracle 8i 설치 (0) | 2012.12.08 |
SCP (0) | 2012.12.08 |