打不开公式编辑器(公式编辑器用不了)
1791
2022-05-29
搭配官方文档和mos文档食用更佳。
oracle Database (RDBMS) on Unix AIX,HP-UX,Linux,Solaris and MS Windows Operating Systems Installation and Configuration Requirements Quick Reference (12.1/12.2/18c/19c) (Doc ID 1587357.1) https://docs.oracle.com/en/database/oracle/oracle-database/12.2/cwlin/grid-infrastructure-installation-and-upgrade-guide-linux.pdf Patch Set Updates for Oracle Products (Doc ID 854428.1) Database 12.2.0.1 Proactive Patch Information (Doc ID 2285557.1) How to Apply a Grid Infrastructure Patch Before Grid Infrastructure Configuration (before root.sh or rootupgrade.sh or gridsetup.bat) is Executed (Doc ID 1410202.1) ##以下是遇到的坑,以及MOS文章解决方案: 1、ASM device sharedness check Shared Storage Accessibility:/dev/asm_ocr ...FAILED (PRVG-11506) 可参照MOS文档: 12.2: PRVG-0802 : Storage type for path "/dev/mapper/asm011p1" could not be determined (Doc ID 2251322.1) 2、CLSRSC-400: A system reboot is required to continue installing. 可参照MOS文档: ALERT: root.sh Fails With "CLSRSC-400" While Installing GI 12.2.0.1 on RHEL or OL with RedHat Compatible Kernel (RHCK) 7.3 (Doc ID 2284463.1) 3、kgfnGetConnDetails requires 4 parameters at/u01/app/12.2.0/grid/lib/asmcmdbase.pm line 5704. 可参照MOS文档: install.sh Hung And root.sh Is Failing At asmcmd lsdg --suppressheader While Installing A Zone With Clusterware (Doc ID 2414241.1) ASMCMD Failing With "KGFNGETCONNDETAILS Requires 4 Parameters at
0、参数准备
1、HostName、ClusterName、ScanName
2、IP(Public,Private,Virtual,Scan)
3、ASMDISK(OCR,ARCH,DATA;Redundancy)
4、ORACLE_SID
5、User Password(root,oracle,grid)
6、CharacterSet(CharacterSet,NationalCharacterSet)
7、Software(ORACLE,GRID,REDHAT)
8、ISCDB
一、环境检查
1、Release Info
dmidecode | grep "Product Name" more /etc/system-release
2、Kernel Info
uname -r
3、CPU Info
grep "model name" /proc/cpuinfo grep "model name" /proc/cpuinfo | wc -l
4、Memory Info
##查看内存条数、大小 dmidecode|grep -P -A5 "Memory\s+Device"|grep Size|grep -v Range grep MemTotal /proc/meminfo | awk '{print $2}'
5、Swap Info
grep SwapTotal /proc/meminfo | awk '{print $2}'
6、ZONE
timedatectl | grep zone
7、tmp Info
df -h /tmp
8、Disk Info
df -h lsblk
9、Network Info
nmcli connection show ip addr ##查看网卡驱动的速率 iplink=`cat /proc/net/dev | awk '{i++; if(i>2){print $1}}' | sed 's/^[\t]*//g' | sed 's/[:]*$//g'` for i in $iplink do printf "%s %s\n" "$i :" ethtool -i $i
10、Transparent HugePages
cat /sys/kernel/mm/transparent_hugepage/enabled cat /sys/kernel/mm/transparent_hugepage/defrag
11、vm.min_free_kbytes
cat /proc/sys/vm/min_free_kbytes
12、vm.swappiness
cat /proc/sys/vm/swappiness
13、SELINUX
grep ^SELINUX= /etc/selinux/config
14、Firewalld
systemctl status firewalld | grep Active
15、avahi-daemon
systemctl status avahi-daemon | grep Active
16、NUMA
grep NUMA /proc/cmdline
二、环境配置
1、RPM PACKAGE
关于oracle-database-server-12cR2-preinstall
yum install oracle-database-server-12cR2-preinstall-1.0-5.el7.src.rpm
oracle-database-server-12cR2-preinstall为我们做了什么 (1)自动安装oracle所需的RPM包 (2)自动创建oracle用户和dba、oinstall组 (3)自动配置/etc/sysctl.conf内核参数 (4)自动配置/etc/security/limits.conf参数 (5)关闭NUMA=OFF (关闭非一致内存访问) (6)关闭NOZEROCONF=yes (7)修改系统启动版本信息
摘自官方MOS文档:
_**Oracle Database (RDBMS) on Unix AIX,HP-UX,Linux,Solaris and MS Windows Operating Systems Installation and Configuration Requirements Quick Reference (12.1/12.2/18c/19c) (Doc ID 1587357.1) **_Oracle Linux 7 / RHEL 7
OS Version
Patches/Packages
Kernel settings
Reference :
Note 1961997.1
/etc/security/limits.conf
oracle soft nproc 2047 (at least)
oracle hard nproc 16384 (at least)
oracle soft nofile 1024 (at least)
oracle hard nofile 65536 (at least)
oracle soft stack 10240 KB (at least)
oracle hard stack 32768 KB (at most)
memlock
Soft: at least 90 percent of the current RAM when HugePages memory is enabled and at least 3145728 KB (3 GB) when HugePages memory is disabled
hard: at least 90 percent of the current RAM when HugePages memory is enabled and at least 3145728 KB (3 GB) when HugePages memory is disabled
以下摘自官方文档:
https://docs.oracle.com/en/database/oracle/oracle-database/12.2/cwlin/grid-infrastructure-installation-and-upgrade-guide-linux.pdf
Operating System Requirements for x86-64 Linux Platforms
Red Hat Enterprise Linux 7 Distributions for x86-64: 1、SSH Requirement Ensure that OpenSSH is installed on your servers. 2、Red Hat Enterprise Linux 7: 3.10.0-123.el7.x86_64 or later 3、he following packages (or later versions) must be installed: bc binutils-2.23.52.0.1-12.el7 (x86_64) compat-libcap1-1.10-3.el7 (x86_64) compat-libstdc++-33-3.2.3-71.el7 (i686) compat-libstdc++-33-3.2.3-71.el7 (x86_64) glibc-2.17-36.el7 (i686) glibc-2.17-36.el7 (x86_64) glibc-devel-2.17-36.el7 (i686) glibc-devel-2.17-36.el7 (x86_64) ksh libaio-0.3.109-9.el7 (i686) libaio-0.3.109-9.el7 (x86_64) libaio-devel-0.3.109-9.el7 (i686) libaio-devel-0.3.109-9.el7 (x86_64) libgcc-4.8.2-3.el7 (i686) libgcc-4.8.2-3.el7 (x86_64) libstdc++-4.8.2-3.el7 (i686) libstdc++-4.8.2-3.el7 (x86_64) libstdc++-devel-4.8.2-3.el7 (i686) libstdc++-devel-4.8.2-3.el7 (x86_64) libxcb-1.9-5.el7 (i686) libxcb-1.9-5.el7 (x86_64) libX11-1.6.0-2.1.el7 (i686) libX11-1.6.0-2.1.el7 (x86_64) libXau-1.0.8-2.1.el7 (i686) libXau-1.0.8-2.1.el7 (x86_64) libXi-1.7.2-1.el7 (i686) libXi-1.7.2-1.el7 (x86_64) libXtst-1.2.2-1.el7 (i686) libXtst-1.2.2-1.el7 (x86_64) libXrender (i686) libXrender (x86_64) libXrender-devel (i686) libXrender-devel (x86_64) make-3.82-19.el7 (x86_64) net-tools-2.0-0.17.20131004git.el7 (x86_64) (for Oracle RAC and Oracle Clusterware) nfs-utils-1.3.0-0.21.el7.x86_64 (for Oracle ACFS) smartmontools-6.2-4.el7 (x86_64) sysstat-10.1.5-1.el7 (x86_64)
--redhat内核支持 Red Hat Enterprise Linux 7: 3.10.0-123.el7.x86_64 or later --镜像挂载 mount /dev/cdrom /mnt mv /etc/yum.repos.d/* /tmp/ echo "[local]" >> /etc/yum.repos.d/local.repo echo "name = local" >> /etc/yum.repos.d/local.repo echo "baseurl = file:///mnt/" >> /etc/yum.repos.d/local.repo echo "enabled = 1" >> /etc/yum.repos.d/local.repo echo "gpgcheck = 0" >> /etc/yum.repos.d/local.repo yum clean all yum repolist all --安装图形化界面 yum groupinstall -y "Server with GUI" --安装oracle所需依赖包 yum install -y bc binutils compat-libcap1 compat-libstdc++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libxcb libX11 libXau libXi libXtst libXrender libXrender-devel make net-tools nfs-utils smartmontools sysstat openssh-clients --检查是否安装成功 rpm -q --qf '%{NAME}-%{VERSION}-%{RELEASE} (%{ARCH})\n' bc binutils compat-libcap1 compat-libstdc++ glibc glibc-devel ksh libaio libaio-devel libgcc libstdc++ libstdc++-devel libxcb libX11 libXau libXi libXtst libXrender libXrender-devel make net-tools nfs-utils smartmontools sysstat openssh-clients --需要额外安装compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm包 rpm -ivh compat-libstdc++-33-3.2.3-72.el7.x86_64.rpm
2、Configuring Kernel Parameters for Linux
The /etc/sysctl.conf file has been deprecated
/etc/sysctl.conf文件在OL7和RHEL7中已被弃用
cat <
3、Resource Limits
/etc/security/limits.conf oracle soft nproc 2047 (at least) oracle hard nproc 16384 (at least) oracle soft nofile 1024 (at least) oracle hard nofile 65536 (at least) oracle soft stack 10240 KB (at least) oracle hard stack 32768 KB (at most) memlock Soft: at least 90 percent of the current RAM when HugePages memory is enabled and at least 3145728 KB (3 GB) when HugePages memory is disabled hard: at least 90 percent of the current RAM when HugePages memory is enabled and at least 3145728 KB (3 GB) when HugePages memory is disabled
cat <
4、USER CREATE
Creating the OSASM Group # groupadd -g 54329 asmadmin Creating the OSDBA for ASM Group # /usr/sbin/groupadd -g 54327 asmdba Creating the OSOPER for ASM Group # /usr/sbin/groupadd -g 54328 asmoper Creating the OSDBA Group for Database Installations # /usr/sbin/groupadd -g 54322 dba Creating an OSOPER Group for Database Installations # groupadd -g 54323 oper Creating the OSBACKUPDBA Group for Database Installations # /usr/sbin/groupadd -g 54324 backupdba Creating the OSDGDBA Group for Database Installations # /usr/sbin/groupadd -g 54325 dgdba Creating the OSKMDBA Group for Database Installations # /usr/sbin/groupadd -g 54326 kmdba Creating the OSRACDBA Group for Database Installations # /usr/sbin/groupadd -g 54330 racdba $ id oracle uid=54321(oracle) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54323(oper),54324(backupdba),54325(dgdba),54326(kmdba),54327(asmdba),54330(racdba) $ id grid uid=54331(grid) gid=54321(oinstall) groups=54321(oinstall),54322(dba),54327(asmdba),54328(asmoper),54329(asmadmin),54330(racdba)
##创建用户组 /usr/sbin/groupadd -g 54321 oinstall /usr/sbin/groupadd -g 54322 dba /usr/sbin/groupadd -g 54323 oper /usr/sbin/groupadd -g 54324 backupdba /usr/sbin/groupadd -g 54325 dgdba /usr/sbin/groupadd -g 54326 kmdba /usr/sbin/groupadd -g 54327 asmdba /usr/sbin/groupadd -g 54328 asmoper /usr/sbin/groupadd -g 54329 asmadmin /usr/sbin/groupadd -g 54330 racdba ##创建用户 /usr/sbin/useradd -u 54321 -g oinstall -G dba,asmdba,backupdba,dgdba,kmdba,racdba oracle /usr/sbin/useradd -u 54331 -g oinstall -G asmadmin,asmdba,asmoper,oper,dba grid #修改密码,这边密码均设置为oracle,密码可以按自己需要修改 echo "oracle" |passwd grid --stdin echo "oracle" |passwd oracle --stdin
5、Oracle Home and Oracle Base Directory CREATE
mkdir -p /u01/app/grid mkdir -p /u01/app/12.2.0/grid mkdir -p /u01/app/oracle/product/12.2.0/db mkdir -p /u01/app/oraInventory chown -R grid:oinstall /u01/app/grid chown -R grid:oinstall /u01/app/12.2.0 chown -R grid:oinstall /u01/app/oraInventory chown -R oracle:oinstall /u01/app/oracle chmod -R 775 /u01
6、Disable Firewalld and SELLINUX
--关闭防火墙 systemctl stop firewalld systemctl disable firewalld --关闭selinux sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
7、HOSTS
cat >> /etc/hosts < 8、Disable Transparent Hugepages & NUMA For example, for Oracle Linux 7.3, the procedure to disable Transparent HugePages involves editing the /etc/default/grub file and then running the command grub2-mkconfig sed -i 's/quiet/quiet transparent_hugepage=never numa=off/' /etc/default/grub ##重建grub 配置文件: ##fdisk -l可以查看主分区的Disk label type: gpt ##MBR 分区表 ##grub2-mkconfig -o /etc/grub2.cfg\ ##efi 引导模式,efi+GPT分区表 grub2-mkconfig -o /etc/grub2-efi.cfg ##reboot之后查看是否生效 numactl --hardware dmesg|grep -i numa cat /proc/cmdline ##临时生效 echo never >/sys/kernel/mm/transparent_hugepage/enabled echo never >/sys/kernel/mm/transparent_hugepage/defrag 9、Disable NOZEROCONF echo "NOZEROCONF=yes" >> /etc/sysconfig/network 10、Disable NetworkManager systemctl stop NetworkManager.service systemctl disable NetworkManager.service 11、Disable avahi-daemon systemctl stop avahi-daemon.socket systemctl stop avahi-daemon.service systemctl disable avahi-daemon.service ps -ef|grep avahi-daemon 12、Disable chronyd By default, the NTP service available on Oracle Linux 7 and Red Hat Linux 7 is chronyd and the NTP service available on Oracle Linux 6 and Red Hat Linux 6 or lower is ntpd. systemctl stop chronyd systemctl disable chronyd mv /etc/resolv.conf /etc/resolv.conf.bak mv /etc/chrony.conf /etc/chrony.conf.bak 13、配置/dev/shm cat < 14、UDEV+MULTIPATH ##安装multipath yum install -y device-mapper* mpathconf --enable --with_multipathd y ##查看磁盘wwid /usr/lib/udev/scsi_id -g -u /dev/sdb --配置multipath.confc cat < 15、环境变量设置 ROOT: cat >>/etc/profile <<"EOF" ################# Root Rrofile Add ############################ if [ $USER = "oracle" ] || [ $USER = "grid" ] || [ $USER = "root" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi alias so='su - oracle' alias sg='su - grid' alias crsctl='/u01/app/11.2.0/grid/bin/crsctl' ################# Root Rrofile End ############################ EOF GRID: cat < ORALCE: cat < Notes:安装前执行reboot。 Linux Oracle
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。