项目 | 信息 |
---|---|
IP | 172.17.3.25 |
OS | Red Hat Enterprise Linux Server release 7.6 |
ORACLE | Version 19.3.0.0.0 |
ORACLE SID | orcldb |
主机被配置
- 关闭防火墙
systemctl status firewalld.service
systemctl stop firewalld.service
systemctl disable firewalld.service
- 关闭selinux
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
或者
setenforce 0
vim /etc/selinux/config
SELINUX=disabled
- 配置主机名
vim /etc/hosts
172.17.3.25 orcldb
- 创建用户及目录(root用户执行)
groupadd -g 5001 dba
groupadd -g 5002 asmdba
groupadd -g 5003 backupdba
groupadd -g 5004 dgdba
groupadd -g 5005 kmdba
groupadd -g 5006 racdba
groupadd -g 5007 oper
groupadd -g 5008 oinstall
useradd -u 54321 -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba,oper oracle
添加oracle密码
passwd oracle
- 创建目录结构
mkdir -p /u01/app/oracle/oraInventory
mkdir -p /u01/app/oracle/product/19.3.0/db_1
chown -R oracle:oinstall /u01
chmod -R 775 /u01
- 编辑profile文件,在文档内加入以下内容
vim /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
- 修改环境变量
vim /etc/security/limits.conf
在/etc/security/limits.conf中增加如下几行
oracle soft nproc 8192
oracle hard nproc 16384
oracle soft nofile 8192
oracle hard nofile 65536
- 编辑/etc/sysctl.conf增加如下几行
vim /etc/sysctl.conf
kernel.sem = 250 32000 100 128
fs.file-max = 6815744
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
sysctl –p
- 配置yum源,安装依赖包
yum -y install tigervnc-server tigervnc vnc vnc-server
yum -y install compat-libcap1-1.10-7.el7.x86_64.rpm
yum -y install libstdc++-devel-4.8.5-28.el7.x86_64.rpm
yum -y install gcc-c++-4.8.5-28.el7.x86_64.rpm
yum -y install ksh-20120801-137.el7.x86_64.rpm
yum -y install glibc-devel-2.17-222.el7.x86_64.rpm
yum -y install libaio-devel-0.3.109-13.el7.x86_64.rpm
yum -y install compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm
yum -y install bc gcc gcc-c++ binutils compat-libcap1 compat-libstdc++ dtrace-modules dtrace-modules-headers dtrace-modules-provider-headers dtrace-utils elfutils-libelf elfutils-libelf-devel fontconfig-devel glibc glibc-devel ksh libaio libaio-devel libdtrace-ctf-devel libX11 libXau libXi libXtst libXrender libXrender-devel libgcc librdmacm-devel libstdc++ libstdc++-devel libxcb make smartmontools sysstat
- 配置oracle环境变量
vim /home/oracle/.bash_profile
umask 022
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/19.3.0/db_1
export ORACLE_SID=orcldb
export ORACLE_TERM=xterm
export ORACLE_OWNER=oracle
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export NLS_LANG="AMERICAN_AMERICA.ZHS16GBK"
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/network/lib:/lib:/usr/lib:/usr/local/lib
export LIBPATH=$ORACLE_HOME/lib:$ORACLE_HOME/network/lib:/lib:/usr/lib:/usr/local/lib
export PATH=$PATH:/sbin:/usr/lbin:/usr/sbin:$JAVA_HOME/bin:$ORACLE_HOME/bin:$ORACLE_HOME/lib:$HOME/bin:$ORACLE_HOME/OPatch
oracle安装
上传Oracle19C安装包(oracle身份)
以oracle用户身份通过FTP方式上传安装包至Linux主机目录:
unzip LINUX.X64_193000_db_home.zip -d /u01/app/oracle/product/19.3.0/db_1
cd $ORACLE_HOME (即oracle用户的home主目录下)
cd $ORACLE_HOME/u01/app/oracle/product/19.3.0/db_1
./runInstaller
dbca建库