Proxmox VE 6 部署Oracle 19C(单实例)

准备虚拟机,基本配置为:16G内存、4core cpu、4个磁盘(1个系统盘、一个/tmp分区、一个数据分区、一个交换分区swap)。

Proxmox VE 6 部署Oracle 19C(单实例)

准备操作系统,并使磁盘可用。

Proxmox VE 6 部署Oracle 19C(单实例)

建议正式环境为用户数据存储提供独立的磁盘或者分区。

[root@CentOS100 home]# unzip LINUX.X64_193000_db_home.zip -d /home/oracle19c

 

[root@centos100 home]# unzip LINUX.X64_193000_db_home.zip  -d /home/oracle19c

Proxmox VE 6 部署Oracle 19C(单实例)

[root@centos100 ~]# more preinstall.sh #!/bin/bash #writen by sery(wx:formyz),2019-7-18 #install dependency package yum install -y \ bc \ binutils \ compat-libcap1 \ compat-libstdc++-33 \ elfutils-libelf \ elfutils-libelf-devel \ fontconfig-devel \ glibc \ glibc-devel \ kmod \ kmod-libs \ gcc-c++ \ ksh \ libaio \ libaio-devel \ libX11 \ libXau \ libXi \ libXtst \ libXrender \ libXrender-devel \ libgcc \ librdmacm-devel \ libstdc++ \ libstdc++-devel \ libxcb \ make \ net-tools \ nfs-utils \ Python \ python-configshell \ python-rtslib \ python-six \ targetcli \ smartmontools \ sysstat \ tigervnc-server #install xwindow yum groupinstall –y "X Window System" yum groupinstall -y "GNOME Desktop" "Graphical Administration Tools" #modify system parameter cat << EOF > /etc/sysctl.d/98-oracle-kernel.conf vm.swappiness = 1 vm.dirty_background_ratio = 3 vm.dirty_ratio = 80 vm.dirty_expire_centisecs = 500 vm.dirty_writeback_centisecs = 100 kernel.sem = 250 32000 100 128 fs.aio-max-nr = 1048576 fs.file-max = 6815744 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 = 1048576 kernel.msgmnb = 65536 kernel.msgmax = 65536 kernel.shmmax = 8589934590 kernel.shmall = 2147483648 kernel.shmmni = 4096 EOF sysctl -p /etc/sysctl.d/98-oracle-kernel.conf cat << EOF > /etc/security/limits.d/99-oracle-limits.conf oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 oracle soft stack 10240 oracle hard stack 32768 EOF #create groups and user groupadd -g 1000 oinstall groupadd -g 1001 dba useradd -g oinstall -G dba oracle echo "sery888"|passwd --stdin oracle #create directory mkdir -p /u01/app/oracle/product/19.3/db_01 chown -R oracle.oinstall /u01 chmod -R 755 /u01

 

[root@centos100 ~]# more preinstall.sh 

#!/bin/bash

#writen by sery(wx:formyz),2019-7-18

#install dependency package

yum install -y \

bc \

binutils \

compat-libcap1 \

compat-libstdc++-33 \

elfutils-libelf \

elfutils-libelf-devel \

fontconfig-devel \

glibc \

glibc-devel \

kmod \

kmod-libs \

gcc-c++ \

ksh \

libaio \

libaio-devel \

libX11 \

libXau \

libXi \

libXtst \

libXrender \

libXrender-devel \

libgcc \

librdmacm-devel \

libstdc++ \

libstdc++-devel \

libxcb \

make \

net-tools \

nfs-utils \

python \

python-configshell \

python-rtslib \

python-six \

targetcli \

smartmontools \

sysstat \

tigervnc-server

#install xwindow

yum groupinstall –y "X Window System"

yum groupinstall  -y "GNOME Desktop" "Graphical Administration Tools"

#modify system parameter

cat << EOF > /etc/sysctl.d/98-oracle-kernel.conf

vm.swappiness = 1

vm.dirty_background_ratio = 3

vm.dirty_ratio = 80

vm.dirty_expire_centisecs = 500

vm.dirty_writeback_centisecs = 100

kernel.sem = 250 32000 100 128

fs.aio-max-nr = 1048576

fs.file-max = 6815744

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 = 1048576

kernel.msgmnb = 65536

kernel.msgmax = 65536

kernel.shmmax = 8589934590 

kernel.shmall = 2147483648

kernel.shmmni = 4096

EOF

sysctl -p /etc/sysctl.d/98-oracle-kernel.conf

cat << EOF > /etc/security/limits.d/99-oracle-limits.conf

oracle soft nproc 2047

oracle hard nproc 16384

oracle soft nofile 1024

oracle hard nofile 65536

oracle soft stack 10240

oracle hard stack 32768

EOF

#create groups and user

groupadd -g 1000 oinstall

groupadd -g 1001 dba

useradd -g oinstall -G dba oracle

echo "sery888"|passwd --stdin oracle

#create directory

mkdir -p /u01/app/oracle/product/19.3/db_01

chown -R oracle.oinstall /u01

chmod -R 755 /u01

此脚本执行完以后,再对oracle帐号设置环境变量。切换到用户oracle,然后编辑文件/home/oracle/.bash_profile。增加其内容为:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/d6b8070be8166d6fa357f3214a033904.html