准备:
1,ASM磁盘空间最低要求
OCR的磁盘占用需求有了明显增长。
为了方便操作,设置如下:
External: 1个卷x40G
Normal: 3个卷x30G
Hight: 5个卷x25G
Flex: 3个卷x30G
OCR+VOLTING+MGMT存储通常放到一个磁盘组,且选择Normal的冗余方式,也即最少3块asm磁盘80G空间。
2.操作系统检查
Red Hat Enterprise Linux 7: 3.10.0-123.el7.x86_64 or later
Red Hat Enterprise Linux 6.4: 2.6.32-358.el6.x86_64 or later
命令:
[root@B201I23Rs01 oracle]# lsb_release -id
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 6.8 (Santiago)
[root@B201I23Rs01 oracle]# uname -an
Linux B201I23Rs01 2.6.32-642.el6.x86_64 #1 SMP Wed Apr 13 00:51:26 EDT 2016 x86_64 x86_64 x86_64 GNU/Linux
3,服务器配置检查
内存 8G以上
/tmp 1g以上,建议2g
swap 4G以上 32G
HugePages sga以上
oracle文件系统 100G(12G+9G)
/dev/shm
3.1 内存
[root@B201I22Rs06 oracle]# grep MemTotal /proc/meminfo
MemTotal: 264371924 kB
3.2 swap (大于16g)
[root@B201I22Rs06 oracle]# grep SwapTotal /proc/meminfo
SwapTotal: 1048572 kB
3.3 /tmp目录:
1 GB of space in the /tmp directory
[root@B201I23Rs01 oracle]# df -lh /tmp
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vgroot-lv06
9.8G 23M 9.2G 1% /tmp
3.4 共享内存大小:
[root@B201I23Rs01 oracle]# df -h /dev/shm/
Filesystem Size Used Avail Use% Mounted on
tmpfs 127G 72K 127G 1% /dev/shm
4,操作系统包检查 (参考yum安装)
yum配置:
情景一: 盘已经挂载在某个路径下: 例如:挂载在/dev/sr1 下 umount /dev/sr1 umount原来目录下的安装介质 mount /dev/sr0 /mnt/cdrom mount到新的目录下 mount -t iso9660 -o,loop /dev/cdrom /mnt/cdrom 情景二: iso镜像文件放在某个路径下 (例如: mount -o loop OracleLinux-Release7-Update4-x86_64-dvd.iso /mnt/cdrom/ 将某个路径下的iso文件以硬盘模式挂载到 /mnt/cdrom) mount -o loop /tmp/V921569-01.iso /mnt 可以先 vi /etc/yum.conf --------gpgcheck=0 修改相关参数为0 cd /etc/yum.repos.d/ 复制一份.repo 出来 叫 abc.repo(修改里面 name,baseurl为你mount的路径 参考如下注意///个数,enable,gpgcheck,)其他repo可能会干扰,建议mv掉,或rm掉 vi /etc/yum.repos.d/abc.repo [c6-media] name=tOSia baseurl=file:///mnt/cdrom gpgcheck=0 enabled=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6 yum clean all 清除yum缓存 yum makecache 缓存本地yum源 yum list 测试
yum -y install bc yum -y install binutils yum -y install compat-libcap1 yum -y install compat-libstdc++ yum -y install dtrace-modules yum -y install dtrace-modules-headers* yum -y install dtrace-modules-provider-headers* yum -y install dtrace-utils* yum -y install elfutils-libelf yum -y install elfutils-libelf-devel yum -y install fontconfig-devel yum -y install glibc yum -y install glibc-devel yum -y install ksh yum -y install libaio yum -y install libaio-devel yum -y install libdtrace-ctf-devel yum -y install libXrender yum -y install libXrender-devel yum -y install libX11 yum -y install libXau yum -y install libXi yum -y install libXtst yum -y install libgcc yum -y install librdmacm-devel yum -y install libstdc++ yum -y install libstdc++-devel yum -y install libxcb yum -y install make yum -y install net-tools yum -y install nfs-utils yum -y install python yum -y install python-configshell yum -y install python-rtslib yum -y install python-six yum -y install targetcli yum -y install smartmontools yum -y install sysstat
5,创建用户和组、目录
# groupadd -g 54321 oinstall # groupadd -g 54322 dba # groupadd -g 54323 oper # groupadd -g 54324 backupdba # groupadd -g 54325 dgdba # groupadd -g 54326 kmdba # groupadd -g 54327 asmdba # groupadd -g 54328 asmoper # groupadd -g 54329 asmadmin # groupadd -g 54330 racdba # useradd -u 54340 -g oinstall -G asmadmin,asmdba,racdba,asmoper,racdba -m -d /home/grid -s /bin/bash grid # usermod -u 54321 -g oinstall -G dba,backupdba,dgdba,kmdba,asmdba,racdba,asmoper,oper -m -d /home/oracle -s /bin/bash oracle # mkdir -p /u01/app/19.0.0/grid # mkdir -p /u01/app/grid # mkdir -p /u01/app/oracle # chown -R grid:oinstall /u01 # chmod -R 775 /u01/ # chown oracle:oinstall /u01/app/oracle
echo C51! | passwd --stdin oracle
echo C6751! | passwd --stdin grid
6,关闭防火墙
DISABLE FIREWALL # service iptables stop # chkconfig iptables off # chkconfig --list iptables systemctl list-unit-files systemctl stop firewalld systemctl disable firewalld service firewalld status iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off DISABLE SELINUX # vi /etc/selinux/config SELINUX=disable # more /etc/selinux/config |grep SELINUX # SELINUX= can take one of these three values: SELINUX=disable # SELINUXTYPE= can take one of these two values: SELINUXTYPE=targeted
8.启用nfs文件系统的相关服务
chkconfig --list nscd
chkconfig --level 35 nscd on
service nscd start
service nscd restart
9.修改ssh时间等待为无限制
vi /etc/ssh/sshd_config
LoginGraceTime 0
10,禁用ntp
/sbin/service ntpd stop chkconfig ntpd off mv /etc/ntp.conf /etc/ntp.conf.org rm /var/run/ntpd.pid Complete these step on Oracle Linux 7 and Red Hat Linux 7: systemctl status ntpd.service Run the following commands as the root user: # systemctl stop chronyd # systemctl disable chronyd mv /etc/chrony* /etc/chrony.conf.bak
13.修改 /etc/security/limits.conf 文件中的资源限制
oracle soft nproc 16384 oracle hard nproc 16384 oracle soft nofile 65536 oracle hard nofile 65536 oracle soft memlock 16777216 oracle hard memlock 16777216 oracle soft stack 10240 grid soft nproc 16384 grid hard nproc 16384 grid soft nofile 65536 grid hard nofile 65536 grid soft memlock 16777216 grid hard memlock 16777216 grid soft stack 10240
14.修改文件/etc/sysctl.conf 中的内核参数
fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 26437192 kernel.shmmax = 135358425088 107374182400 kernel.shmmni = 4096 # semaphores: semmsl, semmns, semopm, semmni #kernel.sem = 250 32000 100 128 kernel.sem = 5010 641280 5010 1280 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=1048586 net.ipv4.ip_local_range=9000 65500 net.ipv4.conf.ib2.rp_filter = 0 net.ipv4.conf.ib0.rp_filter = 0 net.ipv4.conf.all.rp_filter = 0 ****针对rp_filter部分,如果没有多张私有网卡,则不需要配置,文档 ID1286796.1有描述。 ###注:这里shmmax设为120g,大约物理内存的一半 sysctl -p //立即生效 sysctl -a To check resource limits: Log in as an installation owner. Check the soft and hard limits for the file descriptor setting. Ensure that the result is in the recommended range. For example: $ ulimit -Sn 1024 $ ulimit -Hn 65536 Check the soft and hard limits for the number of processes available to a user. Ensure that the result is in the recommended range. For example: $ ulimit -Su 2047 $ ulimit -Hu 16384 Check the soft limit for the stack setting. Ensure that the result is in the recommended range. For example: $ ulimit -Ss 10240 $ ulimit -Hs 32768 Repeat this procedure for each Oracle software installation owner.
15.nfs参数注意
rw,bg,hard,nointr,rsize=32768,wsize=32768,tcp,actimeo=0,vers=3,timeo=600
***
配置NOZEROCONF
vi /etc/sysconfig/network增加以下内容
NOZEROCONF=yes
16.修改 /etc/pam.d/login 文件
session required pam_limits.so
加载pam_limits.so模块
echo "session required pam_limits.so" >> /etc/pam.d/login
17.如果您启动了 selinux , 请 disable 掉。 它可能导致后续的 asmlib 无法创建磁盘。
edit file /etc/selinux/config.
SELINUX=disabled
18. 如果启用了 iptables,请 disable 掉.
# /etc/init.d/iptables save
# /etc/init.d/iptables stop
# chkconfig iptables off
----------------------------
18.3重启防火墙
systemctl restart iptables.service #最后重启防火墙使配置生效
systemctl enable iptables.service #设置防火墙开机启动
18.4其他相关命令
systemctl disable iptables #禁止iptables服务
systemctl stop iptables #暂停服务
systemctl enable iptables #解除禁止iptables
systemctl start iptables #开启服务
service iptables save #因为已经添加iptables服务,故该命令可以运行;若没有之前的添加服务则不能运行
service iptables status #查看iptables服务状态
19.网络参数调整
Check your TCP network buffer size to ensure that it is adequate for the speed of your servers. By default, the network buffer size is set to 1 MB for TCP, and 2 MB for UDP. The TCP buffer size can set a limit on file transfers, which can negatively affect performance for Direct NFS Client users. To check the current TCP buffer size, enter the following command: # sysctl -a |grep -e net.ipv4.tcp_[rw]mem The output of this command is similar to the following: net.ipv4.tcp_rmem = 4096 87380 1048576 net.ipv4.tcp_wmem = 4096 16384 1048576 Oracle recommends that you set the value based on the link speed of your servers. For example, perform the following steps: As root, use a text editor to open /etc/sysctl.conf, and add or change the following: net.ipv4.tcp_rmem = 4096 87380 4194304 net.ipv4.tcp_wmem = 4096 16384 4194304 Apply your changes by running the following command: # sysctl -p Restart the network: # /etc/rc.d/init.d/network restart
20. 设置用户配置文件
# su - oracle umask 0022 # Oracle Environment export ORACLE_UNQNAME=cendb export ORACLE_BASE=/oracle/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/18.0.0/dbhome_1 export GRID_HOME=/oracle/app/18.0.0/grid export ORACLE_SID=cendb2 export PATH=.:$ORACLE_HOME/OPatch:$ORACLE_HOME/bin:$GRID_HOME/bin:/home/oracle/support/shell:$PATH export ORA_NLS10=$GRID_HOME/nls/data export LIBPATH=$ORACLE_HOME/lib export AIXTHREAD_SCOPE=S export ORACLE_TERM=vt100 export TMP=/tmp export TMPDIR=/tmp NLS_LANG=AMERICAN_AMERICA.zhs16gbk export NLS_LANG LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"; export NLS_DATE_FORMAT stty erase ^H echo ' ' echo '$ORACLE_SID: '$ORACLE_SID echo '$ORACLE_HOME: '$ORACLE_HOME echo '$GRID_HOME: '$GRID_HOME echo ' ' # Set up the shell variables: EDITOR=vi export EDITOR set -o vi export PS1=`whoami`@`hostname`['$ORACLE_SID']':$PWD$ ' # ALIAS alias psg="ps -ef | grep" alias ll="ls -lrta" alias ss="sqlplus '/as sysdba'" alias oh="cd $ORACLE_HOME" alias ohbin="cd $ORACLE_HOME/bin" alias crs="cd $GRID_HOME" alias crsbin="cd $GRID_HOME/bin" alias agent="cd $AGENT_HOME/bin" alias wait="/home/oracle/support/shell/wait.sh" export LANG=en_US alias alert="cd /oracle/app/oracle/diag/rdbms/$ORACLE_UNQNAME/$ORACLE_SID/trace" #su - grid umask 022 # Oracle Environment export ORACLE_BASE=/oracle/app/grid export GRID_HOME=/oracle/app/18.0.0/grid export ORACLE_HOME=/oracle/app/18.0.0/grid export ORACLE_SID=+ASM1 export PATH=$GRID_HOME/bin:$ORACLE_HOME/OPatch:$ORACLE_HOME/bin:.:$PATH export ORA_NLS10=$ORACLE_HOME/nls/data export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/precomp/lib:$LD_LIBRARY_PATH export LIBPATH=$ORACLE_HOME/lib export AIXTHREAD_SCOPE=S export ORACLE_TERM=vt100 export TMP=/tmp export TMPDIR=/tmp NLS_LANG=AMERICAN_AMERICA.zhs16gbk export NLS_LANG echo ' ' echo '$ORACLE_SID: '$ORACLE_SID echo '$ORACLE_HOME: '$ORACLE_HOME echo '$GRID_HOME: '$GRID_HOME echo ' ' # Set up the shell variables: EDITOR=vi export EDITOR set -o vi export PS1=`whoami`@`hostname`['$ORACLE_SID']':$PWD$ ' #ALIAS alias psg="ps -ef | grep" alias ll="ls -lrta" alias oh="cd $ORACLE_HOME" alias ohbin="cd $ORACLE_HOME/bin" alias crs="cd $GRID_HOME" alias crsbin="cd $GRID_HOME/bin" export LANG=en_US #su - # vi .bash_profile export CRS_HOME=/oracle/app/18.0.0/grid PATH=$PATH:$CRS_HOME/bin
21,修改/etc/hosts
10.210.114.163 cendb1 10.210.114.164 cendb2 10.210.114.165 cendb1-vip 10.210.114.166 cendb2-vip 10.210.114.167 cendb-scan 192.168.10.163 cendb1_priv 192.168.10.164 cendb2_priv
*******
解压zip文件
grid
unzip gird.zip -d /u01/app/19.0.0/grid
22, 安装cvuqdisk
cvuqdisk存于oracle GI安装介质的cv/rpm目录下
export CVUQDISK_GRP=oinstall
rpm –ivh cvuqdisk-1.0.10-1.rpm
22,重启主机后,配置互信
方法:使用sshUserSetup.sh快速创建互信
sshUserSetup.sh在GI安装介质解压缩后的oui/prov/resources/scripts目录下。
下面两条命令在一个节点上执行即可(可以在root用户下执行):
#./sshUserSetup.sh -user grid -hosts "ylzserver1 ylzserver2" -advanced -exverify –confirm
#./sshUserSetup.sh -user oracle -hosts "ylzserver1 ylzserver2" -advanced -exverify -confirm
23,asm磁盘配置
多路径软件安装卸载:参考《华为多路径软件.pdf》 3. udev配盘-参考 udevudev 配盘 scsi_id --whitelisted --replace-whitespace --device=/dev/sdc xiv_devlist [root@b201i18rs04 soft]# scsi_id --whitelisted --replace-whitespace --device=/dev/mapper/mpathc 200173800d320003b scsi_id --whitelisted --replace-whitespace --device=/dev/mapper/mpathbp1 scsi_id --whitelisted --replace-whitespace --device=/dev/mapper/mpathb scsi_id --whitelisted --replace-whitespace --device=/dev/mapper/mpathc scsi_id --whitelisted --replace-whitespace --device=/dev/mapper/mpathd scsi_id --whitelisted --replace-whitespace --device=/dev/mapper/mpathe scsi_id --whitelisted --replace-whitespace --device=/dev/mapper/mpathf scsi_id --whitelisted --replace-whitespace --device=/dev/mapper/mpathg /sbin/scsi_id -g -u -d /dev/mapper/mpathc 华为自带多路径安装包: OceanStor_UltraPath_21.2.0_RHEL.zip sh install.sh 扫盘echo "- - -" > /sys/class/scsi_host/host6/scan lspci lspath upadmin show vlun -type=all cd /etc/udev/rule.d vi 99-my-asmdevices.rules /sbin/udevadm control --reload udevadm control --reload /sbin/udevadm trigger --type=devices --action=change 1. 编辑/etc/scsi_id.config文件,如果该文件不存在,则创建该文件,添加如下行: options=-g vi /etc/udev/rules.d/99-oracle-asmdevices.rules KERNEL=="mpth?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/mapper/$parent", RESULT=="200173800d320003b", NAME="asm-disk1", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="mpth?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/mapper/$parent", RESULT=="200173800d320003a", NAME="asm-disk2", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="mpth?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/mapper/$parent", RESULT=="200173800d3200039", NAME="asm-disk3", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="mpth?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/mapper/$parent", RESULT=="200173800d320003c", NAME="asm-disk4", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="mpth?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/mapper/$parent", RESULT=="200173800d320003d", NAME="asm-disk5", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="mpth?1", BUS=="scsi", PROGRAM=="/sbin/scsi_id -g -u -d /dev/mapper/$parent", RESULT=="200173800d320003e", NAME="asm-disk6", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="dm*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="200173800d320003b", NAME="asm-disk1", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="dm*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="200173800d320003a", NAME="asm-disk2", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="dm*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="200173800d3200039", NAME="asm-disk3", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="dm*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="200173800d320003c", NAME="asm-disk4", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="dm*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="200173800d320003d", NAME="asm-disk5", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="dm*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/$name", RESULT=="200173800d320003e", NAME="asm-disk6", OWNER="grid", GROUP="asmadmin", MODE="0660" KERNEL=="mpath*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/mapper/mpathc", RESULT=="200173800d320003a", NAME="asm-disk2", OWNER="grid", GROUP="asmadmin", MODE="0660" partprobe /dev/mapper/mpathb udevadm control --reload-rules /sbin/start_udev KERNEL=="mpath*", SUBSYSTEM=="block", PROGRAM=="/sbin/scsi_id --whitelisted --replace-whitespace --device=/dev/mapper/$name", RESULT=="200173800d320003b", NAME="asm-disk1", OWNER="grid", GROUP="asmadmin", MODE="0660" 7.4使用以下方法,固定nod号: ls -l /dev/sd* ls -l /dev/asm/ fdisk -l /usr/lib/udev/scsi_id -g -u -d /dev/sdb 363c7843100ba123b43600d8200000080 /usr/lib/udev/scsi_id -g -u -d /dev/sdc 363c7843100ba123b436039e900000081 /usr/lib/udev/scsi_id -g -u -d /dev/sdd 363c7843100ba123b4360540300000082 /usr/lib/udev/scsi_id -g -u -d /dev/sde 363c7843100ba123b43606e9e00000083 /usr/lib/udev/scsi_id -g -u -d /dev/sdf 363c7843100ba123b4360875b00000084 /usr/lib/udev/scsi_id -g -u -d /dev/sdg 363c7843100ba123b4360af1000000086 /usr/lib/udev/scsi_id -g -u -d /dev/sdh 363c7843100ba123b4360c84500000087 /usr/lib/udev/scsi_id -g -u -d /dev/sdi 363c7843100ba123b4360ea7600000088 KERNEL=="sd*[!0-9]", ENV{DEVTYPE}=="disk", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode", RESULT=="363c7843100ba123b43600d8200000080", RUN+="/bin/sh -c '/usr/bin/mkdir /dev/asm; mknod /dev/asm/ocr01 b $major $minor; chown grid:asmadmin /dev/asm/ocr01; chmod 0660 /dev/asm/ocr01'" KERNEL=="sd*[!0-9]", ENV{DEVTYPE}=="disk", SUBSYSTEM=="block", PROGRAM=="/usr/lib/udev/scsi_id -g -u -d $devnode", RESULT=="363c7843100ba123b0d93e8c100000039", RUN+="/bin/sh -c '/usr/bin/mkdir /dev/asm; mknod /dev/asm/ocr01 b 8 96; chown grid:asmadmin /dev/asm/ocr01; chmod 0660 /dev/asm/ocr01'" udevadm control --reload /sbin/udevadm trigger --type=devices --action=change
24,grid安装
24.1 安装前检查
--全面检查:
./runcluvfy.sh stage -pre crsinst -n ylzserver1,ylzserver2 -fixup -verbose
--检查网络和等效性
./runcluvfy.sh comp nodecon -nrac1,rac2 -verbose
mkdir -p /u01/app/oracle/product/19.0.0/dbhome_1
*************安装遇到问题********
ora-12537
原因:二节点目录权限不对,修改以下权限(在dbca之前)
cd /oracle/app/oracle/
chmod 755 product
chmod 755 18.0.0
chmod 755 dbhome_1
rehat7.4和oracle linux 7.4需要升级以下两个包到对应的版本 ,可在http://public-yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/index.html寻找下载
kmod-20-21 (x86_64)
kmod-libs-20-21 (x86_64) 安装完成后导致华为多路径软件失效,原因是在/etc/Oracle-release 文件丢失,重新创建编辑
网络配置,ifconfig -a| chakan runing 的网卡 cd /etc/sysconfig/network-scripts/
[root@ylzserver1 network-scripts]# cat ifcfg-eno1
TYPE=Ethernet PROXY_METHOD=none BROWSER_ONLY=no BOOTPROTO=none DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=no IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no IPV6_ADDR_GEN_MODE=stable-privacy NAME=eno1 UUID=e05cae7d-a2b6-441b-8245-f21566271edc DEVICE=eno1 ONBOOT=yes IPADDR=10.10.20.22 PREFIX=24
ifdown eno1 ifup eno1
其它配置参考:
允许低版本访问: [oracle@ylzserver2 admin]$ cat sqlnet.ora SQLNET.ALLOWED_LOGON_VERSION_SERVER=8 SQLNET.ALLOWED_LOGON_VERSION_CLIENT=8 配置 CTSS # /sbin/service ntpd stop Shutting down ntpd: [FAILED] # chkconfig ntpd off # mv /etc/ntp.conf /etc/ntp.conf.org mv /etc/ntp.conf.org /etc/ntp.conf 配置时间服务器NTP #vi /etc/ntp.conf server 192.168.50.251 # service ntpd stop # ntpdate 192.168.50.251 # service ntpd restart --增加-x选项 # vi /etc/sysconfig/ntpd # Drop root to id 'ntp:ntp' by default. OPTIONS="-u ntp:ntp -x -p /var/run/ntpd.pid" # chkconfig ntpd on # service ntpd restart # ps -ef |grep ntp ntp 1206 1 0 11:31 ? 00:00:00 ntpd -u ntp:ntp -p /var/run/ntpd.pid -g 2.2.9. 配置用户SHELL # echo $SHELL /bin/bash #vi /etc/profile 添加: if [ $USER = "grid" ]; then if [ $SHELL = "/bin/bash" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi umask 022 fi if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/bash" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi umask 022 fi 修改swap等大小: Swap 空间要求: # grep SwapTotal /proc/meminfo [root@szsc1 ~]# grep SwapTotal /proc/meminfo SwapTotal: 3148732 kB [root@szsc2 ~]# grep SwapTotal /proc/meminfo SwapTotal: 3148732 kB swapoff -a //停止所有的swap分区 lvcreate vgroot -n lvswap -L 20480M mkswap /dev/vgroot/lvswap /dev/vgroot/lvswap swap swap defaults 0 0 //将这个分区信息写进/etc/fstab文件(相当于分区表) swapon -va free export DISPLAY=10.208.220.25:0.0 内存大小: 共享内存大小: [root@szsc1 ~]# df -h /dev/shm/ Filesystem Size Used Avail Use% Mounted on tmpfs 1002M 0 1002M 0% /dev/shm [root@szsc2 ~]# df -h /dev/shm/ Filesystem Size Used Avail Use% Mounted on tmpfs 1002M 0 1002M 0% /dev/shm 改变shm大不小: # mount -t tmpfs shmfs -o size=80g /dev/shm 失败重装: rm -rf /etc/ora* rm -rf /opt/ora* rm -rf /usr/local/ora* rm -rf /tmp/.oracle rm -rf /tmp/CVU* rm -rf /tmp/OraIn* rm -rf /opt/ORCLfmap rm -rf /etc/oraInst.loc rm -rf /opt/ORCLfmap rm -rf /etc/oratab cd /u01/app/12.2.0/grid/crs/install # rootcrs.sh -deconfig -force Repeat on other nodes as required. If you are deconfiguring Oracle Clusterware on all nodes in the cluster, then on the last node, enter the following command: # rootcrs.sh -deconfig -force -lastnode Successfully detached Oracle home '/u01/app/12.2.0/grid' from the central inventory on the local node. Failed to delete directory '/u01/app/12.2.0/grid' on the local node. Failed to delete directory '/u01/app/oraInventory' on the local node. Successfully detached Oracle home '/u01/app/12.2.0/grid' from the central inventory on the remote nodes 'p2602'. Failed to delete directory '/u01/app/12.2.0/grid' on the remote nodes 'p2602'. Failed to delete directory '/u01/app/oraInventory' on the remote nodes 'p2602'. Failed to delete directory '/u01/app/grid' on the remote nodes 'p2602'. Oracle Universal Installer cleanup completed with errors. 删除GRID软件 1. 停掉所有集群软件 crsctl stop crs 2. su - root 在所有节点上执行(除了最后一个节点) $GRID_HOME/crs/install/rootcrs.pl -verbose -deconfig -force 在最后一个节点上执行 $GRID_HOME/crs/install/rootcrs.pl -verbose -deconfig -force -lastnode su - grid 在任意节点上执行 $GRID_HOME/deinstall/deinstall 在执行最后会提示执行两个文件,顺序在提示当中会由显示 在最后一个节点执行完毕,直接回车,默认删除清除目录内容 删除用户: userdel oracle cd /home rm -rf oracle cd /var/spool/mail rm -rf oracle dd if=/dev/zero of=/dev/raw[1-7] bs=1M count=3000