<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>SkyNet&#39;s Notes</title>
  
  <subtitle>凡心所向，素履以往！,生如逆旅，一苇以航！</subtitle>
  <link href="/atom.xml" rel="self"/>
  
  <link href="http://www.dpoint.cc/"/>
  <updated>2018-06-21T05:49:53.328Z</updated>
  <id>http://www.dpoint.cc/</id>
  
  <author>
    <name>SkyNet</name>
    
  </author>
  
  <generator uri="http://hexo.io/">Hexo</generator>
  
  <entry>
    <title>Redhat HA高可用集群架设</title>
    <link href="http://www.dpoint.cc/2017/12/26/Linux%E4%B9%8BHA%E9%AB%98%E5%8F%AF%E7%94%A8%E9%9B%86%E7%BE%A4/"/>
    <id>http://www.dpoint.cc/2017/12/26/Linux之HA高可用集群/</id>
    <published>2017-12-26T12:32:45.000Z</published>
    <updated>2018-06-21T05:49:53.328Z</updated>
    
    <content type="html"><![CDATA[<p>echo ‘192.168.8.100 node001’ &gt;&gt; /etc/hosts<br>echo ‘192.168.8.101 node002’ &gt;&gt; /etc/hosts<br>echo ‘192.168.8.102 node003’ &gt;&gt; /etc/hosts</p><a id="more"></a><p>ssh-keygen -t rsa -f ~/.ssh/id_rsa -P ‘’</p><p>ssh-copy-id -i ~/.ssh/id_rsa.pub node002</p><p>clustat -i 1<br>clusvcadm -d 88<br>clusvcadm -e 88</p><p>chkconfig cman on<br>chkconfig ricci on<br>chkconfig luci on<br>chkconfig rgmanager on<br>chkconfig modclusterd on<br>chkconfig clvmd on</p>]]></content>
    
    <summary type="html">
    
      &lt;p&gt;echo ‘192.168.8.100 node001’ &amp;gt;&amp;gt; /etc/hosts&lt;br&gt;echo ‘192.168.8.101 node002’ &amp;gt;&amp;gt; /etc/hosts&lt;br&gt;echo ‘192.168.8.102 node003’ &amp;gt;&amp;gt; /etc/hosts&lt;/p&gt;
    
    </summary>
    
    
  </entry>
  
  <entry>
    <title>Linux之时间服务器配置</title>
    <link href="http://www.dpoint.cc/2017/12/26/Linux%E4%B9%8B%E6%97%B6%E9%97%B4%E6%9C%8D%E5%8A%A1/"/>
    <id>http://www.dpoint.cc/2017/12/26/Linux之时间服务/</id>
    <published>2017-12-26T12:32:45.000Z</published>
    <updated>2018-06-21T05:50:09.700Z</updated>
    
    <content type="html"><![CDATA[<h1 id="服务器配置"><a href="#服务器配置" class="headerlink" title="服务器配置"></a>服务器配置</h1><h2 id="系统环境配置"><a href="#系统环境配置" class="headerlink" title="系统环境配置"></a>系统环境配置</h2><p>保存以下参数到<strong>ntp.sh</strong>,以root用户执行.</p><blockquote><p>chmod +x ntp.sh</p></blockquote><pre><code>#!/bin/shrm /etc/localtimeln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtimeecho &apos;ZONE=&quot;Asia/Shanghai&quot;&apos; &gt;/etc/timezoneecho &apos;UTC=false&apos; &gt;&gt;/etc/timezoneecho &apos;ARC=false&apos; &gt;&gt;/etc/timezoneecho &apos;ntpdate -bu 115.28.122.198&apos; &gt;&gt;/etc/rc.localecho &apos;ntpdate -bu 172.255.246.13&apos; &gt;&gt;/etc/rc.localecho &apos;ntpdate -bu 85.199.214.101&apos; &gt;&gt;/etc/rc.localecho &apos;ntpdate -bu 85.199.214.100&apos; &gt;&gt;/etc/rc.local</code></pre><a id="more"></a><h2 id="NTP服务器配置"><a href="#NTP服务器配置" class="headerlink" title="NTP服务器配置 "></a>NTP服务器配置</h2><blockquote><p>vim /etc/ntp.conf</p></blockquote><pre><code># NTP Network Time Protocol# **** ATTENTION ****: *You have to restart the NTP service when you change this file to activate the changes*# PLEASE CHECK THIS FILE CAREFULLY AND MODIFY IT IF REQUIRED# Configuration File created by Windows Binary Distribution Installer Rev.: 1.27  mbg# please check http://www.ntp.org for additional documentation and background information# restrict access to avoid abuse of NTP for traffic amplification attacks# see http://news.meinberg.de/244 for details restrict default noquery nopeer nomodify notrap restrict -6 default noquery nopeer nomodify notrap# allow status queries and everything else from localhostrestrict 127.0.0.1restrict -6 ::1restrict 0.0.0.0 netmask 0.0.0.0 nomodify nopeer# if you need to allow access from a remote host, you can add lines like this:# restrict &lt;IP OF REMOTE HOST&gt;# Use drift filedriftfile /var/lib/ntp/ntp.drift# your local system clock, should be used as a backup# (this is only useful if you need to distribute time no matter how good or bad it is)server 127.127.1.0# but it operates at a high stratum level to let the clients know and force them to# use any other timesource they may have.fudge 127.127.1.0 stratum 3# Use a NTP server from the ntp pool project (see http://www.pool.ntp.org)# Please note that you need at least four different servers to be at least protected against# one falseticker. If you only rely on internet time, it is highly recommended to add# additional servers here.# The &apos;iburst&apos; keyword speeds up initial synchronization, please check the documentation for more details!server    108.59.2.24    minpoll 6 maxpoll 9 iburstserver    115.28.122.198    minpoll 6 maxpoll 9 iburstserver    163.172.177.158    minpoll 6 maxpoll 9 iburstserver    173.255.246.13    minpoll 6 maxpoll 9 iburstserver    193.228.143.22    minpoll 6 maxpoll 9 iburstserver    202.112.10.36    minpoll 6 maxpoll 9 iburstserver    202.112.29.82    minpoll 6 maxpoll 9 iburstserver    202.118.176.2    minpoll 6 maxpoll 9 iburstserver    203.135.184.123    minpoll 6 maxpoll 9 iburstserver    212.47.249.141    minpoll 6 maxpoll 9 iburstserver    61.216.153.106    minpoll 6 maxpoll 9 iburstserver    85.199.214.100    minpoll 6 maxpoll 9 iburstserver    85.199.214.101    minpoll 6 maxpoll 9 iburst# End of generated ntp.conf --- Please edit this to suite your needsSYNC_HWCLOCK=yes</code></pre><h1 id="客户端配置"><a href="#客户端配置" class="headerlink" title="客户端配置"></a>客户端配置</h1><p>保存以下参数到<strong>ntp.sh</strong>,以root用户执行.</p><blockquote><p>chmod +x ntp.sh</p></blockquote><pre><code>#!/bin/shrm -f /etc/localtimeln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtimeecho &apos;ZONE=&quot;Asia/Shanghai&quot;&apos; &gt;/etc/timezoneecho &apos;UTC=false&apos; &gt;&gt;/etc/timezoneecho &apos;ARC=false&apos; &gt;&gt;/etc/timezoneecho &apos;ntpdate -bu 10.121.4.71&apos; &gt;&gt;/etc/rc.localrm -f /etc/ntp.confwget -P /etc/ http://10.121.4.100/ntp.conf</code></pre><h2 id="客户端配置文件"><a href="#客户端配置文件" class="headerlink" title="客户端配置文件"></a>客户端配置文件</h2><blockquote><p>vim /etc/ntp.conf</p></blockquote><pre><code>#normal node# For more information about this file, see the man pages# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5).driftfile /var/lib/ntp/drift# Permit time synchronization with our time source, but do not# permit the source to query or modify the service on this system.restrict default nomodifyrestrict -6 default kod nomodify notrap nopeer noquery# Permit all access over the loopback interface.  This could# be tightened as well, but to do so would effect some of# the administrative functions.restrict 127.0.0.1 restrict -6 ::1# Hosts on local network are less restricted.#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap# Use public servers from the pool.ntp.org project.# Please consider joining the pool (http://www.pool.ntp.org/join.html).#broadcast 192.168.1.255 autokey    # broadcast server#broadcastclient            # broadcast client#broadcast 224.0.1.1 autokey        # multicast server#multicastclient 224.0.1.1        # multicast client#manycastserver 239.255.254.254        # manycast server#manycastclient 239.255.254.254 autokey # manycast client# Undisciplined Local Clock. This is a fake driver intended for backup# and when no outside source of synchronized time is available. server 10.121.4.71 prefer minpoll 6 maxpoll 9 iburstserver 127.127.1.0#fudge 127.127.1.0 stratum 10# Enable public key cryptography.#cryptoincludefile /etc/ntp/crypto/pw# Key file containing the keys and key identifiers used when operating# with symmetric key cryptography. keys /etc/ntp/keys# Specify the key identifiers which are trusted.#trustedkey 4 8 42# Specify the key identifier to use with the ntpdc utility.#requestkey 8# Specify the key identifier to use with the ntpq utility.#controlkey 8</code></pre>]]></content>
    
    <summary type="html">
    
      &lt;h1 id=&quot;服务器配置&quot;&gt;&lt;a href=&quot;#服务器配置&quot; class=&quot;headerlink&quot; title=&quot;服务器配置&quot;&gt;&lt;/a&gt;服务器配置&lt;/h1&gt;&lt;h2 id=&quot;系统环境配置&quot;&gt;&lt;a href=&quot;#系统环境配置&quot; class=&quot;headerlink&quot; title=&quot;系统环境配置&quot;&gt;&lt;/a&gt;系统环境配置&lt;/h2&gt;&lt;p&gt;保存以下参数到&lt;strong&gt;ntp.sh&lt;/strong&gt;,以root用户执行.&lt;/p&gt;&lt;blockquote&gt;&lt;p&gt;chmod +x ntp.sh&lt;/p&gt;&lt;/blockquote&gt;&lt;pre&gt;&lt;code&gt;#!/bin/sh
rm /etc/localtime
ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
echo &amp;apos;ZONE=&amp;quot;Asia/Shanghai&amp;quot;&amp;apos; &amp;gt;/etc/timezone
echo &amp;apos;UTC=false&amp;apos; &amp;gt;&amp;gt;/etc/timezone
echo &amp;apos;ARC=false&amp;apos; &amp;gt;&amp;gt;/etc/timezone
echo &amp;apos;ntpdate -bu 115.28.122.198&amp;apos; &amp;gt;&amp;gt;/etc/rc.local
echo &amp;apos;ntpdate -bu 172.255.246.13&amp;apos; &amp;gt;&amp;gt;/etc/rc.local
echo &amp;apos;ntpdate -bu 85.199.214.101&amp;apos; &amp;gt;&amp;gt;/etc/rc.local
echo &amp;apos;ntpdate -bu 85.199.214.100&amp;apos; &amp;gt;&amp;gt;/etc/rc.local
&lt;/code&gt;&lt;/pre&gt;
    
    </summary>
    
    
  </entry>
  
  <entry>
    <title>Oracle之Linux（redhat）环境下安装</title>
    <link href="http://www.dpoint.cc/2017/12/26/Oracle%E4%B9%8BLinux%E7%8E%AF%E5%A2%83%E5%AE%89%E8%A3%85/"/>
    <id>http://www.dpoint.cc/2017/12/26/Oracle之Linux环境安装/</id>
    <published>2017-12-26T12:32:45.000Z</published>
    <updated>2018-06-21T04:24:30.964Z</updated>
    
    <content type="html"><![CDATA[<h1 id="RedHat6-X安装Oracle-12-2"><a href="#RedHat6-X安装Oracle-12-2" class="headerlink" title="RedHat6.X安装Oracle 12.2"></a>RedHat6.X安装Oracle 12.2</h1><h2 id="本文系统环境及软件版本"><a href="#本文系统环境及软件版本" class="headerlink" title="本文系统环境及软件版本"></a>本文系统环境及软件版本</h2><ul><li>Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production</li><li>Red Hat Enterprise Linux Server release 6.5 (Santiago)</li></ul><a id="more"></a><h3 id="Linux发行版本查看"><a href="#Linux发行版本查看" class="headerlink" title="Linux发行版本查看"></a>Linux发行版本查看</h3><ul><li>方式一</li></ul><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">cat /etc/issue</span><br></pre></td></tr></table></figure><ul><li>方式二</li></ul><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">lsb_release -a</span><br></pre></td></tr></table></figure><ul><li>方式三 (仅针对redhat，Fedora)</li></ul><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">cat /etc/redhat-release</span><br></pre></td></tr></table></figure><h3 id="常用软件工具及资源"><a href="#常用软件工具及资源" class="headerlink" title="常用软件工具及资源"></a>常用软件工具及资源</h3><ul><li><a href="http://xxx1.gd.xdowns.com/2017/PLSQLDeveloper.rar" target="_blank" rel="noopener">PLSQL Developer V12 X64</a></li><li><a href="https://www.baidu.com/s?ie=utf-8&amp;f=3&amp;rsv_bp=1&amp;tn=87048150_dg&amp;wd=navicat%20premium%20%E7%A0%B4%E8%A7%A3%E7%89%88&amp;oq=Navicat%2520premium%2520v11.2.1%2526lt%253B&amp;rsv_pq=d0da0a8d0001248c&amp;rsv_t=6f2eeSA9d5csd2G09W%2FcFcp96f%2BjiIeXyMGbR36TWPxlvoHMEwAqcccznyeRMQHXJ0g&amp;rqlang=cn&amp;rsv_enter=1&amp;inputT=1440&amp;rsv_sug3=3&amp;rsv_sug1=1&amp;rsv_sug7=100&amp;rsv_sug2=1&amp;prefixsug=Navicat%2520premium%2520&amp;rsp=2&amp;rsv_sug4=1441&amp;rsv_sug=1" target="_blank" rel="noopener">Navicat premium</a></li><li><a href="http://u.vip.rapidsave.org/dl6/o-5/p16171929/201758135533_268199.rar" target="_blank" rel="noopener">Xmanager.Enterprise.v5.1236</a></li><li><a href="http://download.oracle.com/otn/nt/instantclient/122010/instantclient-basic-windows.x64-12.2.0.1.0.zip" target="_blank" rel="noopener">Oracle 12.2.0.1.0 OCI文件</a></li><li><a href="http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html" target="_blank" rel="noopener">Oracle Instant Client所有平台及版本下载</a></li></ul><hr><h2 id="Linux基础环境配置"><a href="#Linux基础环境配置" class="headerlink" title="Linux基础环境配置"></a>Linux基础环境配置</h2><h3 id="配置网卡IP地址及DNS"><a href="#配置网卡IP地址及DNS" class="headerlink" title="配置网卡IP地址及DNS"></a>配置网卡IP地址及DNS</h3><p>vi /etc/sysconfig/networ-scripts/ifcfg-eth0</p><pre><code>DEVICE=eth0HWADDR=00:0C:29:70:48:34TYPE=EthernetUUID=361d2575-c1f7-4f22-bab0-0edfa5e9da73ONBOOT=yesNM_CONTROLLED=yesBOOTPROTO=staticIPADDR=10.121.2.29NETMASK=255.255.255.0GATEWAY=10.121.2.254DNS1=114.114.114.114DNS2=114.114.115.115</code></pre><p>测试网络解析及连接是否正常</p><blockquote><p>ping qq.com</p></blockquote><h3 id="hostname配置"><a href="#hostname配置" class="headerlink" title="hostname配置"></a>hostname配置</h3><p>hostname配置不正解或不一致,安装oracle时会报<strong>prvf-0002</strong>故障<br>hostname 修改后立即生效(新会话窗口)<br>修改network需重启后生效</p><pre><code>hostname DBServervim /etc/sysconfig/network</code></pre><p><a href="https://www.cnblogs.com/kerrycode/p/3595724.html" target="_blank" rel="noopener">参考资料:linux hostname深入理解</a></p><h3 id="删除Redhat系统自带YUM"><a href="#删除Redhat系统自带YUM" class="headerlink" title="删除Redhat系统自带YUM"></a>删除Redhat系统自带YUM</h3><p>查询</p><p><code>rpm -qa|grep yum</code></p><p>删除</p><p><code>rpm -qa |grep yum |xargs rpm -e --nodeps</code></p><p>###下载安装YUM安装文件并配置###<br>(1/3): openssl-1.0.1e-57.el6.x86_64.rpm | 1.5 MB 00:01<br>(2/3): python-2.6.6-66.el6_8.x86_64.rpm | 76 kB 00:00<br>(3/3): python-libs-2.6.6-66.el6_8.x86_64.rpm</p><pre><code>cd /etc/yum.repos.d/wget -P /etc/yum.repos.d/ http://mirrors.163.com/.help/CentOS6-Base-163.repomv rhel-source.repo rhel-source.repo.bakmv packagekit-media.repo packagekit-media.repo.bakmkdir -p /etc/yum.repos.d/yumpackagecd /etc/yum.repos.d/yumpackagewget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-2.6.6-66.el6_8.x86_64.rpmwget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-libs-2.6.6-66.el6_8.x86_64.rpmwget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpmwget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-metadata-parser-1.1.2-16.el6.x86_64.rpmwget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpmwget http://mirrors.163.com/centos/6/os/x86_64/Packages/yum-3.2.29-81.el6.centos.noarch.rpmwget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-urlgrabber-3.9.1-11.el6.noarch.rpmwget http://mirrors.163.com/centos/6/os/x86_64/Packages/screen-4.0.3-19.el6.x86_64.rpm</code></pre><h3 id="Yum-Install"><a href="#Yum-Install" class="headerlink" title="Yum Install"></a>Yum Install</h3><pre><code>rpm -Uvh python-2.6.6-66.el6_8.x86_64.rpm python-libs-2.6.6-66.el6_8.x86_64.rpm python-iniparse-0.3.1-2.1.el6.noarch.rpm --nosignature --nodepsrpm -Uvh yum-3.2.29-81.el6.centos.noarch.rpm yum-metadata-parser-1.1.2-16.el6.x86_64.rpm yum-plugin-fastestmirror-1.1.30-40.el6.noarch.rpm python-urlgrabber-3.9.1-11.el6.noarch.rpm --nosignature --nodeps</code></pre><p>###替换Yum配置文件版本号###</p><pre><code>cd ..vi CentOS6-Base-163.repo</code></pre><p><code>%s/$releasever/6/g</code></p><blockquote><p>%s/源字符串/目的字符串/g</p></blockquote><h3 id="Yum初始化（并安装vim测试）"><a href="#Yum初始化（并安装vim测试）" class="headerlink" title="Yum初始化（并安装vim测试）"></a>Yum初始化（并安装vim测试）</h3><pre><code>yum clean allyum makecacheyum install vim</code></pre><h2 id="Oracle-R12-2-Install"><a href="#Oracle-R12-2-Install" class="headerlink" title="Oracle R12.2 Install"></a>Oracle R12.2 Install</h2><hr><h3 id="Checking-Hardware-and-Memory-Configuration"><a href="#Checking-Hardware-and-Memory-Configuration" class="headerlink" title="Checking Hardware and Memory Configuration"></a>Checking Hardware and Memory Configuration</h3><pre><code>grep SwapTotal /proc/meminfofreedf -hdf -h /tmpgrep MemTotal /proc/meminfo</code></pre><h3 id="Oracle-installer-prepare"><a href="#Oracle-installer-prepare" class="headerlink" title="Oracle installer prepare"></a>Oracle installer prepare</h3><ul><li><a href="https://docs.oracle.com/database/121/LADBI/chklist.htm#LADBI8045" target="_blank" rel="noopener">安装检查参考</a></li><li><a href="https://docs.oracle.com/database/121/LADBI/app_ts.htm#LADBI7939" target="_blank" rel="noopener"><strong>安装过程Troubleshooting</strong></a></li><li><a href="https://www.cnblogs.com/kerrycode/archive/2013/09/13/3319958.html" target="_blank" rel="noopener">安装过程参考</a></li><li><a href="http://blog.itpub.net/29440247/viewspace-1445502/" target="_blank" rel="noopener">Swap分区调整参考</a></li></ul><h3 id="SoftWare-Install"><a href="#SoftWare-Install" class="headerlink" title="SoftWare Install"></a>SoftWare Install</h3><p><strong>Linux7</strong></p><p><code>yum install binutils ksh compat-libcap1 compat-libstdc++* gcc gcc-c++ glibc.i686 glibc.x86_64 glibc-dev* libaio* libgcc* libstdc++* libXi.* libXtst.* make sysstat</code></p><p><strong>Linux6</strong></p><pre><code>yum install binutils ksh compat-libcap1 compat-libstdc++* gcc gcc-c++ glibc.i686 glibc.x86_64 glibc-dev* libaio* libgcc* libstdc++* libXi.* libXtst.* make sysstatyum install libXau libxcb libXi libXext</code></pre><p><strong>Linux5</strong></p><pre><code>yum install binutils ksh coreutils compat-libstdc++* gcc gcc-c++ glibc.i686 glibc.x86_64 glibc-dev* libaio* libgcc* libstdc++* libXi.* libXtst.* make sysstatyum install libXau libXi libXext</code></pre><h3 id="Create-Groups-and-Users"><a href="#Create-Groups-and-Users" class="headerlink" title="Create Groups and Users"></a>Create Groups and Users</h3><pre><code>groupadd oinstallgroupadd oracleuseradd -g oinstall -G oracle oracle</code></pre><blockquote><p>修改命令</p><p><code>usermod -g oinstall -G oracle</code></p></blockquote><h3 id="建立文件目录并赋权"><a href="#建立文件目录并赋权" class="headerlink" title="建立文件目录并赋权"></a>建立文件目录并赋权</h3><pre><code>mkdir -p /u01/app/oraclemkdir -p /u01/app/oraInventorychown -R  oracle:oinstall /u01/appchmod -R 775 /u01/app</code></pre><h3 id="配置用户变量"><a href="#配置用户变量" class="headerlink" title="配置用户变量"></a>配置用户变量</h3><p>设置用户密码</p><pre><code>passwd oracleygct@666888</code></pre><p>配置安装文件权限<strong>(在执行赋权命令前,请将oracle安装文件在database目录下)</strong><br>mkdir -p /opt/database<br>chmod -R 775 /opt/database</p><p>配置oracle用户变量<br><strong>注意修改</strong>ORACLE_SID=<strong>ORCL</strong>;</p><blockquote><p>vim ~oracle/.bash_profile</p></blockquote><pre><code>umask 022TMP=/tmp; export TMPTMPDIR=$TMP; export TMPDIRORACLE_BASE=/u01/app/oracle; export ORACLE_BASEORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1; export ORACLE_HOMEORACLE_SID=ORCL; export ORACLE_SIDORACLE_TERM=xterm; export ORACLE_TERMPATH=/usr/sbin:$PATH; export PATHPATH=$ORACLE_HOME/bin:$PATH; export PATHLD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATHCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH</code></pre><h2 id="开始安装"><a href="#开始安装" class="headerlink" title="开始安装"></a>开始安装</h2><p><strong>请以Oracle用户登录到SSH,不能使用SU命令进行切换</strong></p><p>查看用户变量</p><p><strong>请以Oracle用户运行</strong></p><pre><code>umaskenv | more</code></pre><h2 id="运行安装程序"><a href="#运行安装程序" class="headerlink" title="运行安装程序"></a>运行安装程序</h2><p><strong>请以Oracle用户运行</strong></p><pre><code>cd /opt/database/./runInstaller</code></pre><p>运行以上命令后 后弹出Oracle安装图形界面.<br>请在图形界面进行安装环境的检查,检查完后请点击<strong>Check&amp;FIX</strong></p><p>然后<strong>请以Root用户</strong>执行以下脚本进行修复</p><blockquote><p>/tmp/CVU_12.2.0.1.0_oracle/runfixup.sh</p></blockquote><p>修复完成后再次运行检查程序,直至没有错误及警告产生.</p><h2 id="结束脚本运行"><a href="#结束脚本运行" class="headerlink" title="结束脚本运行"></a>结束脚本运行</h2><p><strong>请以Root用户运行以下脚本</strong></p><blockquote><p>/u01/app/oraInventory/orainstRoot.sh</p><p>/u01/app/oracle/product/12.1.0/db_1/root.sh</p></blockquote><blockquote><p>Enter the full pathname of the local bin directory: [/usr/local/bin]:<br>/usr/local/bin</p></blockquote><h2 id="安装完成"><a href="#安装完成" class="headerlink" title="安装完成"></a>安装完成</h2><p>安装完成后,Oracle数据库已经为启动状态,请不要再次启用.</p><p>如再次启动时会出现出下错误:</p><blockquote><p>SQLstartup<br>ORACLE instance started.</p><p>Total System Global Area 3758096384 bytes<br>Fixed Size 8627392 bytes<br>Variable Size 872418112 bytes<br>Database Buffers 2868903936 bytes<br>Redo Buffers 8146944 bytes<br><strong><em>ORA-01102: cannot mount database in EXCLUSIVE mode</em></strong></p></blockquote><h3 id="解决方法"><a href="#解决方法" class="headerlink" title="解决方法"></a>解决方法</h3><ul><li><p>关闭这个未完全启动的数据库<br>使用oracle帐号登录SSH,执行如下命令</p><p>sqlplus “/as sysdba”<br>shutdown immediate;</p></li></ul><p>输出</p><blockquote><p>SQL&gt; shutdown immediate;<br>ORA-01507: database not mounted<br>ORACLE instance shut down.</p></blockquote><ul><li>查找dbs目录,找到lkORCL文件<br>这个目录随不同的安装过程,可能出现在不同的地方,有的时候在oracle账户的home目录下,有时出现在$ORACLE_HOME下</li></ul><pre><code>[oracle@oracle ~]$ cd $ORACLE_HOME[oracle@oracle db_1]$ cd dbs[oracle@oracle dbs]$ lshc_orcl.dat  initdw.ora  init.ora  lkORCL  orapworcl  spfileorcl.ora</code></pre><p>执行下列命令查找锁定lkORCL文件的进程</p><pre><code>fuser -u lkORCL</code></pre><p>执行下列命令终止进程</p><pre><code>fuser -k lkORCL</code></pre><p>重新启动数据库</p><pre><code>sqlplus / as sysdbastartup;</code></pre><p>查看数据库状态 <em>OPEN_MODE</em> 为 <strong>READ WRITE</strong></p><pre><code>select open_mode from v$database;</code></pre><h2 id="配置Oracle监听-直接安装时建库无需配置"><a href="#配置Oracle监听-直接安装时建库无需配置" class="headerlink" title="配置Oracle监听(直接安装时建库无需配置)"></a>配置Oracle监听(直接安装时建库无需配置)</h2><p><code>cd /u01/app/oracle/product/12.1.0/db_1/network/admin</code></p><p>查看监听状态</p><p><code>ps -ef | grep tnslsnr</code></p><h3 id="Oracle自动生成的监听配置"><a href="#Oracle自动生成的监听配置" class="headerlink" title="Oracle自动生成的监听配置"></a>Oracle自动生成的监听配置</h3><h4 id="listener-ora"><a href="#listener-ora" class="headerlink" title="listener.ora"></a>listener.ora</h4><pre><code># listener.ora Network Configuration File: /u01/app/oracle/product/12.1.0/db_1/network/admin/listener.ora# Generated by Oracle configuration tools.LISTENER =  (DESCRIPTION_LIST =    (DESCRIPTION =      (ADDRESS = (PROTOCOL = TCP)(HOST = yghttest)(PORT = 1521))      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))    )  )</code></pre><h4 id="tnsnames-ora"><a href="#tnsnames-ora" class="headerlink" title="tnsnames.ora"></a>tnsnames.ora</h4><pre><code># tnsnames.ora Network Configuration File: /u01/app/oracle/product/12.1.0/db_1/network/admin/tnsnames.ora# Generated by Oracle configuration tools.LISTENER_ORCL =  (ADDRESS = (PROTOCOL = TCP)(HOST = yghttest)(PORT = 1521))ORCL =  (DESCRIPTION =    (ADDRESS = (PROTOCOL = TCP)(HOST = yghttest)(PORT = 1521))    (CONNECT_DATA =      (SERVER = DEDICATED)      (SERVICE_NAME = ORCL)    )  )</code></pre><h4 id="sqlnet-ora"><a href="#sqlnet-ora" class="headerlink" title="sqlnet.ora"></a>sqlnet.ora</h4><pre><code># sqlnet.ora Network Configuration File: /u01/app/oracle/product/12.1.0/db_1/network/admin/sqlnet.ora# Generated by Oracle configuration tools.NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)</code></pre><h3 id="手工配置监听"><a href="#手工配置监听" class="headerlink" title="手工配置监听"></a>手工配置监听</h3><h4 id="动态监听时"><a href="#动态监听时" class="headerlink" title="动态监听时"></a>动态监听时</h4><pre><code>SID_LIST_LISTENER = (SID_LIST =  (SID_DESC =   (SID_NAME = PLSExtProc)    (ORACLE_HOME = /u01/app/oracle/product/12.1.0/db_1)     (PROGRAM=extproc)  ) )LISTENER = (DESCRIPTION =  (ADDRESS_LIST =   (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))  ) )</code></pre><p>####静态监听(注意更改SID)####<br>LISTENER =<br>(DESCRIPTION =<br>(ADDRESS_LIST =<br>(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))<br>(ADDRESS=(PROTOCOL=ipc)(KEY=extproc))<br>)<br>)</p><pre><code>SID_LIST_LISTENER = (SID_LIST =# (SID_DESC =    # (SID_NAME = PLSExtProc)        # (ORACLE_HOME = /u01/app/oracle/product/12.1.0/db_1)            # (PROGRAM=extproc)# )  (SID_DESC =    (GLOBAL_DBNAME = gdyght)        (ORACLE_HOME = /u01/app/oracle/product/12.1.0/db_1)            (SID_NAME=gdyght) ))</code></pre><p><strong>重启监听</strong></p><p><code>tnslsnr reload</code></p><p><code>tnslsnr stop</code></p><p><code>tnslsnr start</code></p><p><a href="https://yghtdb:5500/em" target="_blank" rel="noopener">https://yghtdb:5500/em</a></p><h2 id="其它内容"><a href="#其它内容" class="headerlink" title="其它内容"></a>其它内容</h2><p><strong>SCP从远程拉取数据库安装文件到本地</strong></p><pre><code>scp -r root@10.121.2.29:/usr/local/database /opt/datebase</code></pre><p><strong>Screen使用说明</strong></p><blockquote><p>screen -S yourname -&gt; 新建一个叫yourname的session<br>screen -ls -&gt; 列出当前所有的session<br>screen -r yourname -&gt; 回到yourname这个session<br>screen -d yourname -&gt; 远程detach某个session<br>screen -d -r yourname -&gt; 结束当前session并回到yourname这个session</p></blockquote><hr>]]></content>
    
    <summary type="html">
    
      &lt;h1 id=&quot;RedHat6-X安装Oracle-12-2&quot;&gt;&lt;a href=&quot;#RedHat6-X安装Oracle-12-2&quot; class=&quot;headerlink&quot; title=&quot;RedHat6.X安装Oracle 12.2&quot;&gt;&lt;/a&gt;RedHat6.X安装Oracle 12.2&lt;/h1&gt;&lt;h2 id=&quot;本文系统环境及软件版本&quot;&gt;&lt;a href=&quot;#本文系统环境及软件版本&quot; class=&quot;headerlink&quot; title=&quot;本文系统环境及软件版本&quot;&gt;&lt;/a&gt;本文系统环境及软件版本&lt;/h2&gt;&lt;ul&gt;&lt;li&gt;Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production&lt;/li&gt;&lt;li&gt;Red Hat Enterprise Linux Server release 6.5 (Santiago)&lt;/li&gt;&lt;/ul&gt;
    
    </summary>
    
    
  </entry>
  
  <entry>
    <title>Hello World</title>
    <link href="http://www.dpoint.cc/2017/12/24/hello-world/"/>
    <id>http://www.dpoint.cc/2017/12/24/hello-world/</id>
    <published>2017-12-24T09:32:45.000Z</published>
    <updated>2017-12-27T05:49:20.233Z</updated>
    
    <content type="html"><![CDATA[<p>Welcome to <a href="https://hexo.io/" target="_blank" rel="noopener">Hexo</a>! This is your very first post. Check <a href="https://hexo.io/docs/" target="_blank" rel="noopener">documentation</a> for more info. If you get any problems when using Hexo, you can find the answer in <a href="https://hexo.io/docs/troubleshooting.html" target="_blank" rel="noopener">troubleshooting</a> or you can ask me on <a href="https://github.com/hexojs/hexo/issues" target="_blank" rel="noopener">GitHub</a>.</p><h2 id="Quick-Start"><a href="#Quick-Start" class="headerlink" title="Quick Start"></a>Quick Start</h2><h3 id="Create-a-new-post"><a href="#Create-a-new-post" class="headerlink" title="Create a new post"></a>Create a new post</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo new <span class="string">"My New Post"</span></span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/writing.html" target="_blank" rel="noopener">Writing</a></p><h3 id="Run-server"><a href="#Run-server" class="headerlink" title="Run server"></a>Run server</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo server</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/server.html" target="_blank" rel="noopener">Server</a></p><h3 id="Generate-static-files"><a href="#Generate-static-files" class="headerlink" title="Generate static files"></a>Generate static files</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo generate</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/generating.html" target="_blank" rel="noopener">Generating</a></p><h3 id="Deploy-to-remote-sites"><a href="#Deploy-to-remote-sites" class="headerlink" title="Deploy to remote sites"></a>Deploy to remote sites</h3><figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">$ hexo deploy</span><br></pre></td></tr></table></figure><p>More info: <a href="https://hexo.io/docs/deployment.html" target="_blank" rel="noopener">Deployment</a></p>]]></content>
    
    <summary type="html">
    
      
      
        &lt;p&gt;Welcome to &lt;a href=&quot;https://hexo.io/&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;Hexo&lt;/a&gt;! This is your very first post. Check &lt;a href=&quot;https://hexo.
      
    
    </summary>
    
    
  </entry>
  
</feed>
