Oracle 10gr2 / 11gr2 설치 on cent os 5.5 (vmware 사용)
2011.03.20 20:39
설치환경
Base 환경
- Windows 7 Ultimate 64Bit / I5 / 4G ram
사용 SW
- vmware 7.1.3 / Cent OS 5.5 / Oracle 10g R2 linux x86
1. VMware
Vmware SW 설치
설치 완료후
New Virtual Machine 선택 (Cent Os를 위한 가상 환경 생성)
- Ram 1G,
- Hdd 20G,
- Bridge Network
(설치후 network에 문제가있을경우 vmware network editor 에서 automatic 을 실제 사용하는 nic로 변경)- OS Type: Linux , Cent
Tip. vmware를 구하기 어렵거나 비용등의 문제가 있으면
https://www.vmware.com/support/
에서 vmware player 를 사용하여 install 하여도됨.
2. OS 설치
2.1. 준비
http://www.centos.org/ 를 통해 Cent OS 5.5 다운로드 하거나 아래 torrent seed로 다운
CentOS-5.5-i386-bin-DVD.torrent
(실환경의 경우 생략)
다운 받은 ISO 를 위에서 생성한 vmware setting 의 Hardware Tab의
CD/DVD 를 통해 설치시 사용하도록 설정후 vmware 이미지 수행
2.2. OS 설치
Default 옵션으로 모두 설치
패키지들 초기 설치시 선택 하지 않음
(패키시 설정에서 gnome 만 선택된 상태에서 모두 테스트한내용)
본문서에서 설치하는 방법은 Cent OS의 기본값에서 selinux만 disabled / 파티션 등도 특별하게 나누지 않았음 ^^;;
os 설치의 경우 사용용도에 따라 달라 지므로 설명 생략
network 설정도 dhcp 환경이라고 가정하에서 수행 (설정아무것도 없음. ㅋ)
2.3. 관련 package 설치
Terminal 창에서 수행 (마우스 오른쪽버튼 open terminal)
[tofriend@localhost ~]$ su -
[root@localhost ~]# yum install setarch make glibc libaio compat-libstdc++-33 compat-gcc-34 gcc libXp openmotif compat-db
Password:Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: ftp.daum.net
* base: ftp.daum.net
* extras: ftp.daum.net
* updates: ftp.daum.net
Setting up Install Process
Package setarch-2.0-1.1.i386 already installed and latest version
Package 1:make-3.81-3.el5.i386 already installed and latest version
Package libaio-0.3.106-5.i386 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package compat-db.i386 0:4.2.52-5.1 set to be updated
---> Package compat-gcc-34.i386 0:3.4.6-4 set to be updated
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: compat-gcc-34
---> Package compat-libstdc++-33.i386 0:3.2.3-61 set to be updated
---> Package gcc.i386 0:4.1.2-48.el5 set to be updated
--> Processing Dependency: libgomp >= 4.1.2-48.el5 for package: gcc
--> Processing Dependency: glibc = 2.5-49 for package: nscd
---> Package glibc.i686 0:2.5-49.el5_5.7 set to be updated
--> Processing Dependency: glibc-common = 2.5-49.el5_5.7 for package: glibc
---> Package libXp.i386 0:1.0.0-8.1.el5 set to be updated
---> Package openmotif.i386 0:2.3.1-5.el5_5.1 set to be updated
addons/filelists | 195 B 00:00
base/filelists_db | 3.4 MB 00:00
extras/filelists_db | 195 kB 00:00
updates/filelists | 3.3 MB 00:00
--> Running transaction check
---> Package glibc-common.i386 0:2.5-49.el5_5.7 set to be updated
---> Package glibc-devel.i386 0:2.5-49.el5_5.7 set to be updated
--> Processing Dependency: glibc-headers = 2.5-49.el5_5.7 for package: glibc-devel
--> Processing Dependency: glibc-headers for package: glibc-devel
---> Package libgomp.i386 0:4.4.0-6.el5 set to be updated
---> Package nscd.i386 0:2.5-49.el5_5.7 set to be updated
--> Running transaction check
---> Package glibc-headers.i386 0:2.5-49.el5_5.7 set to be updated
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers
--> Processing Dependency: kernel-headers for package: glibc-headers
--> Running transaction check
---> Package kernel-headers.i386 0:2.6.18-194.32.1.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
compat-db i386 4.2.52-5.1 base 1.7 M
compat-gcc-34 i386 3.4.6-4 base 4.1 M
compat-libstdc++-33 i386 3.2.3-61 base 232 k
gcc i386 4.1.2-48.el5 base 5.2 M
libXp i386 1.0.0-8.1.el5 base 23 k
openmotif i386 2.3.1-5.el5_5.1 updates 1.5 M
Updating:
glibc i686 2.5-49.el5_5.7 updates 5.3 M
Installing for dependencies:
glibc-devel i386 2.5-49.el5_5.7 updates 2.0 M
glibc-headers i386 2.5-49.el5_5.7 updates 602 k
kernel-headers i386 2.6.18-194.32.1.el5 updates 1.1 M
libgomp i386 4.4.0-6.el5 base 70 k
Updating for dependencies:
glibc-common i386 2.5-49.el5_5.7 updates 16 M
nscd i386 2.5-49.el5_5.7 updates 166 k
Transaction Summary
================================================================================
Install 10 Package(s)
Upgrade 3 Package(s)
Total download size: 38 M
Is this ok [y/N]: y
Downloading Packages:
(1/13): libXp-1.0.0-8.1.el5.i386.rpm | 23 kB 00:00
(2/13): libgomp-4.4.0-6.el5.i386.rpm | 70 kB 00:00
(3/13): nscd-2.5-49.el5_5.7.i386.rpm | 166 kB 00:00
(4/13): compat-libstdc++-33-3.2.3-61.i386.rpm | 232 kB 00:00
(5/13): glibc-headers-2.5-49.el5_5.7.i386.rpm | 602 kB 00:00
(6/13): kernel-headers-2.6.18-194.32.1.el5.i386.rpm | 1.1 MB 00:00
(7/13): openmotif-2.3.1-5.el5_5.1.i386.rpm | 1.5 MB 00:00
(8/13): compat-db-4.2.52-5.1.i386.rpm | 1.7 MB 00:00
(9/13): glibc-devel-2.5-49.el5_5.7.i386.rpm | 2.0 MB 00:00
(10/13): compat-gcc-34-3.4.6-4.i386.rpm | 4.1 MB 00:00
(11/13): gcc-4.1.2-48.el5.i386.rpm | 5.2 MB 00:00
(12/13): glibc-2.5-49.el5_5.7.i686.rpm | 5.3 MB 00:00
(13/13): glibc-common-2.5-49.el5_5.7.i386.rpm | 16 MB 00:02
--------------------------------------------------------------------------------
Total 6.3 MB/s | 38 MB 00:06
warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID e8562897
updates/gpgkey | 1.5 kB 00:00
Importing GPG key 0xE8562897 "CentOS-5 Key (CentOS 5 Official Signing Key) <centos-5-key@centos.org>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : glibc-common 1/16
Installing : kernel-headers 2/16
Updating : glibc 3/16
Installing : glibc-headers 4/16
Installing : glibc-devel 5/16
Installing : libgomp 6/16
Installing : libXp 7/16
Installing : openmotif 8/16
Updating : nscd 9/16
Installing : compat-db 10/16
Installing : gcc 11/16
Installing : compat-libstdc++-33 12/16
Installing : compat-gcc-34 13/16
Cleanup : nscd 14/16
Cleanup : glibc-common 15/16
Cleanup : glibc 16/16
Installed:
compat-db.i386 0:4.2.52-5.1 compat-gcc-34.i386 0:3.4.6-4
compat-libstdc++-33.i386 0:3.2.3-61 gcc.i386 0:4.1.2-48.el5
libXp.i386 0:1.0.0-8.1.el5 openmotif.i386 0:2.3.1-5.el5_5.1
Dependency Installed:
glibc-devel.i386 0:2.5-49.el5_5.7 glibc-headers.i386 0:2.5-49.el5_5.7
kernel-headers.i386 0:2.6.18-194.32.1.el5 libgomp.i386 0:4.4.0-6.el5
Updated:
glibc.i686 0:2.5-49.el5_5.7
Dependency Updated:
glibc-common.i386 0:2.5-49.el5_5.7 nscd.i386 0:2.5-49.el5_5.7
Complete!
[root@localhost ~]# rpm -qa setarch make glibc libaio compat-libstdc++-33 compat-gcc-34 gcc libXp openmotif compat-db
setarch-2.0-1.1
libaio-0.3.106-5
glibc-2.5-49.el5_5.7
libXp-1.0.0-8.1.el5
compat-db-4.2.52-5.1
gcc-4.1.2-48.el5
compat-libstdc++-33-3.2.3-61
make-3.81-3.el5
openmotif-2.3.1-5.el5_5.1
compat-gcc-34-3.4.6-4
[root@localhost ~]#
2.4. 환경 설정
계속해서 Terminal 창에서 수행 (마우스 오른쪽버튼 open terminal)
/etc/redhat_release 변경
[root@localhost ~]# vi /etc/redhat-release
redhat-4
변경 (기존 CentOS release 5.5 (Final) 를 redhat-4 로 변경)
/etc/security/limits.conf 내용추가
[root@localhost ~]# vi /etc/security/limits.conf
* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536
추가
/etc/sysctl.conf 내용추가
[root@localhost ~]# vi /etc/sysctl.conf
kernel.shmmax = 4294967295
kernel.shmall = 268435456
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
추가 후 설정 확인 (아래와같이 나오면 정상)
[root@localhost ~]# /sbin/sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 4294967295
kernel.shmall = 268435456
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
[root@localhost ~]#
/etc/pam.d/login 내용추가
[root@localhost ~]# vi /etc/pam.d/login
session required /lib/security/pam_limits.so
추가
이쯤 해서 centos rebooting 한후 진행하는것이 좋음
설치 관련 계정 및 디렉토리 생성
[root@localhost ~]# groupadd oinstall
[root@localhost ~]# groupadd dba
[root@localhost ~]# useradd -g oinstall -G dba oracle
[root@localhost ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@localhost ~]# mkdir -p /u01/app/oracle/product/10.2.0/db_1
[root@localhost ~]# chown -R oracle.oinstall /u01
[root@localhost ~]# mkdir -p /oracle/oradata
[root@localhost ~]# chown -R oracle.oinstall /oracle
.bash_profile 추가 (환경설정, oracle 계정)
[root@localhost ~]# su - oracle
[oracle@localhost ~]$ vi .bash_profile
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
export DISPLAY=:0.0
추가
3. 오라클 설치
3.1. 준비
oracle 10g r2 다운로드
http://www.oracle.com/technetwork/database/10201linuxsoft-097986.html
본 문서에서는 base os (windows 7)에서 다운로드 후 sftp를 통해 oracle 계정으로 전송하였으나
설치된 cent os 의 firefox에서 바로 다운로드 하거나
vmware 의 vmware shared folder 를 통해서 전송하는등 방법은 많음. ^^*
Terminal 창에서 수행 (마우스 오른쪽버튼 open terminal)
[oracle@localhost ~]$ ls -al 파일확인
total 653744
drwx------ 3 oracle oinstall 4096 Mar 20 13:42 .
drwxr-xr-x 4 root root 4096 Mar 20 13:34 ..
-rw-r--r-- 1 oracle oinstall 668734007 Mar 20 13:41 10201_database_linux32.zip
-rw------- 1 oracle oinstall 48 Mar 20 13:38 .bash_history
-rw-r--r-- 1 oracle oinstall 33 Mar 20 13:34 .bash_logout
-rw-r--r-- 1 oracle oinstall 507 Mar 20 13:37 .bash_profile
-rw-r--r-- 1 oracle oinstall 124 Mar 20 13:34 .bashrc
drwxr-xr-x 4 oracle oinstall 4096 Mar 20 13:34 .mozilla
-rw------- 1 oracle oinstall 743 Mar 20 13:37 .viminfo
[oracle@localhost ~]$ unzip 10201_database_linux32.zip
설치 파일 압축해제
[oracle@localhost ~]$ ls
10201_database_linux32.zip database
3.2. 설치
[oracle@localhost ~]$ su - 루트로 변경
[root@localhost ~]# xhost +
access control disabled, clients can connect from any host
[root@localhost ~]# su - oracle 설치를 위해 oracle계정
[oracle@localhost ~]$ cd database/
[oracle@localhost database]$ ./runInstaller
Starting Oracle Universal Installer...
Checking installer requirements...
Checking operating system version: must be redhat-3, SuSE-9, redhat-4, UnitedLinux-1.0, asianux-1 or asianux-2
Passed
All installer requirements met.
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2011-03-20_02-03-20PM. Please wait ...
Installer 가 수행되면 환경에 맞게 설치
- 테스트 목적이라면 Basic Installation으로 수행
- 설치 완료 시점에 스크립터 수행의 경우
- 새로운 터미널 창을 연후 root 계정으로 수행하여야 함 (아래 화면 참조)
설치화면
OS 설치시 network를 static 으로 설치하였을 경우 network 부분은 문제없이 지니가지만
본 문서처럼 dhcp라면 확인을 해준후 Next
새로운 터미널 창을 연후 su - 로 root 권한 획득 후 아래와 같이 스크립터 수행
설치 완료후 확인 및 scott/tiger 계정 enable
[oracle@localhost database]$ sqlplus '/as sysdba'
SQL*Plus: Release 10.2.0.1.0 - Production on Sun Mar 20 17:50:12 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 96470608 bytes
Database Buffers 184549376 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
SQL> alter user scott account unlock;
User altered.
SQL> conn scott/tiger;
Connected.
SQL> select * from emp where rownum=1;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
---------- ---------- --------- ---------- --------- ---------- ---------- ----------
7369 SMITH CLERK 7902 17-DEC-80 800 20
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
[oracle@localhost ~]$ lsnrctl status
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 20-MAR-2011 21:16:43
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 20-MAR-2011 17:12:43
Uptime 0 days 4 hr. 3 min. 59 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
Listener Log File /u01/app/oracle/product/10.2.0/db_1/network/log/listener.log
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "orcl" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orclXDB" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
Service "orcl_XPT" has 1 instance(s).
Instance "orcl", status READY, has 1 handler(s) for this service...
The command completed successfully
[oracle@localhost ~]$
추가 - 11g r2 설치 (대부분동일)
vmware 설정시 메모리 1G 이상확인후
패키지설치
yum install make binutils gcc libaio libaio-devel libstdc++ libstdc++-devel sysstat libgcc elfutils-libelf elfutils-libelf-devel glibc-common glibc-devel gcc-c++ unixODBC pdksh unixODBC-devel compat-libstdc++-33-3.2.3-61
커널 파라미터
vi /etc/sysctl.conf
fs.suid_dumpable = 1
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 536870912
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586
이외 동일 redhat-release 변경 필요없음
ORACLE_BASE 디렉토리 이름 및 path 변경 (상황에 맞게. 10.2.0 -> 11.2 )
참조 link
번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|
7 | 오라클 18c 계정생성 오류 ORA-65096: 공통 사용자 또는 롤 이름이 부적합합니다. | 남송휘 | 2019.07.26 | 19917 |
6 | 오라클 DBMS 윈도우 버전(2014년 03월 현재) | balto | 2014.02.28 | 26455 |
5 | 버전별 Oracle Online Documentation Library [2] | 실천하자 | 2011.04.26 | 170443 |
4 | sqlplus plan table 생성및 plustrace 권한 부여 [1] | 휘휘 | 2011.03.20 | 160337 |
» | Oracle 10gr2 / 11gr2 설치 on cent os 5.5 (vmware 사용) [2] | 휘휘 | 2011.03.20 | 124533 |
2 | ORA-28000: the account is locked | 휘휘 | 2010.06.06 | 147164 |
1 | ORACLE 설치후 SCOTT/TIGER 실습계정이 없을경우 [1] | 남송휘 | 2010.06.06 | 154283 |
와우~ 감사합니다. 윈도우 7로 갈아타시더니 ㅎㅎ 기회가 닿을때 참고할께요~