您的位置:首页 > 数据库 > Oracle

Oracle VM Server 安装

2010-02-02 14:15 453 查看
1.Oracle VM Server 安装
刻录完 Oracle VM Server 引导 CD 后,将其放入有足够 CPU 和 RAM(可以运行几个 Linux 实例而不必进行交换)的 PC 中。按照以下说明安装 Oracle VM:

出现标题为“Oracle VM Server”的引导屏幕后,按下 <ENTER> 键启动安装过程。
接下来,可以选择在安装前测试 CD 介质。此处应首选 OK,以免因 CD 受损或刻录问题而中断安装过程。
在语言选择窗口中选择 English,然后按下 OK 继续。接下来,选择键盘型号或接受默认值。
如果愿意,您可以访问分区对话框以删除旧分区。(它们可能包含旧数据,因此需谨慎操作)。我们希望能从自制设备中获取最佳性能,因此您将创建由三个磁盘组成的 RAID0 阵列。由于 GRUB 引导加载程序无法从 RAID0 引导,因此您必须创建专用的引导分区:
删除所有磁盘的所有分区
在 sda(第一个 SATA 磁盘)上使用 ext3 文件系统创建小型 256MB/引导分区。它将包含引导 VM Server
hypervisor 所需的内核和 initrd 镜像。在创建该分区时选择“Force to be primary
partition”,以确保它成为 x86 主分区。应将该分区命名为 sda1。
在 sda 上创建大小为 1GB 左右的交换分区。(注:默认情况下,Oracle VM dom0 配置为最多使用 512MB
内存,因此没有任务繁重的应用程序,没必要仅仅为了交换目的而使用几 GB 的存储空间。默认情况下,Dom0 仅负责执行实际 I/O
和处理硬件任务。但是,每个 domU [实际 VM] 都需要大小合适的单独交换空间,以满足自身需求。)
通过选中 Fill all available space 选项在 sda 上创建“软件 RAID 分区”;应将其命名为 sda3。
通过选中 Fill all available space 选项在 sdb 上创建“软件 RAID 分区”;应将其命名为 sdb1。
通过选中 Fill all available space 选项在 sdc 上创建“软件 RAID 分区”;应将其命名为 sdc1。
如果您还有更多磁盘,则可以在这些磁盘上创建 RAID 分区以进一步提高存储性能。
单击 RAID 按钮创建软件 RAID 阵列。选择 RAID0,并选择要加入此阵列的所有软件
RAID 分区(在此案例中为 sda3、sdb1 和 sdc1)。确保文件系统为“ext3”,挂载点为“/”。(注:默认 RAID0 条带为
256kB。使用 Oracle VM 安装程序创建软件 RAID
阵列时不能更改此设置,但如果愿意,您可以尝试切换到第二个虚拟控制台,方法如下:按下 Alt-F2 键,卸载旧阵列,并在安装前使用 mdadm
重新创建 RAID 阵列。请注意,我尚未亲自测试此操作!)
接受更改,并单击 OK 按钮保存分区更改。
在下一个屏幕上,您必须选择安装引导加载程序 (GRUB) 的位置。请将其放在 MBR(主引导记录)上。
现在,必须确定将哪个以太网接口用作管理接口。在本案例中使用“eth0”(第一个检测到的以太网 PCI 网卡)。选择网卡后,必须设置正确的 IP 地址:
仅选择“Enable IPv4 support”和“Activate on boot”选项。
配置 IP 地址(将其输入“IPv4”域中),在本案例中为“10.99.1.2”。不要忘记输入正确的前缀/网络掩码(例如,为“255.255.255.0”输入前缀“24”)
单击 OK 接受配置。
系统将要求您提供 IPv4 网关和 DNS 名称服务器,如“10.99.1.1”。
Hostname Configuration 中选择 manual 模式,然后为此服务器输入某个描述性的主机名,如“quadovm”。
配置完联网之后,系统将要求您提供:
时区(选择适合您的时区)。
Oracle VM Agent 口令 — 此设置非常重要;Oracle VM Manager 将用它来管理 Oracle VM Server(因此,请对此口令保密)。
root 口令 — 此设置也非常重要,它是 Oracle VM Server 的主要管理口令。

现在,您需要等待安装过程完成。CD 托盘应自动弹出。重新引导之后,将显示 Oracle VM Server。您可以 root 用户身份从以下位置登录到该服务器:

