真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

oracle11grac配置

openfile:
192.168.10.40
DNS+NTP:
192.168.10.41


1.rpm安裝系統(tǒng)包:
rpm -Uvh binutils-*
rpm -ivh compat-libcap1-1.10-1.x86_64.rpm
rpm -Uvh compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm
rpm -Uvh elfutils-libelf-0.*
rpm -Uvh elfutils-libelf-devel-*
rpm -Uvh gcc-4.*
rpm -Uvh gcc-c++-4.*
rpm -Uvh glibc-2.*
rpm -Uvh glibc-common-2.*
rpm -Uvh glibc-devel-2.*
rpm -Uvh glibc-headers-2.*
rpm -Uvh ksh-2*
rpm -Uvh libaio-0.*
rpm -Uvh libaio-devel-0.*
rpm -Uvh libgcc-4.*
rpm -Uvh libstdc++-4.*
rpm -Uvh libstdc++-devel-4.*
rpm -Uvh make-3.*
rpm -Uvh sysstat-7.*
rpm -Uvh unixODBC-2.*
rpm -Uvh unixODBC-devel-2.*


2.創(chuàng)建用戶和組:
/usr/sbin/groupadd -g 501 oinstall
/usr/sbin/groupadd -g 502 dba
/usr/sbin/groupadd -g 503 oper
/usr/sbin/groupadd -g 504 asmadmin
/usr/sbin/groupadd -g 505 asmoper
/usr/sbin/groupadd -g 506 asmdba
/usr/sbin/useradd -g oinstall -G dba,asmdba,oper -u 500 oracle
/usr/sbin/useradd -g oinstall -G asmadmin,asmdba,asmoper,oper,dba -u 501 grid

3.創(chuàng)建目錄:

mkdir -p /u01/app/
chmod -R 775 /u01/app/

mkdir -p /u01/app/oraInventory
chown -R grid:oinstall /u01/app/oraInventory
chmod -R 775 /u01/app/oraInventory

mkdir -p /u01/app/grid
mkdir /u01/app/11.2.0/grid -p
mkdir -p /u01/app/oracle
mkdir -p /u01/app/oracle/cfgtoollogs
chown -R grid:oinstall /u01/app/11.2.0
chown -R grid:oinstall /u01/app/grid
chown -R oracle:oinstall /u01/app/oracle/
chmod -R 775 /u01/app/oracle/
chmod -R 775 /u01/app/grid

4.修改hosts文件

127.0.0.1              localhost.lbdb.com       localhost
192.168.40.11          node1.lbdb.com           node1
192.168.40.12          node2.lbdb.com           node2
10.10.10.11            node1-priv.lbdb.com      node1-priv
10.10.10.12            node2-priv.lbdb.com      node2-priv
192.168.40.13          node1-vip.lbdb.com       node1-vip
192.168.40.14          node2-vip.lbdb.com       node2-vip


192.168.40.15         node-scan.lbdb.com       node-scan
192.168.40.16         node-scan.lbdb.com       node-scan
192.168.40.17         node-scan.lbdb.com       node-scan

5.修改參數(shù)
cat >> /etc/security/limits.conf << EOF
grid soft nproc 2047
grid hard nproc 16384
grid soft nofile 1024
grid hard nofile 65536
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
EOF

cat >> /etc/pam.d/login << EOF
session required /lib/security/pam_limits.so
EOF

cat >> /etc/sysctl.conf << EOF
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 8388608
kernel.shmmax = 536870912
kernel.shmmax = 1073741824
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 = 1048586
EOF



6.修改用戶環(huán)境變量:
su - grid

export ORACLE_BASE=/u01/app/grid
export ORACLE_HOME=/u01/app/11.2.0/grid/product/11.2/grid
export PATH=$PATH:/u01/app/grid/product/11.2/grid/bin
export NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
#根據(jù)具體環(huán)境設(shè)置
#export ORACLE_SID=+ASM1
#export ORACLE_SID=+ASM2

if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
        if [ $SHELL = "/bin/ksh" ]; then
             ulimit -p 16384
               ulimit -n 65536
       else
         ulimit -u 16384 -n 65536
        fi
       umask 022
fi





su - oracle

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=/u01/app/oracle/product/11.2/db
export PATH=$PATH:/u01/app/oracle/product/11.2/db/bin
export NLS_DATE_FORMAT="yyyy-mm-dd HH24:MI:SS"
export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
#根據(jù)具體環(huán)境設(shè)置
#export ORACLE_SID=bridge1
#export ORACLE_SID=bridge2
export ORACLE_UNQNAME=bridge 安裝數(shù)據(jù)庫時(shí)候 開啟em功能  需要設(shè)置
if [ $USER = "oracle" ] || [ $USER = "grid" ]; then
        if [ $SHELL = "/bin/ksh" ]; then
             ulimit -p 16384
               ulimit -n 65536
       else
         ulimit -u 16384 -n 65536
        fi
       umask 022
