Redhat 7.9下安装Oracle 19C-基于ASM 的单实例
Redhat 7.9下安装Oracle 19C-基于ASM 的单实例
1 设置/etc/hosts文件
[root@asm01 ~]# cat /etc/hosts127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4::1 localhost localhost.localdomain localhost6 localhost6.localdomain6192.168.56.110 asm01
2.关闭防火墙
[root@asm01 ~]# systemctl stop firewalld.service[root@asm01 ~]# systemctl disable firewalld.service
关闭selinux
[root@asm01 ~]# sed -i "s/SELINUX=enforcing/SELINUX=disabled/" /etc/selinux/config[root@asm01 ~]# setenforce 0
添加用户和组
[root@asm01 ~]# groupadd -g 1000 oinstall[root@asm01 ~]# groupadd -g 1200 asmadmin[root@asm01 ~]# groupadd -g 1201 asmdba[root@asm01 ~]# groupadd -g 1202 asmoper[root@asm01 ~]# groupadd -g 1300 dba[root@asm01 ~]# groupadd -g 1301 oper[root@asm01 ~]# useradd -m -u 1100 -g oinstall -Gasmadmin,asmdba,asmoper,dba -d /home/grid -s /bin/bash grid[root@asm01 ~]# useradd -m -u 1101 -g oinstall -Gdba,oper,asmdba -d /home/oracle -s /bin/bash oracle[root@asm01 ~]# echo "| passwd --stdin oracle [root@asm01 ~]# echo "| passwd --stdin grid
创建目录
[root@asm01 oracle]# mkdir -p /u01/app/19.3.0/grid [root@asm01 oracle]# mkdir -p /u01/app/grid [root@asm01 oracle]# mkdir -p /u01/app/oracle/product/19.3.0/db_1 [root@asm01 oracle]# chown -R grid:oinstall /u01 [root@asm01 oracle]# chown -R oracle:oinstall /u01/app/oracle [root@asm01 oracle]# chmod -R 775 /u01/
配置oracle环境变量
[root@rac01 oracle]# vi /home/oracle/.bash_profileORACLE_SID=cxmtdb;export ORACLE_SIDORACLE_UNQNAME=cxmtdb;export ORACLE_UNQNAMEJAVA_HOME=/usr/local/java; export JAVA_HOMEORACLE_BASE=/u01/app/oracle; export ORACLE_BASEORACLE_HOME=$ORACLE_BASE/product/19.3.0/db_1; export ORACLE_HOMEORACLE_TERM=xterm; export ORACLE_TERMNLS_DATE_FORMAT="YYYY:MM:DDHH24:MI:SS"; export NLS_DATE_FORMATNLS_LANG=american_america.ZHS16GBK; export NLS_LANGTNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMINORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin:$ORA_CRS_HOME/binPATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/binexport PATHLD_LIBRARY_PATH=$ORACLE_HOME/libLD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/libLD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/libexport LD_LIBRARY_PATHCLASSPATH=$ORACLE_HOME/JRECLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlibCLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlibCLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlibexport CLASSPATHTHREADS_FLAG=native; export THREADS_FLAGexport TEMP=/tmpexport TMPDIR=/tmpumask 022
设置grid用户
PATH=$PATH:$HOME/binexport ORACLE_SID=+ASM1export ORACLE_BASE=/u01/app/gridexport ORACLE_HOME=/u01/app/19.3.0/gridexport PATH=$ORACLE_HOME/bin:$PATH:/usr/local/bin/:.export TEMP=/tmpexport TMP=/tmpexport TMPDIR=/tmpumask 022export PATH
修改资源限制
[root@asm01 oracle]# cat >> /etc/security/limits.conf < 设置PAM [root@asm01 oracle]# cat >> /etc/pam.d/login < 配置NOZEROCONF [root@asm01 oracle]# echo "NOZEROCONF=yes" >>/etc/sysconfig/network 修改内核参数 [root@asm01 oracle]# cat >> /etc/sysctl.d/sysctl.conf < 安装rpm包 [root@asm01 oracle]# cat /etc/yum.repos.d/rhel79.repo [rhel7]name=basebaseurl=ftp://192.168.56.199/pub/rhel79enabled=1gpgcheck=0[root@asm01 oracle]# yum install binutils compat-libstdc++-33 gcc gcc-c++ glibc glibc.i686 glibc-devel ksh libgcc.i686 libstdc++-devel libaio libaio.i686 libaio-devel libaio-devel.i686 libXext libXext.i686 libXtst libXtst.i686 libX11 libX11.i686 libXau libXau.i686 libxcb libxcb.i686 libXi libXi.i686 make sysstat unixODBC unixODBC-devel zlib-devel zlib-devel.i686 compat-libcap1 -y[root@asm01 oracle]# rpm -ivh /tmp/compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm [root@asm01 tmp]# cat /etc/udev/rules.d/99-oracle-asmdevices.rulesKERNEL=="sd*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="1ATA_VBOX_HARDDISK_VBd85a4611-51155d0e", RUN+="/bin/sh -c 'mknod /dev/asmdiskb b $major $minor; chown grid:asmadmin /dev/asmdiskb; chmod 0660 /dev/asmdiskb'"KERNEL=="sd*",ENV{DEVTYPE}=="disk",SUBSYSTEM=="block",PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode",RESULT=="1ATA_VBOX_HARDDISK_VB1d1b5b31-2492ff1c", RUN+="/bin/sh -c 'mknod /dev/asmdiskc b $major $minor; chown grid:asmadmin /dev/asmdiskc; chmod 0660 /dev/asmdiskc'"[root@asm01 tmp]# /sbin/udevadm trigger --type=devices --action=change[root@asm01 tmp]# ls /dev/asm*/dev/asmdiskb /dev/asmdiskc 安装GRID [grid@asm01 tmp]$ unzip -d /u01/app/19.3.0/grid/ /tmp/LINUX.X64_193000_grid_home.zip[root@asm01 ~]# rpm -ivh /u01/app/19.3.0/grid/cv/rpm/cvuqdisk-1.0.10-1.rpm[root@asm01 ~]# yum install libXp*.i686 libXt*.i686 libXtst libXrender-0.9.10 -y [grid@asm01 tmp]$ cd /u01/app/19.3.0/grid/[grid@asm01 grid]$ ./gridSetup.sh
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~