直接从控制台或 KVM
您的工作站(通过 SSH),使用以下命令:ssh -l root 10.99.1.2。(注:Oracle VM Server 仅为
Xen 的 dom0 域提供 512MB RAM,即使系统的 RAM
比该值多很多。这种做法非常正确,其余可用内存将用于客户虚拟机。可通过运行以下命令检查实际的可用内存:

[root@quadovm ~]# xm info | grep mem
total_memory :8182
free_memory :7537
[root@quadovm ~]#

2.Oracle VM Manager 安装
Oracle VM Manager 安装非常简单。使用 Oracle VM Manager 挂载的 ISO CD 启动安装程序:
[root@xeno ~]# cd /mnt/cdrom
[root@xeno cdrom]# sh runInstaller.sh
[..]
Welcome to Oracle VM Manager

Please enter the choice: [1|2]
Install Oracle VM Manager
Uninstall Oracle VM Manager

此处选择“1”,安装将继续进行。请确保提供大约 2GB 的可用空间,仅用于工作站上的 Oracle VM Manager。安装非常简单:
Starting Oracle VM Manager  installation ...
Checking the supported platforms ... Done
Checking the prerequisite packages are installed ... Done
Checking the available disk space ... Done
Installing the oracle-xe-univ package (rpm) ... Done
Oracle Database 10g Express Edition Configuration
-------------------------------------------------
This will configure on-boot properties of Oracle Database 10g  Express
Edition.  The following  questions will determine whether the database should
be starting upon system boot, the ports it will use, and the  passwords that
will be used for database accounts.  Press <Enter> to accept the defaults.
Ctrl-C will abort.

Specify the HTTP port that will be used for Oracle Application  Express [8080]:
We chose the default tomcat 8080 port, but you can always pick  any other port in this case.
Specify a port that will be used for the database listener  [1521]: <ENTER>
Specify a password to be used for database accounts.  Note that the same
password will be used for SYS and SYSTEM.  Oracle recommends the use of
different passwords for each database account.  This can be done after
initial configuration:
Confirm the password:
Here we pick an unbreakable password.
Do you want Oracle Database 10g Express Edition to be started on  boot (y/n) [y]: <ENTER>
Starting Oracle Net Listener...Done
Configuring Database...Done
Starting Oracle Database 10g Express Edition Instance...Done
Installation Completed Successfully.
To access the Database Home Page go to  http://127.0.0.1:8080/apex 
Installing the ovs-manager package (rpm) ... Done
Set default schema to 'OVS'.
Please enter the password for OVS: <ENTER PASSWORD  HERE>
Please re-enter the password for OVS: <ENTER PASSWORD  HERE>
Again, we pick a secret password for the VM Manager schema.
Creating the Oracle VM Manager database schema ...Done
Installing the oc4j package (rpm) ... Done
The default password for oc4jadmin is oracle.
You can change the default password after the installation  completes.
To access the OC4J Home Page and change the password go to  http://127.0.0.1:8888/em Starting OC4J ... Done
OC4J logfiles can be found in /var/log/ovm-manager/oc4j.log.
Deploying Oracle VM Manager application to OC4J container.
Please enter the password for oc4jadmin: oracle
Please enter the Oracle Net Listener Port , default is [1521] ? <ENTER>
Creating connection pool ...
Deploying Oracle VM Manager application to OC4J container.
Please enter the password for oc4jadmin:
Please enter the Oracle Net Listener Port , default is [1521] ? <ENTER>
Creating connection pool ... Done
Creating data source ... Done
Deploying application ... Done
Deploying application help ... Done
Configuring Oracle VM Manager  DataCollector ... Done
Configuring SMTP server ...
Please enter the outgoing mail server (SMTP) hostname: localhost
Setting the SMTP hostname server to localhost ...
Done
Configuring e-mail address for Oracle VM Manager account  'admin'...
Please enter an e-mail address for the admin account : localuser

将“localuser”替换为您的本地用户名,以便于邮件传递。按照指示转至 http://127.0.0.1:8888/OVS 访问 Oracle VM Manager。重新引导后,可通过
/etc/init.d/oracle-xe 和 /etc/init.d/oc4j 脚本启动和停止 Oracle VM Manager。
3.设置虚拟机
首先,必须在 Oracle VM Manager 中将我们的 Oracle VM Server (quadvm) 注册为新“spool”(包含一个或多个物理服务器的逻辑自主区域)的主服务器。
转至 Servers Pools 选项卡,然后转至 Create Server Pool,输入有关 quadvm Oracle VM Server 的信息(使其成为 Server Pool Master、Virtual Machine Server 以及 Utility Master),并为 spool 选择一个直观的名称,如 spool1。




图 3

在下一个屏幕上,选择“admin”用户。




图 4

检查所有内容,并确认创建新 spool。




图 5




图 6

创建虚拟机
如前所述,虚拟化允许您通过复制模板镜像来克隆系统。下面是操作方法。
上载模板
首先,需要将 VM 模板和 OpenFiler 传输到 VM Server 上:
[vnull@xeno OracleVM]$ scp -r  OVM_EL5U1_X86_64_PVM_4GB root@10.99.1.2:/root/
root@10.99.1.2's password:
vm.cfg                                                       100%  318      0.3KB/s   00:00
system.img                                                   100%  6144MB   8.8MB/s   11:41
README                                                       100%  158      0.2KB/s   00:00
[vnull@xeno OracleVM]$ cd ~/ISO
[vnull@xeno ISO]$ scp openfiler-2.2-x86_64.img.gz  root@10.99.1.2:/root
root@10.99.1.2's password:
openfiler-2.2-x86_64.img.gz                                  100%   175MB  10.9MB/s   00:16
[vnull@xeno ISO]$
然后,需要将 VM 模板移到特殊目录,稍后 VM Server 子代理会在该目录中自动检测到此模板:
[root@quadovm ~]# ls -al  OVM_EL5U1_X86_64_PVM_4GB/
total 6297632
drwxr-xr-x 2 root root       4096 May  6 14:04 .
drwxr-x--- 4 root root       4096 May  6 13:52 ..
-rw-r--r-- 1 root root        158 May  6 14:04 README
-rwxr-xr-x 1 root root 6442450945 May  6 14:04 system.img
-rw-r--r-- 1 root root        318 May  6 13:52 vm.cfg
[root@quadovm ~]# mv OVM_EL5U1_X86_64_PVM_4GB /OVS/seed_pool/
[root@quadovm ~]#
转至 Resources,按下 Import。选择 Internal Virtual Machine Template




图 7

描述模板详细信息(应自动检测到模板名称 OVM_EL5U1_X86_64_PVM_4GB,如果未检测到,请注销并重新登录):




图 8

确认导入操作:




图 9

应该能看到模板,现在只需选择该模板并单击 Approve 按钮。



内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  Oracle Server VM