fi


7.停止ntp并刪除ntp配置文件和服務(wù)(注意兩個(gè)節(jié)點(diǎn)都要操作)
/etc/init.d/ntpd stop
 mv /etc/ntp.conf /etc/ntp.conf-bak


8.掛載磁盤并分區(qū)
本文使用iscsic
rpm -ivh iscsi-initiator-utils-6.2.0.871-0.16.el5.x86_64.rpm
/etc/init.d/iscsi restart
/etc/init.d/iscsid restart
chkconfig iscsi on
chkconfig iscsid on
發(fā)現(xiàn):
iscsiadm -m discovery -t sendtargets -p 192.168.10.40
手動掛起:
iscsiadm -m node -T iqn.2006-01.com.openfiler:tsn.28fcc085aa01 -p 192.168.10.40 -l

9.使用udev管理磁盤設(shè)備
#安裝oracleasm
拍虛擬機(jī)快照
 fdisk格式化磁盤
兩個(gè)節(jié)點(diǎn)執(zhí)行:
vi /etc/udev/rules.d/60-raw.rules
添加如下內(nèi)容:
ACTION=="add", KERNEL=="sdb1", RUN+="/bin/raw /dev/raw/raw1 %N"
ACTION=="add", KERNEL=="raw1", OWNER="grid",GROUP="asmadmin",MODE="660"
ACTION=="add", KERNEL=="sdc1", RUN+="/bin/raw /dev/raw/raw2 %N"
ACTION=="add", KERNEL=="raw2", OWNER="grid",GROUP="asmadmin",MODE="660"
ACTION=="add", KERNEL=="sdd1", RUN+="/bin/raw /dev/raw/raw3 %N"
ACTION=="add", KERNEL=="raw3", OWNER="grid",GROUP="asmadmin",MODE="660"
重啟udev:
start_udev


#oracleasm configure -i
#oracleasm init
#一個(gè)節(jié)點(diǎn)執(zhí)行:
#oracleasm createdisk ocr_vote /dev/sdd1

10.安裝grid
上傳grid文件到node1的grid用戶目錄下并解壓
執(zhí)行./runInstaller 安裝


11.用oracle用戶登錄,安裝oracle數(shù)據(jù)庫軟件,oracle

12.創(chuàng)建ASM 磁盤組
以grid用戶登錄系統(tǒng),使用asmca命令創(chuàng)建磁盤組


13.以oracle用戶執(zhí)行dbca創(chuàng)建數(shù)據(jù)庫。
注意:
內(nèi)存選擇70%時(shí)候報(bào)錯(cuò):
如下解決:
vi /etc/fstab
tmpfs                   /dev/shm                tmpfs   defaults,size=1250M        0 0
mount -o remount /dev/shm
兩個(gè)節(jié)點(diǎn)都要執(zhí)行。

配置DNS服務(wù)器
首先確認(rèn)主機(jī)名稱:
編輯hosts文件
vi /etc/hosts                                      
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1                    localhost.zhou.com     localhost
192.168.10.87           www.zhou.com           www

一、安裝 DNS Server         
rpm -ivh bind-9.3.6-4.P1.el5_4.2.x86_64.rpm
rpm -ivh bind-chroot-9.3.6-4.P1.el5_4.2.x86_64.rpm                     
rpm -ivh caching-nameserver-9.3.6-4.P1.el5_4.2.x86_64.rpm
  二、配置 DNS Server
 
 (1)、創(chuàng)建主配置文件 named.conf
  cd /var/named/chroot/etc
  cp -p named.caching-nameserver.conf named.conf
  vi named.conf   ###修改named.conf文件,將源文件中的所有l(wèi)ocalhost以及127.0.0.1修改成any,注意any;前后保留空格還有最后
  include "/etc/named.zones";名字  
  修改后如下:
                                                                          
