本教程将向您介绍如何安装和配置 Oracle 安全备份 (OSB) 10.2,以用于测试和培训目的(不用于生产)。完成本教程后才可学习所有其他 Oracle 安全备份 10.2 教程。
| 1. |
以 root 用户身份执行以下命令,创建 OSB 主目录:
# mkdir -p /usr/local/oracle/backup
|
| 2. |
浏览至您的 OSB 主目录:
# cd /usr/local/oracle/backup
注:在以下步骤中,您要停留在该目录中,这对于完成正确设置很重要。
|
| 3. |
确保提供了解压缩实用程序:
# ln -s /bin/gunzip /bin/uncompress
|
| 4. |
在您的 OSB 主目录中,以 root 用户身份启动 Oracle 安全备份的安装。
# /stage/setup
Welcome to Oracle's setup program for Oracle Secure Backup. This
program loads Oracle Secure Backup software from the CD-ROM to a
filesystem directory of your choosing.
This CD-ROM contains Oracle Secure Backup version 10.2.0.2.0_linux32.
Please wait a moment while I learn about this host... done.
- - - - - - - - - - - - - - - - - - - - - - - - - - -
1. linux32
administrative server, media server, client
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Loading Oracle Secure Backup installation tools... done.
Using your previous obparameters file. The new file shipped with this
distribution of Oracle Secure Backup is called install/obparameters.new.
Loading linux32 administrative server, media server, client... done.
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Loading of Oracle Secure Backup software from CD-ROM is complete.
You may unmount and remove the CD-ROM.
Would you like to continue Oracle Secure Backup installation with
'installob' now? (The Oracle Secure Backup Installation Guide
contains complete information about installob.)
Please answer 'yes' or 'no' [yes]:
|
| 5. |
输入 yes 继续您的安装:
Please answer 'yes' or 'no' [yes]: yes
- - - - - - - - - - - - - - - - - - - - - - - - - - -
Welcome to installob, Oracle Secure Backup's UNIX installation program.
It installs Oracle Secure Backup onto one or more UNIX or Linux systems
on your network. (Install Oracle Secure Backup for Windows using the
CD-ROM from which you loaded this software.)
For most questions, a default answer appears enclosed in square brackets.
Press Enter to select this answer.
Please wait a few seconds while I learn about this machine... done.
Have you already reviewed and customized install/obparameters for your
Oracle Secure Backup installation [yes]?
|
| 6. |
输入 no,因为您还没有自定义任何参数:
Have you already reviewed and customized install/obparameters for your
Oracle Secure Backup installation [yes]? no
Would you like to do this now [yes]?
|
| 7. |
再次输入 no,因为您执行的是默认安装。
Would you like to do this now [yes]? no
- - - - - - - - - - - - - - - - - - - - - - - - - - - Oracle Secure Backup is not yet installed on this machine.
Oracle Secure Backup's Web server has been loaded, but is not yet configured.
You can install this host one of three ways:
(a) administrative server
(the host will also be able to act as a media server or client)
(b) media server
(the host will also be able to act as a client)
(c) client
If you are not sure which way to install, please refer to the Oracle
Secure Backup Installation Guide. (a,b or c) [a]?
|
| 8. |
首先,您要安装管理服务器。输入 a 完成这一步:
If you are not sure which way to install, please refer to the Oracle
Secure Backup Installation Guide. (a,b or c) [a]? a
Beginning the installation. This will take just a minute and will produce
several lines of informational output.
Installing Oracle Secure Backup on edrsr4p1 (Linux version 2.6.9-55.0.0.0.2.ELsmp)
You must now enter a password for the Oracle Secure Backup encryption
key store. Oracle suggests you choose a password of at least 8
characters in length, containing a mixture of alphabetic and numeric
characters.
Please enter the key store password:
|
| 9. |
选择适合于您的环境的口令并记住它们。输入您选择的口令两次,作为密钥存储口令并用于验证:
Please enter the key store password: keystore_password
Re-type password for verification: keystore_password
You must now enter a password for the Oracle Secure Backup 'admin' user. Oracle suggests you choose a password of at least 8 characters in length, containing a mixture of alphabetic and numeric characters.
Please enter the admin password:
|
| 10. |
输入您选择的口令两次,作为 admin 口令并用于验证:
Please enter the admin password: admin_password
Re-type password for verification: admin_password
You should now enter an email address for the Oracle Secure Backup 'admin' user. Oracle Secure Backup uses this email address to send job summary reports and to notify the user when a job requires input. If you leave this blank, you can set it later using the obtool's 'chuser' command.
Please enter the admin email address:
|
| 11. |
不输入任何内容,按 Enter 键,因为本教程不使用电子邮件通知。安装继续:
generating links for admin installation with Web server
updating /etc/ld.so.conf
checking Oracle Secure Backup's configuration file (/etc/obconfig)
setting Oracle Secure Backup directory to /usr/local/oracle/backup in /etc/obconfig
setting local database directory to /usr/etc/ob in /etc/obconfig
setting temp directory to /usr/tmp in /etc/obconfig
setting administrative directory to /usr/local/oracle/backup/admin in /etc/obconfig
protecting the Oracle Secure Backup directory
creating /etc/rc.d/init.d/observiced
activating observiced via chkconfig
initializing the administrative domain
****************************** N O T E ******************************
On Linux systems Oracle recommends that you answer no to the next two
questions. The preferred mode of operation on Linux systems is to use
the /dev/sg devices for attach points as described in the 'ReadMe'
and in the 'Installation and Configuration Guide'.
Is host01 connected to any tape libraries that you'd like to use with
Oracle Secure Backup [no]?
|
| 12. |
在下面的一个步骤中,您将连接磁带库和磁带驱动器,因此请输入 no 两次:
Is host01 connected to any tape libraries that you'd like to use with
Oracle Secure Backup [no]? no
Is host01 connected to any tape drives that you'd like to use with
Oracle Secure Backup [no]? no
Installation summary:
Installation Host OS Driver OS Move Reboot
Mode Name Name Installed? Required? Required?
admin host01 Linux no no no
Oracle Secure Backup is now ready for your use.
# |
| 13. |
以 root 用户身份注销:
# exit
$
|
| 1. |
以 oracle OS 用户身份执行以下命令,浏览至您的工作目录 (/home/oracle):
$ cd /home/oracle |
| 2. |
要确认您拥有必需的 OBE 配置文件,输入:
$ ls c*
config1_in.sh config1_out.sh config1.sh config2.txt
|
| 3. |
要替换 config1_out.sh 文件中的主机名称,输入:
$ ./config1.sh
将显示您的主机名。本示例使用“host01.example.com”。
host01.example.com
|
| 4. |
要将媒体服务器角色分配给您的主机并配置用于 OBE 培训环境的设备,执行 config1_out.sh 文件,并为各设备提供口令:
$ ./config1_out.sh
Password: admin_password
Password: admin_password
Password: admin_password
Password: admin_password
Password: admin_password
Password: admin_password
Password: admin_password
Password: admin_password
Password: admin_password
注:本教程生成虚拟的测试设备,这些设备使用磁盘空间(在 u01 目录下),但模拟磁带设备。在生产环境中,这些 OSB 测试设备不受支持,尽管 Oracle 安全备份支持众多非 Oracle 虚拟磁带设备。
注释 2:如果您在执行该文件的过程中出现错误或输错了口令,建议以 root 用户身份登录,首先输入以下命令删除磁盘目录:
$ su - root
Password: root_password
# cd /u01
# rm -rf vli*
# rm -rf vd*
#
注释 2(续):再次开始本教程前,按照在 Linux 或 UNIX 上安装 Oracle 安全备份 指南的“在 Linux 或 UNIX 上卸载 Oracle 安全备份”部分中的步骤卸载 Oracle 安全备份。
|
| 5. |
要登录 obtool,输入:
$ obtool
Oracle Secure Backup 10.2.0.2.0
login: admin
Password: admin_password
ob>
注:如果您没有收到登录和口令提示,则您的证书仍旧有效。阅读这一任务末尾的说明,了解更多详细信息。
|
| 6. |
要查看您的主机的所有角色,输入:
ob> lshost
host01.example.com admin,mediaserver,client (via OB) in service
ob>
|
| 7. |
要查看刚刚创建的设备,输入:
ob> lsdev
library vlib in service
drive 1 vdte1 in service
drive 2 vdte2 in service
drive 3 vdte3 in service
drive 4 vdte4 in service
library vlib2 in service
drive 1 vdrive1 in service
drive 2 vdrive2 in service
ob>
|
| 8. |
要将卷插入磁带库中,执行以下命令(如果您不想输入命令,执行 < /<您的工作目录>/config2.txt 脚本)。
ob> insertvol -L vlib -c 250 unlabeled 1-32
ob> insertvol -L vlib2 -c 250 unlabeled 1-14
或:
ob> < /home/oracle/config2.txt
ob> # Only for test and training, not for production
ob> # OSB script, run as admin user
ob>
ob> insertvol -L vlib -c 250 unlabeled 1-32
ob> insertvol -L vlib2 -c 250 unlabeled 1-14ob>
ob>
|
| 9. |
要列出默认的媒体系列,输入:
ob> lsmf --long
OSB-CATALOG-MF:
Write window: 7 days
Keep volume set: 14 days
Appendable: yes
Volume ID used: unique to this media family
Comment: OSB catalog backup media family
RMAN-DEFAULT:
Keep volume set: content manages reuse
Appendable: yes
Volume ID used: unique to this media family
Comment: Default RMAN backup media family
ob>
注:在本 OBE 后面的一项任务中,您将创建其他媒体系列。
|
| 10. |
要重命名主机和添加新 IP 地址,输入:
renhost --nq host01.example.com host01 chhost --addip host01.example.com host01
|
| 11. |
要终止您的 obtool 会话,输入:
logout
注:logout 命令终止 obtool 会话并销毁登录令牌,因此在您下一次启动 obtool 会话时将提示您提供证书,可能会出现以下消息“Warning:auto-login failed - login token has expired”。
如果您使用 exit 或 quit 命令终止 obtool 会话,则会按 Webtool > Configure > Defaults and Policies > Security> Login 令牌持续时间保留登录令牌:15 分钟(默认值)。
|
| 1. |
要访问企业管理器数据库控制台,您需要知道相应的 URL 和运行的工具。要以 oracle OS 用户身份进行验证,在终端窗口中输入:
$ emctl status dbconsole
Oracle Enterprise Manager 11g Database Control Release 11.1.0.6.0
Copyright (c) 1996, 2007 Oracle Corporation. All rights reserved.
https://host01.example.com:1158/em/console/aboutApplication
Oracle Enterprise Manager 11g is running.
------------------------------------------------------------------
Logs are generated in directory /u01/app/oracle/product/11.1.0/db_1/host01.example.com_orcl/sysman/log
注:文本使用粗体并标有颜色是为了便于识别。
|
| 2. |
打开您的 Web 浏览器,按以下格式输入您的 URL:
https://<主机>:<端口>/em
|
| 3. |
在 Enterprise Manager Login 页面上,输入 SYS 作为 User Name,输入您的 SYS_password 并选择 Connect As SYSDBA。然后单击 Login。
|
| 4. |
在 Oracle 数据库 Home 页面上,单击 Availability 选项卡。
|
| 5. |
在 Availability 页面上,单击 Oracle Secure Backup Device and Media。
|
| 6. |
首次执行这一任务时,将打开管理服务器的“Add Administrative Server”页面。输入以下值,然后单击 OK:
Oracle Secure Backup Home:/usr/local/oracle/backup Username:admin Password:admin_password
|
| 7. |
输入 oracle 作为 Username,输入您的 host_password,选择“Save as Preferred Credential”,然后单击 OK 按钮。
|
| 8. |
Oracle Secure Backup Device and Media:Administrative Server 页面将显示,其中包括您刚注册的管理服务器。
|
| 1. |
在 Oracle Secure Backup Device and Media:Administrative Server 页面上,从 Devices 部分的 View 下拉列表中选择 All Devices。
|
| 2. |
您的库设备将显示在 Devices 部分中。
|
| 3. |
单击 Name 列中的每个加号图标以展开库。
将显示您所有的设备。
|
| 4. |
要测试您的设备,单击 Oracle Secure Backup Device and Media: Administrative Server 页面的 Resources 部分中 Devices 的 Manage 链接。
|
| 5. |
在 Devices 页面上,从 Actions 下拉列表中选择 Verify Connectivity。
|
| 6. |
在 Devices 页面上,选择 vlib 库,并单击 Actions 下拉列表后的 Go 按钮。
|
| 7. |
您应当会收到类似以下所示的成功消息。
|
| 8. |
要确认 vlib2 库的连接性,选择该库并单击 Verify Connectivity Actions 后的 Go 按钮。
|
| 9. |
您应当会收到类似以下所示的成功消息。
|
| 10. |
单击 Database 选项卡,准备下一个任务。
|
| 1. |
在企业管理器的 Availability 页面上,右键单击 Oracle Secure Backup 部分中的 File System Backup and Restore,并选择(如果您的浏览器中提供)Open Link in a New Tab。
|
| 2. |
在 Oracle Secure Backup Login 页面上,输入 admin 作为 User Name,并输入您的 admin_password,然后单击 Login。
|
| 3. |
在 OSB Home 页面上,单击 Configure 选项卡。
|
| 4. |
在 Configure 页面上,单击 Basic 部分中的 Users。
|
| 5. |
在 Configure:Users 页面中,单击 Add 按钮。
|
| 6. |
在 Configure:Users > New Users 页面上,输入或选择以下值,然后单击 Apply:
User:oracle Password:host_password User class:oracle UNIX name:oracle UNIX group:dba NDMP server user:no
您将收到一条成功消息。
|
| 7. |
在 Configure:Users > oracle 页面上,单击 Preauthorized Access。
|
| 8. |
在 Configure:Users > oracle > Preauthorized Access 页面上,输入或选择以下值,然后单击 Add:
Hosts:all hosts OS username:* Windows domain name:* Attributes: rman
|
| 9. |
您应当会收到类似以下所示的成功消息:
|
| 10. |
单击 Logout。
|
| 1. |
在您的 Web 浏览器中,在 Enterprise Manager Login 页面上,输入 SYS 作为 User Name,输入您的 SYS_password,并选择 Connect As SYSDBA。然后单击 Login。(要了解详细的说明,参见向企业管理器注册您的管理服务器中的步骤 1、2 和 3。)
|
| 2. |
在 EM Home 页面上,单击 Availability 选项卡。
|
| 3. |
在 Availability 页面上,单击 Backup/Recovery 部分中的 Recovery Settings。
|
| 4. |
在 Recovery Settings 页面上,选择 Media Recovery 部分中的 ARCHIVELOG Mode,然后单击 Apply。
|
| 5. |
在 Confirmation 页面上,单击 Yes 重启数据库。
|
| 1. |
在 Restart Database:Specify Host and Target Database Credentials 页面上,输入并确认以下值,然后单击 OK:
对于 Host Credentials Username:oracle Password:host_password
对于 Database Credentials: Username:sys Password:sys_password Connect As:SYSDBA 选中:Save as Preferred Credential
|
| 2. |
在 Restart Database:Confirmation 页面上,单击 Yes。
|
| 3. |
如果您刷新或重新查询时代理连接断开,您可能收到下面的错误。该错误将自动自行解决。单击 OK。
Restart Database:Activity Information 页面将及时显示。
单击 Refresh 直至 EM Home 页面显示。
注:如果 Enterprise Manager Login 页面显示,输入 SYS 作为 User Name,输入您的 SYS_password 并选择 Connect As SYSDBA。然后单击 Login。
|
| 4. |
确认数据库正常运行。
|
| 1. |
要直接(而不是从 EM)启动 OSB Web 工具,打开您的 web 浏览器,按以下格式输入您的 URL:
https://<主机>/index.php
Oracle 安全备份 Web 界面显示 Oracle Secure Backup Login 页面,并将 URL 更改如下:
|
| 2. |
在 Oracle Secure Backup Login 页面上,输入 admin 作为 User Name,并输入您的 admin_password,然后单击 Login。
|
| 3. |
在 OSB Home 页面上,单击右上角的 Preferences。
|
| 4. |
针对 Extended command output 选择 On 设置,然后单击 Apply。
当您单击 Apply 时,页面不会改变。您可以在后面的第 7 步看到此更改的结果。
|
| 5. |
要查看和编辑现有的媒体系列以及创建新的媒体系列,单击 Configure 选项卡。
|
| 6. |
单击 Media Families。
|
| 7. |
在 Configure:Media Families 页面上,首先查看现有的默认媒体系列,然后单击 Add 按钮创建新的媒体系列。
|
| 8. |
在 Configure:Media Families > New Media Families 页面上,输入和确认以下值,然后单击 Apply:
Media Family:OFFSITE_7Y Volume ID used:Unique to this media family Volume expiration:Time Managed Keep volume set:7 years Appendable:yes Comment:Store for 7 years offsite - for compliance with XYZ law.
您将收到一条成功消息。
|
| 9. |
滚动至 Configure:Media Families > OFFSITE_7Y 页面的底部,查看 Extended Command Output。
然后单击 OK 按钮。
|
| 10. |
Configure:Media Families 页面将显示,其中包括您新创建的 OFFSITE_7Y 媒体系列。
|
| 11. |
在 Configure:Media Families 页面上,单击 Add 按钮创建其他媒体系列。
|
| 12. |
在 Configure:Media Families > New Media Families 页面上,输入和确认以下值,然后单击 Apply:
Media Family:offsite_test Volume ID used:Unique to this media family Volume expiration:Time Managed Keep volume set:10 minutes Appendable:yes Comment:Edit test values later.
|
| 13. |
您将收到一条成功消息。单击 OK。
|
| 14. |
在 Configure:Media Families 页面上,查看所有可用的媒体系列,默认的媒体系列和您新创建的媒体系列。
|
| 1. |
在您的 Web 浏览器中,在 Enterprise Manager Login 页面上,输入 SYS 作为 User Name,输入您的 SYS_password,并选择 Connect As SYSDBA。然后单击 Login。(要了解详细的说明,参见向企业管理器注册您的管理服务器中的步骤 1、2 和 3。)
|
| 2. |
在企业管理器中,浏览至 Availabity > Backup Settings(在 Backup/Recovery Setup 部分中)。
|
| 3. |
要提供和保存磁带设置,输入以下值,然后单击 OK:
Tape Drives:1 Username:oracle Password:host_password Save as Preferred Credential(选中)
|
| 4. |
要创建数据库存储选择器,重新进入 Backup Settings 页面,然后单击 Backup Settings Device 页面上 Oracle Secure Backup 部分中的 Configure。
|
| 5. |
在 Administrative Server Login 页面上,输入或确认以下值,然后单击 OK:
Administrative Server:Your_host Username:oracle Password:host_password Save as Preferred Credential(选中)
|
| 6. |
在 Backup Storage Selectors 页面上,单击 Add。
|
| 7. |
在 Add Backup Storage Selector 页面上,选择以下值,然后单击 OK:
Database Backup Types:Archive Logs、Auto Backup、Full 和 Incremental Media Family:RMAN-DEFAULT
|
| 8. |
您应当在 Backup Storage Selectors 页面上收到一条成功消息。单击 Return。
|
| 9. |
在 Backup Settings Device 页面上,输入或确认以下值,然后单击 Test Tape Backup:
Tape Drives:1 Tape Backup Type:Backup Set Username:oracle Password:host_password
根据您的系统资源的情况,Processing: Test Tape Backup 页面将显示一段时间。
|
| 10. |
在 Backup Settings Device 页面上,查看成功消息,然后注销。
|