Linux 기반의 Oracle10g 설치
Oracle 10g를 리눅스에서 설치하던 기억이 난다. 오라클 양성반 과정에서 오라클 설치를 위한 커널 설정부터
필요한 패키지 설정까지 다 외우고 시험보던 기억들이 새록새록 하다. 오랫만에 리눅스 기반에서 Oracle 10g 설치 방법을 정리해 보았다.
1. Hosts File
# vi /etc/hosts
127.0.0.1 expert.oracle.com~
192.168.100.100 expert.oracle.com~
2. Kernel Parameters 설정
# Controls the maximum size of a message, in bytes
kernel.msgmnb = 65536
# Controls the default maxmimum size of a mesage queue
kernel.msgmax = 65536
# Controls the maximum shared segment size, in bytes
kernel.shmmax = 2147483648
# Controls the maximum number of shared memory segments, in pages
kernel.shmall = 2097152
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
3. Kernel Parameters를 변경 적용
[root@ocm52 ~]# /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 = 2147483648
kernel.shmall = 2097152
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
4. /etc/security/limits.conf 파일에 아래의 내용을 추가.
[root@ocm52 ~]# vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
5. /etc/pam.d/login 파일에 아래의 내용이 없다면 추가
[root@ocm52 ~]# vi /etc/pam.d/login
session required pam_selinux.so open
session optional pam_keyinit.so force revoke
session required /lib/security/pam_limits.so
6. /etc/selinux/config 파일에 아래의 내용을 변경.
[root@ocm52 ~]# vi /etc/selinux/config
SELINUX=disabled (enforce를 disable로 변경)
7. RedHat Enterprise linux AS에 오라클 설치시 필요한 package
(oracle 설치 전 반드시 조회한 후 각 CD를 이용하여 설치되지 않은 패키지를 설치해야 함.)
=> 대부분의 패키지가 전부 설치 되어있으니 확인만 하면 됨.
=> RPM 조회 : rpm -qa | grep 패키지명
#From RedHat AS4 Disk 2
cd /media/media/Enterprise linux cd | 20071115/server
[root@ocm52 Server]# rpm -Uvh compat-db-4.2.52-5.1.i386.rpm
warning: compat-db-4.2.52-5.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 1e5e0159
Preparing... ########################################### [100%]
1:compat-db ########################################### [100%]
[root@ocm52 Server]# cd
[root@ocm52 ~]# cd /mnt/hgfs/shared
[root@ocm52 shared]# ls
10201_database_linux32.zip libaio-devel-0.3.107-2.i386.rpm
[root@ocm52 shared]# rpm -Uvh libaio-devel-0.3.107-2.i386.rpm
Preparing... ########################################### [100%]
1:libaio-devel ########################################### [100%]
8. Create the new groups and user(새로운 사용자 및 그룹 추가)
[root@ocm52 shared]# groupadd dba
[root@ocm52 shared]# groupadd oinstall
[root@ocm52 shared]# groupadd oper
[root@ocm52 shared]# groupadd asmadmin
[root@ocm52 shared]# useradd -g oinstall -G dba,oper,asmadmin oracle
[root@ocm52 shared]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[root@ocm52 shared]# mkdir -p /u01/app/oracle/product/10.2.0/db_1
[root@ocm52 shared]# chown -R oracle.oinstall /u01
[root@ocm52 shared]# more /etc/passwd | grep oracle
oracle:x:502:503::/home/oracle:/bin/bash
9. 오라클 설치할 폴더 생성
[root@ocm52 shared]# su - oracle
[oracle@ocm52 ~]$ mkdir -p /u01/app/oracle/product/10.2.0
[oracle@ocm52 ~]$ mkdir -p /u01/app/oracle/tmp
[oracle@ocm52 ~]$ mkdir -p /u01/app/oracle/java
10. DISPLAY 설정 (*root 계정으로 설정)
#xhost+<machine-name | ip>
ex) #xhost +192.168.100.100 or xhost+expert.oracle.com
[root@ocm52 ~]# xhost +192.168.100.100
192.168.100.100 being added to access control list
11. .bash_profile에다가 아래의 내용을 추가 해준다.
[root@ocm52 ~]# su - oracle
[oracle@ocm52 ~]$ vi .bash_profile (or$vi.bashrc)
#User specific envirnment and startup programs
PATH=$PATH:$HOME/bin:.:/u01/app/oracle/product/10.2.0/bin
export PATH
export ORACLE_BASE=/u01/app/oracle
export ORACLE_OWNER=oracle
export ORACLE_HOME=/u01/app/oracle/product/10.2.0
export ORACLE_TERM=vt100
export TMPDIR=$ORACLE_BASE/tmp
export TEMP=$ORACLE_BASE/tmp
export NLS_LANG=AMERICAN_AMERICA.KO16KSC5601
export ORACLE_SID=DB01
export JAVA_HOME=$ORACLE_HOME/jdk
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
umask 022
:wq
[oracle@ocm52 ~]$ . .bash_profile ==>적용 ($source.bash_profile)
12. profile 변경
[oracle@ocm52 ~]$ su - (root로 접속 변경)
Password:
[root@ocm52 ~]# vi /etc/profile
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
13. X-win 변경
[root@ocm52 ~]# vi /etc/inittab (runlever)
id:5 =============================>id:3으로 변경
[root@ocm52 ~]# reboot
'프로그램 > ORACLE' 카테고리의 다른 글
Administering User Security (0) | 2016.11.30 |
---|---|
마스터 TABLE 데이터 간단히 BACKUP 하기! (0) | 2016.11.30 |
Backup & Recovery (0) | 2016.11.30 |
with grant option & with admin option 차이 (0) | 2016.11.30 |
데이터베이스]SEQUENCE(시퀀스)란 무엇인가? (0) | 2016.11.30 |