[root@www etc]# cat named.conf                                               
//                                                                           
// named.caching-nameserver.conf                                             
//                                                                           
// Provided by Red Hat caching-nameserver package to configure the           
// ISC BIND named(8) DNS server as a caching only nameserver                 
// (as a localhost DNS resolver only).                                       
//                                                                           
// See /usr/share/doc/bind*/sample/ for example named configuration files.   
//                                                                           
// DO NOT EDIT THIS FILE - use system-config-bind or an editor               
// to create named.conf - edits to this file will be lost on                 
// caching-nameserver package upgrade.                                       
//                                                                           
options {                                                                    
    listen-on port 53 { any; };                                                
    listen-on-v6 port 53 { ::1; };                                             
    directory     "/var/named";                                                  
    dump-file     "/var/named/data/cache_dump.db";                             
        statistics-file "/var/named/data/named_stats.txt";                 
        memstatistics-file "/var/named/data/named_mem_stats.txt";          
                                                                           
    // Those options should be used carefully because they disable port      
    // randomization                                                         
    // query-source    port 53;                                                 
    // query-source-v6 port 53;                                              
                                                                           
    allow-query     { any; };                                                
    allow-query-cache { any; };                                              
};                                                                         
logging {                                                                  
        channel default_debug {                                            
                file "data/named.run";                                     
                severity dynamic;                                          
        };                                                                 
};                                                                         
view localhost_resolver {                                                  
    match-clients        { any; };                                             
    match-destinations { any; };                                             
    recursion yes;                                                           
    include "/etc/named.zones";    ###此處需要修改,修改的名字為以下的    cp -p named.rfc1912.zones named.zones                                         
};                                                                         



(2)cp -p named.rfc1912.zones named.zones
 
  #以下兩個(gè)zone為新增的,包含正向和反向zone
  vi named.zones修改后的結(jié)果如下:  
   
[root@www etc]# cat named.zones                                                   
// named.rfc1912.zones:                                                           
//                                                                                
// Provided by Red Hat caching-nameserver package                                 
//                                                                                
// ISC BIND named zone configuration for zones recommended by                     
// RFC 1912 section 4.1 : localhost TLDs and address zones                        
//                                                                                
// See /usr/share/doc/bind*/sample/ for example named configuration files.        
//                                                                                
#zone "." IN {
#       type hint;
#       file "named.ca";
#};
zone "." IN {
        type hint;
        file "/dev/null";
};

                                                                                  
zone "localdomain" IN {                                                           
    type master;                                                                    
    file "localdomain.zone";                                                        
    allow-update { none; };                                                         
};                                                                                
                                                                                  
zone "localhost" IN {                                                             
    type master;                                                                    
    file "localhost.zone";                                                          
    allow-update { none; };                                                         
};                                                                                
                                                                                  
zone "0.0.127.in-addr.arpa" IN {                                                  
    type master;                                                                    
    file "named.local";                                                             
    allow-update { none; };                                                         
};                                                                                
                                                                                  
zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
        type master;                                                              
    file "named.ip6.local";                                                         
    allow-update { none; };                                                         
};                                                                                
                                                                                  
zone "255.in-addr.arpa" IN {                                                      
    type master;                                                                    
    file "named.broadcast";                                                         
    allow-update { none; };                                                         
};                                                                                
                                                                                  
zone "0.in-addr.arpa" IN {                                                        
    type master;                                                                    
    file "named.zero";                                                              
    allow-update { none; };                                                         
};                                                                                
zone "bridge.org" IN {                                                            
        type master;                                                              
        file "www.bridge.zero";       ###注意和主機(jī)名稱對應(yīng)                                            
        allow-update { none; };                                                   
};                                                                                
zone "88.168.192.in-addr.arpa" IN {                                               
        type master;                                                              
        file "88.168.192.local";                                                  
        allow-update { none; };                                                   
};                                                                                


(3)#配置正向和反向搜索數(shù)據(jù)庫解析文件
      [root@node1 etc]# pwd  
      /var/named/chroot/etc  
      [root@node1 etc]# cd  ../var/named/    
      
      #同樣使用cp -p 方式復(fù)制文件到新的正向和反向文件
      [root@www named]# cp -p named.zero  www.bridge.zero  名字與上面的新增解析文件名字一樣
      [root@www named]# cp -p named.local 88.168.192.local   名字與上面的新增解析文件名字一樣
 
      #下面是修改之后的正向搜索文件,也可以將host文件的其他ip對照編輯到正向搜索文件以實(shí)現(xiàn)解析  
      #如下面的例子將vip的參照關(guān)系也添加到解析文件  
      

[root@www named]# cat www.bridge.zero
$TTL    86400
@               IN SOA  www.bridge.org.      root.bridge.org. (
                                        42              ; serial (d. adams)
                                        3H              ; refresh
                                        15M             ; retry
                                        1W              ; expiry
                                        1D )            ; minimum
    IN    NS    www.bridge.org.
node-scan      IN   A   192.168.88.100
node-scan      IN   A   192.168.88.101
node-scan      IN   A   192.168.88.102
node1          IN   A   192.168.88.81
node2          IN   A   192.168.88.82
node1-vip      IN   A   192.168.88.91
node2-vip      IN   A   192.168.88.92



                                 
 #下面是修改之后的反向搜索文件   
 
 [root@www named]# cat 88.168.192.local
