Oracle 12c 설치 Silent Installation 방식이며 OFA(Optimal Flexible Architecture) 를 따른다. 환경 CentOS 7 64bit Memory 8GB Swap 16GB (Swap must be enabled double the size of RAM) Storage Size 40GB 호스트네임 변경
1 2 3 4 |
hostnamectl set-hostname oraserv1 hostnamectl set-hostname oraserv1 --static hostnamectl set-hostname "Server1 of Oracle Database" --pretty hostnamectl set-hostname oraserv1 --transient |
계정생성
1 2 3 4 5 6 7 8 9 10 11 |
groupadd -g 500 oinstall groupadd -g 501 dba groupadd -g 502 oper groupadd -g 503 backupdba groupadd -g 504 dgdba groupadd -g 505 kmdba groupadd -g 506 asmdba groupadd -g 507 asmoper groupadd -g 508 asmadmin useradd -u 500 -g oinstall -G dba,oper,backupdba,dgdba,kmdba oracle |
의존성 패키지 설치
1 |
yum install compat-libcap1-1.10 compat-libstdc++-* libstdc++-devel-* sysstat-10.1.5* gcc-4.* gcc-c++-4.* ksh* glibc-devel-* libaio-* libaio-devel-* |
OFA 디렉토리 생성
1 2 3 |
mkdir -p /u01/app/oracle/product/12.1.0.2/db_1 mkdir -p /u01/app/oraInventory chown oracle:oinstall -R /u01 |
sysctl.conf
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
fs.aio-max-nr = 1048576 # It is recommended to have a minimum of 256 as value for every 4MB of RAM you have. # So for 8GB RAM = 2048 * 4MB = 2048 * 256 = 524288 fs.file-max = 6815744 # It sets the maximum number of shared memory segments that server can handle. # As Oracle recommends the value should be at least 4096, # it says that we cannot find more than 4096 number of shared memory segments at any instance on the server. # Note that SHMMNI value is in numbers. # # No change it should be 4096. It must be increased if you have more than at least one fourth (1024) Oracle Databases running on the server. Which we never recommend. kernel.shmmni = 4096 # It defines the total amount of shared memory PAGES that can be used system-wide. # It means that to the use all the physical memory this value should be less than or equal to total physical memory size. # For DBA's, it means that sum of all SGA sizes on the server should be less than or equal to SHMALL value. # Note that SHMALL value is a number of pages. # # If you want the maximum size of SGA on this server to be 5GB, then this parameter value should be 5*1024*1024*1024 = 5368709120 bytes. This, in turn, says that you should not have any database with more than 5GB of SGA. But you can have multiple databases with each 5GB of SGA or even less. This is the fact why Oracle recommends to have this value more than half of the memory to utilize it for SGA(s). # # By chance, if your SGA size is more than 5GB say it is 7GB then 2 shared memory areas will be allocated to SGA with one of 5GB and two of 2GB sizes, which doesn's perform well. kernel.shmmax = 4294967296 # It defines the total amount of shared memory PAGES that can be used system-wide. It means that to the use all the physical memory this value should be less than or equal to total physical memory size. For DBA's, it means that sum of all SGA sizes on the server should be less than or equal to SHMALL value. Note that SHMALL value is a number of pages. # By default the page size on Linux is 4KB. The total size of RAM is 8GB. Let us leave at least 1GB of RAM for Linux kernel to run, with which consider 7GB can be used for Oracle Databases. Now value of SHMALL can be: # # (7*1024*1024)KB/4KB = 1835008 kernel.shmall = 1835008 kernel.sem = 250 32000 100 128 # This parameter defines the range of port numbers that system can use for programs which want to connect to the server without a specific port number. # # Now, it makes sense if you have come across somebody advising you not to use port numbers for listener beyond 9000. Also, just look back to documents on OEM installation, Oracle uses and advises all the default port numbers less than 9000. net.ipv4.ip_local_port_range = 9000 65500 # This parameter defines the default and maximum RECEIVE socket memory through TCP. net.core.rmem_default = 262144 net.core.rmem_max = 4194304 # This parameter defines the default and maximum SEND socket memory through TCP. net.core.wmem_default = 262144 net.core.wmem_max = 1048586 |
/etc/security/limits.conf
1 2 3 4 5 6 7 |
# http://www.tecmint.com/setting-up-prerequisites-for-oracle-12c-installation/ oracle soft nofile 1024 oracle hard nofile 65536 oracle soft nproc 2047 oracle hard nproc 16384 oracle soft stack 10240 oracle hard stack 32768 |
/etc/security/limits.d/20-nproc.conf
1 2 |
* - nproc 16384 root soft nproc unlimited |
/etc/oraInst.loc
1 2 3 4 5 6 |
]# vim /etc/oraInst.loc inventory_loc=/u01/app/oraInventory inst_group=oinstall ]# chown oracle:oinstall /etc/oraInst.loc ]# chmod 664 /etc/oraInst.loc |
oracle 계정으로 로그인 한후에 Oracle 12c 바이너리 설치 파일을 다음과 같이 압축 해제.
1 2 3 4 5 |
]$ mkdir -p orainst/12.1.0.2 ]$ cp *.zip orainst/12.1.0.2/ ]$ cd orainst/12.1.0.2 ]$ unzip linuxamd64_12102_database_1of2.zip ]$ unzip linuxamd64_12102_database_2of2.zip |
Silent 설치를 위한 파일 작성 […]