跳轉到內容

RAC 攻擊 - Oracle 叢集資料庫實戰/RAC 攻擊 12c/Linux 安裝後無網路

來自華夏公益教科書,開放的教科書,為開放的世界


  1. 要連線到新建立的虛擬機器,請在 Putty 中為名為 collabn1 的新 VM 建立一個連線,其 IP 地址192.168.78.51
    • 可選地,為 collabn2 建立另一個連線,其 IP 地址192.168.78.52,該連線將在稍後作為 collabn1 的克隆建立。

    Putty connection screen

  2. 透過單擊 開啟 開啟 collabn1 連線。
    • 安全警報 對話方塊中單擊
  3. Putty security alert
  4. 以...身份登入: 提示符處輸入 root,在 密碼: 提示符處輸入 racattack
  5. Putty connected
  6. 關閉並停用防火牆 IPTables

  7. [root@collabn1 ~]# service iptables stop
    iptables: Flushing firewall rules:                         [  OK  ]
    iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
    iptables: Unloading modules:                               [  OK  ]
    
    [root@collabn1 ~]# chkconfig iptables off
    
    [root@collabn1 ~]# chkconfig --list iptables
    iptables        0:off   1:off   2:off   3:off   4:off   5:off   6:off
    
  8. 停用 SELinux。開啟配置檔案並將 SELINUX 變數從 enforcing 更改為 disabled
  9. [root@collabn1 ~]# vim /etc/selinux/config # 此檔案控制系統上 SELinux 的狀態。 # SELINUX= 可以取以下三個值之一: # enforcing - 強制執行 SELinux 安全策略。 # permissive - SELinux 列印警告而不是強制執行。 # disabled - 不載入 SELinux 策略。 SELINUX=disabled # SELINUXTYPE= 可以取以下兩個值之一: # targeted - 保護目標程序, # mls - 多級安全保護。 SELINUXTYPE=targeted
  10. 驗證所有網路介面是否已啟動。
  11. [root@collabn1 ~]# ip l 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 08:00:27:4f:8a:0b brd ff:ff:ff:ff:ff:ff 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 08:00:27:99:7e:95 brd ff:ff:ff:ff:ff:ff 4: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 08:00:27:e2:63:7f brd ff:ff:ff:ff:ff:ff
  12. 新增 DVD 作為倉庫。
  13. 轉到 VBOX 選單 => 儲存 => 將 DVD 裝置新增到伺服器 裝置 -> CD/DVD 裝置 -> Oracle_Linux_6_4.iso

    執行以下命令

    mkdir /media/cdrom
    mount /dev/cdrom /media/cdrom/
    cd /etc/yum.repos.d
    mkdir /tmp/old.yum.repos.d
    mv * /tmp/old.yum.repos.d
    
    cat <<EOF > ol64.repo
    [OL64]
    name=Oracle Linux 6.4 x86_64
    baseurl=file:///media//cdrom
    gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY
    gpgcheck=1
    enabled=1
    EOF
    
  14. 安裝資料庫預安裝包 oracle-rdbms-server-11gR2-preinstall
  15. 此包安裝 Oracle 11g 的所有 包要求(但也可以用於 12c),配置 核心引數,建立 oracle 使用者和組 以及設定使用者 限制
    [root@collabn1 ~]# yum install -y oracle-rdbms-server-11gR2-preinstall
    ....
    Transaction Summary
    ========================================================================
    Install      21 Package(s)
    Upgrade       2 Package(s)
    
    Total download size: 43 M
    
    ....
    
    Installed:
      oracle-rdbms-server-11gR2-preinstall.x86_64 0:1.0-8.el6
    
    ....
    
    Complete!
    
  16. 安裝將用於安裝和管理伺服器的其他 RPM。
  17. [root@collabn1 ~]# rpm -ivh /media/cdrom/Packages/kernel-uek-devel-$(uname -r).rpm
    [root@collabn1 ~]# yum install -y tigervnc-server.x86_64 xclock man parted.x86_64 unzip.x86_64 xterm lsof bind  xorg-x11-twm oracleasm-support
    Install      12 Package(s)
    .... 
    Total download size: 22 M
    ....
    Complete!
    
  18. 解除安裝 NTP
  19. [root@collabn1 ~]# yum remove -y ntp .... 已移除:ntp.x86_64 0:4.2.4p8-3.el6 .... 完成! [root@collabn1 ~]#
  20. 在繼續執行後續步驟之前,解除安裝 DVD。
  21. [root@collabn1 ~]# umount /media/cdrom


華夏公益教科書