oracle--oracle18C环境配置
Posted kingle-study
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了oracle--oracle18C环境配置相关的知识,希望对你有一定的参考价值。
一,硬件配置检查
二,软件环境配置
1. hosts配置
配置本地解析
vim /etc/hosts
192.168.0.161 oracle18
2. 环境安装
yum install binutils gcc gcc-c++ compat-libstdc++-33 glibc glibc.i686 glibc-devel ksh libgcc.i686 libstdc++-devel libaio \
libaio.i686 libaio-devel libaio-devel.i686 libXtst libXtst.i686 libX11 libX11.i686 libXau libXau.i686 libxcb libxcb.i686 \
libXi libXi.i686 make sysstat compat-libcap1 –y
3. compat-libstdc++-33 自带源是没有的,下载安装
https://centos.pkgs.org/7/centos-x86_64/compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm.html
安装
[root@oracle18c ~]# rpm -ivh compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm warning: compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY Preparing... ################################# [100%] Updating / installing... 1:compat-libstdc++-33-3.2.3-72.el7 ################################# [100%]
4,修改内核
vim /etc/sysctl.conf fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 4294967295 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 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 shmall大于或等于shmmax的值,以页为单位。shmmax物理内存大小的一半(以字节为单位) 用root用户执行sysctl -p 使修改生效。
5. limits.conf
vim /etc/security/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 oracle soft memlock 3145728 oracle hard memlock 3145728
6. 设置PAM
vim /etc/pam.d/login
session required pam_limits.so
7. 关闭防火墙
systemctl stop firewalld systemctl disable firewalld selinux 关闭 [root@localhost media]# sed -i ‘s/enforcing/disabled/‘ /etc/selinux/config
8.用户创建
groupadd -g 54321 oinstall groupadd -g 54322 dba groupadd -g 54323 oper useradd -u 54321 -g oinstall -G dba,oper oracle echo 123456 |passwd --stdin oracle
9.创建目录
mkdir -p /u01/app/oracle/product/18.3.0/dbhome_1 chown -R oracle:oinstall /u01 chmod -R 775 /u01/
10.配置环境
ORACLE_SID=oracle;export ORACLE_SID ORACLE_UNQNAME=cndba;export ORACLE_UNQNAME JAVA_HOME=/usr/local/java; export JAVA_HOME ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE ORACLE_HOME=$ORACLE_BASE/product/18.3.0/dbhome_1; export ORACLE_HOME ORACLE_TERM=xterm; export ORACLE_TERM NLS_DATE_FORMAT="YYYY:MM:DDHH24:MI:SS"; export NLS_DATE_FORMAT #NLS_LANG=american_america.ZHS16GBK; export NLS_LANG export NLS_LANG=AMERICAN_AMERICA.UTF8 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:/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 022 export PATH
环境生效 . bash_profile
以上是关于oracle--oracle18C环境配置的主要内容,如果未能解决你的问题,请参考以下文章