CentOS_7 Install Oracle 19c configuration
1.安装操作系统
系统磁盘分配:
/boot 200M
/boot/efi 300M
swap 16384M
/ all
系统版本:CentOS-7-x86_64-DVD-2009.iso
Oracle版本:LINUX.X64_193000_db_home.zip
2.系统准备
2.1内核参数调整
vi /etc/sysctl.conf
kernel.shmall = 264060061
#填入命令echo "`cat /proc/meminfo | grep "MemTotal" | awk '{print $2}'` / (`getconf PAGESIZE` / 1024)" | bc 的运行结果
kernel.shmmax = 865272007884
#填入命令echo "`cat /proc/meminfo | grep "MemTotal" | awk '{print $2}'` * 1024 * 0.8" | bc | sed 's#\..*$##' 的运行结果
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
fs.aio-max-nr = 1048576
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 = 104857
vm.swappiness = 0
vm.dirty_background_ratio = 3
vm.dirty_ratio = 80
vm.dirty_expire_centisecs = 500
vm.dirty_writeback_centisecs = 100
sysctl -p #使参数生效
2.2.关闭selinux及防火墙
sed -i 's/enforcing/disabled/g' /etc/selinux/config
setenforce 0
service firewalld stop
chkconfig firewalld off
service NetworkManager stop
chkconfig NetworkManager off
2.3.用户组相关设置
groupadd -g 1003 oinstall
groupadd -g 1001 dba
groupadd -g 1002 oper
useradd -u 1001 -g oinstall -G dba,oper oracle
echo oracle |passwd --stdin oracle
2.4.创建目录赋予权限
mkdir -p /u01/app/oracle/product/19c/db_1
chown -R oracle:oinstall /u01/
chmod -R 775 /u01/
2.5.修改Oracle变量(oracle用户下执行)
vi .bash_profile
ORACLE_SID=; export ORACLE_SID
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=${ORACLE_BASE}/product/19c/db_1; export ORACLE_HOME
NLS_DATE_FORMAT="YYYY:MM:DDHH24:MI:SS"; export NLS_DATE_FORMAT
NLS_LANG=american_america.ZHS16GBK; export NLS_LANG
TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN
ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11
PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin:$ORA_CRS_HOME/bin
PATH=${PATH}:/usr/bin:/usr/bin/X11:/usr/local/bin
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export CLASSPATH
THREADS_FLAG=native; export THREADS_FLAG
export TEMP=/tmp
export TMPDIR=/tmp
umask 000
2.6.安装软件包
mv /etc/yum.repos.d/* /tmp/
echo "[local_yum]" >> /etc/yum.repos.d/henry.repo
echo "name = henry_repo" >> /etc/yum.repos.d/henry.repo
echo "baseurl = file:///mnt/" >> /etc/yum.repos.d/henry.repo
echo "enabled = 1" >> /etc/yum.repos.d/henry.repo
echo "gpgcheck = 0" >> /etc/yum.repos.d/henry.repo
mount /dev/cdrom /mnt/
yum -y install \
bc \
binutils \
compat-libcap1 \
compat-libstdc++-33 \
elfutils-libelf \
elfutils-libelf-devel \
fontconfig-devel \
gcc \
gcc-c++ \
glibc \
glibc-devel \
ksh \
libgcc \
libstdc++ \
libstdc++-devel \
libaio \
libaio-devel \
libXtst \
libX11 \
libXau \
libxcb \
libXi \
libXrender \
make \
smartmontools \
sysstat \
kmod* \
sysstat \
unixODBC \
unixODBC-devel
评论 (0)