$TTL    86400
@       IN      SOA     www.bridge.org. root.bridge.org.  (
                                      1997022700 ; Serial
                                      28800      ; Refresh
                                      14400      ; Retry
                                      3600000    ; Expire
                                      86400 )    ; Minimum
        IN      NS      www.bridge.org.
1       IN      PTR     www.bridge.org.
100     IN      PTR     node-scan.
101     IN      PTR     node-scan.
102     IN      PTR     node-scan.
81      IN      PTR     node1.
82      IN      PTR     node2.
91      IN      PTR     node1-vip.
92      IN      PTR     node2-vip.

   
dns配置注意:
修改權(quán)限:
cd /var/run
chmod 777 named

查看報(bào)錯(cuò)信息:
named -d 3 -f -g
tail -f /var/log/messages
建立soft link:
ln -s /var/named/chroot/etc/named.conf /etc/named.conf
ln -s /var/named/chroot/etc/named.zones /etc/named.zones

重啟那么多服務(wù)
(4)為客戶端添加dns解析:

編輯 /etc/resolv.conf 文件,
編輯后內(nèi)容如下:
[root@node1 ~]# cat /etc/resolv.conf
search bridge.org       
nameserver 192.168.88.11
 
 修改 vi /etc/nsswitch.conf文件:
[root@node1 ~]# cat /etc/nsswitch.conf
#
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Legal entries are:
#
#    nisplus or nis+        Use NIS+ (NIS version 3)
#    nis or yp        Use NIS (NIS version 2), also called YP
#    dns            Use DNS (Domain Name Service)
#    files            Use the local files
#    db            Use the local database (.db) files
#    compat            Use NIS on compat mode
#    hesiod            Use Hesiod for user lookups
#    [NOTFOUND=return]    Stop searching if not found so far
#

# To use db, put the "db" in front of "files" for entries you want to be
# looked up first in the databases
#
# Example:
#passwd:    db files nisplus nis
#shadow:    db files nisplus nis
#group:     db files nisplus nis

passwd:     files
shadow:     files
group:      files

#hosts:     db files nisplus nis dns
hosts:      dns files   #######更改此處的解析順序

# Example - obey only what nisplus tells us...
#services:   nisplus [NOTFOUND=return] files
#networks:   nisplus [NOTFOUND=return] files
#protocols:  nisplus [NOTFOUND=return] files
#rpc:        nisplus [NOTFOUND=return] files
#ethers:     nisplus [NOTFOUND=return] files
#netmasks:   nisplus [NOTFOUND=return] files     

bootparams: nisplus [NOTFOUND=return] files

ethers:     files
netmasks:   files
networks:   files
protocols:  files
rpc:        files
services:   files

netgroup:   nisplus

publickey:  nisplus

automount:  files nisplus
aliases:    files nisplus






 



RAC簡單維護(hù):
srvctl:
1.啟動一個(gè)與數(shù)據(jù)庫相關(guān)的所有實(shí)例:
srvctl start database -d bridge

2.關(guān)閉一個(gè)與數(shù)據(jù)庫相關(guān)的所有實(shí)例:
srvctl stop database -d bridge

3.查看數(shù)據(jù)庫的當(dāng)前狀態(tài):
srvctl status database -d bridge

4.啟動其中單一的實(shí)例:
srvctl start instance -d bridge -i bridge1
srvctl start instance -d bridge -n node1

5.表空間維護(hù):
oracle 11G R2 RAC ASM 創(chuàng)建表空間:
CREATE TABLESPACE TBS_IMOOLLY DATAFILE '+DATA' SIZE 128M AUTOEXTEND ON NEXT 128M MAXSIZE 8192M;

刪除表空間:
DROP TABLESPACE tablespacename INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS;

oracle 11G R2 RAC ASM 創(chuàng)建臨時(shí)表空間:
CREATE TEMPORARY TABLESPACE TBS_IMOOLLY_TEMP TEMPFILE '+DATA' SIZE 128M AUTOEXTEND ON NEXT 128M MAXSIZE 8192M;

創(chuàng)新互聯(lián)公司專業(yè)為企業(yè)提供柞水網(wǎng)站建設(shè)、柞水做網(wǎng)站、柞水網(wǎng)站設(shè)計(jì)、柞水網(wǎng)站制作等企業(yè)網(wǎng)站建設(shè)、網(wǎng)頁設(shè)計(jì)與制作、柞水企業(yè)網(wǎng)站模板建站服務(wù),10年柞水做網(wǎng)站經(jīng)驗(yàn),不只是建網(wǎng)站,更提供有價(jià)值的思路和整體網(wǎng)絡(luò)服務(wù)。


文章題目:oracle11grac配置
網(wǎng)站路徑:http://weahome.cn/article/jpsedd.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部