Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Terry Elliott
IBM Oracle International Competency Center
April 2015
In this paper IBM Wave is used to clone a Linux system on z/VM followed by using an IBM Wave
script to install an Oracle Database. The prerequisites for an Oracle Database 12c installation are
added to this newly cloned Linux environment. After the prerequisites are done, the Linux system is
shutdown (deactivated in IBM Wave terms). This deactivated Linux environment that has the Oracle
prerequisites is then the basis for the Linux clones that are used to install the Oracle Database. This
two-step clone process is used so that no modifications need to be made to the original Linux image
and also leave a Linux image available that contains the prerequisites for an Oracle Database
installation. The final step is using a Wave script to do a silent Oracle Database installation on the
Linux clone.
Introduction
The discussion that follows describes details of the steps that were done to install an Oracle Database in
silent mode on Linux using an IBM Wave script. The method uses Oracle Automatic Storage
Management (ASM) as storage for the Oracle Database. To use ASM the Oracle Grid Infrastructure for a
standalone server which includes both Oracle Restart and Oracle ASM is installed into an Oracle Restart
home. After this is done the Oracle Database binaries are installed into an Oracle Database home. Once
these two steps have been completed, the Oracle Database Configuration Assistant (DBCA) is used to
build an Oracle Database 12c multitenant database. The majority of the effort involved is preparing the
Linux image that has all the prerequisites required for the Oracle Database installation. Note that this is a
one-time effort and the Linux image will remain available and it can be cloned in minutes for subsequent
Oracle Database installs. The key is that the Linux image used as the source for the clones will have all
the prerequisites installed.
1
IBM Wave configuration
For this paper an IBM Wave system is available and is accessible with a browser at the site:
wavesrv.cmo-demo. The IBM Wave configuration has a Red Hat 6.5 Linux prototype already setup at this
site. Some of the initial wave screens will be shown in this section.
This first IBM Wave screen is displayed below.
The last two selections on the initial wave screen provide access to IBM Wave online documentation. The
second selection provides a method to test the connection to target z/VM systems.
For this paper “Launch IBM Wave v1.1.0” is selected to access the IBM Wave login screen shown below.
2
Figure 2: IBM Wave login
There are several user settings and preferences available in IBM Wave and they are described in the IBM
Wave documentation. References to the documentation are in the Resources section of this paper.
For the login above, “waveadm” is an IBM Wave super-user. After logging on, the Wave screen shown
below is presented.
3
Figure 3: Initial IBM Wave graphical view
This is an IBM Wave graphical view for a single z/VM image. This is a very busy screen, but there is an
excellent description of the details on this screen on page 62 in the IBM Redbook “IBM Wave for z/VM
Installation, Implementation, and Exploitation”. The Redbook reference is in the Resources section.
The red and yellow on the screen above are IBM Wave graphical threshold indicators of things that
probably deserve a closer look. The red and yellow indicators don’t interfere with what is being done in
this paper, but for the curious, these things are:
1. There are no FCP devices available to z/VM.
2. The spool is 95% full.
3. Wave can’t determine the default NIC for one of the networks. IBM Wave has “Threshold
parameters” that can be set at red and yellow levels to indicate when resources need
attention.
One of the tabs in the screen above is “Prototypes”. The IBM Wave documentation details how to create
a Linux prototype. Selecting the prototypes tab will allow access to the Linux prototype that will be cloned
in the next section.
4
IBM Wave RH65GOLD prototype
From the discussion above, the prototype tab is selected and it discloses the RH65GOLD prototype that
will be cloned to create a new Linux environment. The screen below is only part of the actual IBM Wave
screen. This has been done so that the relevant parts of the screen can be enlarged to be readable in this
document. A right click has already been done on the Linux image to get the popup to display.
The z/VM system has a guest LAN that is RACF® protected. To get the clone process to be successful
the following RACF commands are issued before attempting the clone of RH65GOLD. The name of the
new Linux clone is “cloneora”.
rac au (cloneora) pass(xxxxxx) owner(ibmuser) dfltgrp(sys1) name(clone)
Ready; T=0.01/0.01 20:06:38
rac pe system.lanvmc1 class(vmlan) id(cloneora) access(alter)
Ready; T=0.01/0.01 20:07:34
Ready(00108); T=0.01/0.01 20:07:48
rac du (cloneora)
Ready; T=0.01/0.01 20:08:09
The z/VM system used here had a guest LAN setup, however, the preferred network as stated in the IBM
redbook “Advanced Networking Concepts Applied Using Linux on IBM System z” is the virtual switch.
5
The three RACF commands above create a RACF user, permit the user access to the z/VM guest LAN,
and then delete the user. Deleting the user doesn’t remove the ID from access to the guest LAN, but it
allows the user to be created by dirmaint when the IBM Wave clone process is done.
After running the RACF commands, clicking “Clone From This Prototype” as in Figure 4 above results in
the initial clone screen in Figure 5 below.
The new clone name, password, and storage group were entered on the screen and then “Update” was
clicked to save the information. The “Optional Configuration” tab was also used in the bottom part of the
screen to set the domain name and specify that the ssh keys be regenerated. Once this had been done,
“Go” was clicked on the bottom right of the screen. This starts the cloning process. When the “Cancel”
button changes to “Close” it is clicked to return to the prototype screen.
On the current configuration it takes approximately three (3) minutes for IBM Wave to create the Linux
system CLONEORA.
6
Returning to the IBM Wave z/VM User Groups display, inserting cloneora next to the “tag” button, and
clicking the tag button results in the cloneora linux guest being highlighted. Further, a right click on the
cloneora icon brings up an action list for cloneora.
After the right click on the picture, clicking “Activate” and doing additional steps of selecting “Go” and “OK”
CLONEORA is booted. As soon as it boots the Linux system CLONEORA is available at 192.168.150.7.
This is the IP address from Figure 5 above. The IBM Wave graphic for CLONEORA now looks like this.
7
Update CLONEORA Linux image
The next several steps will install the prerequisites on CLONEORA that are required for an Oracle
Database install. However, the Oracle Database will not be installed on CLONEORA. Once CLONEORA
has all the prerequisites it will be deactivated and used to create WAVEORAX clones. Then the IBM
Wave script that is installed with CLONEORA will be executed to install Oracle Restart on WAVEORAX.
The IBM Wave script that does the install is created as a global script so it can be executed by any user.
There is nothing unique about the WAVEORAX name other than that is the naming scheme adopted in
this paper. The database installation described later in this paper will be done on WAVEORA1.
This paper does not go into a lot of detail about the Oracle Database prerequisites, but documents
detailing the Oracle Database prerequisites can be found at: http://docs.oracle.com and at:
http://www.redbooks.ibm.com with specific references listed in the Resources section.
8
Figure 8: First step in adding an ext4 filesystem
Right click on CLONEORA then click more actions and click Manage Storage to get to the screen below.
9
Figure 10: New filesystem configuration
After clicking Go and OK and waiting a couple of minutes for the 12GB to be formatted and mounted,
there is a 12GB ext4 filesystem mounted at /oratmp (wave created the mount point) and an entry has
been put into /etc/fstab.
The next step is to setup a 10GB swapfile at /oratmp. The IBM Wave User Preferences under the User
Tasks pull down in Figure 3 on page 4 have been updated so that cloneora can be accessed with PuTTY
directly from IBM Wave. Similar to what was done previously, but this time click on “Access” after right
clicking on cloneora, and the SSH Access appears as one of the options.
10
Figure 11: Access to PuTTY from IBM Wave
From here click on “SSH Access” and following screen appears to allow access to cloneora.
11
10+0 records in
10+0 records out
10737418240 bytes (11 GB) copied, 224.491 s, 47.8 MB/s
[root@CLONEORA oratmp]# mkswap /oratmp/swapfile
mkswap: /oratmp/swapfile: warning: don't erase bootbits sectors
on whole disk. Use -f to force.
Setting up swapspace version 1, size = 10485756 KiB
no label, UUID=5ca0ed2f-7df9-4828-9df9-dc048a10c520
[root@CLONEORA oratmp]# swapon /oratmp/swapfile
[root@CLONEORA oratmp]# swapon -s
Filename Type Size Used Priority
/dev/dasda1 partition 079896 0 -1
/oratmp/swapfile file 10485752 0 -2
The swapfile will survive reboots with the entry, “/sbin/swapon /oratmp/swapfile”, added to
/etc/rc.d/rc.local.
[root@CLONEORA ~]# cat /etc/rc.d/rc.local
#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
/usr/wave/waveload
/sbin/swapon /oratmp/swapfile
No missing RPMs are listed so CLONEORA has the prerequisites RPMs to install an Oracle Database.
12
NFS mount the Oracle Database 12c libraries
The Oracle Database libraries are NFS mounted on CLONEORA. The libraries will not be used directly by
CLONEORA, but the specifications will be in WAVEORA1 when it is created as a clone from
CLONEORA. WAVEORA1 is the Linux system where eventually the Oracle Database will be installed.
The entry in the NFS server /etc/exports is “/root/unzips *(rw,sync,no_root_squash,no_subtree_check)”.
The corresponding CLONEORA entry in /etc/fstab is “xsrv:/root/unzips /mnt nfs
rw,bg,hard,rsize=32768,wsize=32768,vers=3,nointr,timeo=600,tcp”.
13
Done
Setting device 0.0.0401 online
Done
Add entries to the file “/etc/dasd.conf” for disks 400 and 401.
0.0.0400 use_diag=0 readonly=0 erplog=0 failfast=0
0.0.0401 use_diag=0 readonly=0 erplog=0 failfast=0
Creating the z/VM mdisks for ASM isn’t directly available in IBM Wave, however the mdisks will be
replicated when the CLONEORA image is cloned to create WAVEORA1.
14
[root@CLONEORA rules.d]# cat 99-oracle.rules
KERNEL=="dasd*",SYMLINK=="disk/by-path/ccw-0.0.0400-
part1",OWNER="oracle",GROUP="oinstall",MODE="660",SYMLINK+="asm400"
KERNEL=="dasd*",SYMLINK=="disk/by-path/ccw-0.0.0401-
part1",OWNER="oracle",GROUP="oinstall",MODE="660",SYMLINK+="asm401"
[root@CLONEORA ~]# udevadm control --reload-rules
[root@CLONEORA ~]# start_udev
Starting udev: [ OK ] [root@CLONEORA ~]#
la /dev/asm*
lrwxrwxrwx. 1 root root 6 Sep 14 16:22 /dev/asm400 -> dasdi1
lrwxrwxrwx. 1 root root 6 Sep 14 16:22 /dev/asm401 -> dasdj1
[root@CLONEORA ~]# la /dev/dasd[ij]1
brw-rw----. 1 oracle oinstall 94, 33 Sep 14 16:22 /dev/dasdi1
brw-rw----. 1 oracle oinstall 94, 37 Sep 14 16:22 /dev/dasdj1
NOTE: Stopping and starting UDEV seems to prevent access to Linux as the default gateway is
removed. A gateway parameter was explicitly added to the ifcfg-eth0 file and this seemed to
alleviate the problem.
Creating the UDEV entries isn’t directly available in IBM Wave, however the UDEV entries will be
replicated when the CLONEORA image is cloned to create WAVEORA1.
Miscellaneous
There may be some other files such as /etc/profile, /etc/pam.d/login, and /etc/security/limits.conf that will
need updating before the utility in the following section will run without warnings and errors. The key is to
review the documentation in the resources section carefully.
Run CLUVFY
The Oracle cluster verify utility is run under the “oracle” user to verify that the prerequisites for an Oracle
Restart install are on CLONEORA. The utility is on the Oracle libs that were NFS mounted previously.
The output of this utility should show that all pre-checks for an Oracle Restart configuration pass. For
more on using the CLUVFY utility see sections 3.4 and 4.1 of the IBM Redbook “Experiences with Oracle
Database 12c Release 1 on Linux on System z”.
15
Figure 13: Access IBM Wave Script Manager
From the IBM Wave User Script Manager screen above select “Create New Script” to add the Oracle
installation script to IBM Wave.
16
Figure 15: IBM Wave script part 1 of 2
This screen and the next screen show the IBM Wave script. The variable above,
$WV_LINUX_HOST_NAME1, is an IBM Wave provided variable that identifies the host that the script is
being executed on.
17
Figure 16: IBM Wave script part 2 of 2
The mouse doesn’t work for cut and paste for adding the script to IBM Wave, but the “ctrl-c” and “ctrl-v”
keys do work for moving the script from a file to the IBM Wave scripting area.
On clicking “Save” the script is saved by IBM Wave and since global script was checked it is available to
all IBM Wave users.
Besides the NFS mounted Oracle libraries described previously, the script needs access to four response
files which are stored in the”/oracle/base/restart_install” directory on CLONEORA.
18
Response files
Since the next three response files have numerous comments and are rather large, only the differences
between the response file and an Oracle Database 12c vanilla response file are shown in the listings
below.
[oracle@pazxxt01 ~]$ diff restart_install/dbca_cdb.rsp restart_12c/dbca.rsp
78c78
< GDBNAME = "oracdb.cmo-demo"
---
> GDBNAME = "orcl12c.us.oracle.com"
149a150,152
>
>
>
202c205
< SID = "oracdb"
---
> SID = "orcl12c"
212c215
< CREATEASCONTAINERDATABASE = true
---
> #CREATEASCONTAINERDATABASE =
222c225
< NUMBEROFPDBS = 0
---
> #NUMBEROFPDBS =
243c246
< NODELIST=
---
> #NODELIST=
274c277
< SYSPASSWORD = "Oracle_01"
---
> #SYSPASSWORD = "password"
284c287
< SYSTEMPASSWORD = "Oracle_01"
---
> #SYSTEMPASSWORD = "password"
450c453
< RECOVERYAREADESTINATION=/oracle/base/flash_recovery_area
---
> #RECOVERYAREADESTINATION=
19
460c463
< STORAGETYPE=ASM
---
> #STORAGETYPE=FS
469,471c472,473
< #
< DISKGROUPNAME=DATA
< #
---
> #DISKGROUPNAME=DATA
>
479c481
< ASMSNMP_PASSWORD="Oracle_01"
---
> #ASMSNMP_PASSWORD=""
499,500c501,502
< CHARACTERSET = "AL32UTF8"
< #
---
> #CHARACTERSET = "US7ASCII"
>
509c511
< NATIONALCHARACTERSET= "AL16UTF16"
---
> #NATIONALCHARACTERSET= "UTF8"
556c558
< LISTENERS = "LISTENER"
---
> #LISTENERS = "listener1 listener2"
595c597
< SAMPLESCHEMA=TRUE
---
> #SAMPLESCHEMA=TRUE
20
125c125
< oracle.install.db.DBA_GROUP=dba
---
> oracle.install.db.DBA_GROUP=
131c131
< oracle.install.db.OPER_GROUP=oper
---
> oracle.install.db.OPER_GROUP=
136c136
< oracle.install.db.BACKUPDBA_GROUP=dba
---
> oracle.install.db.BACKUPDBA_GROUP=
141c141
< oracle.install.db.DGDBA_GROUP=dba
---
> oracle.install.db.DGDBA_GROUP=
146c146
< oracle.install.db.KMDBA_GROUP=dba
---
> oracle.install.db.KMDBA_GROUP=
419c419
< SECURITY_UPDATES_VIA_MYORACLESUPPORT=false
---
> SECURITY_UPDATES_VIA_MYORACLESUPPORT=
431c431
< DECLINE_SECURITY_UPDATES=true
---
> DECLINE_SECURITY_UPDATES=
483c483
< oracle.installer.autoupdates.option=SKIP_UPDATES
---
> oracle.installer.autoupdates.option=
21
< oracle.install.asm.OSASM=dba
---
> oracle.install.asm.OSASM=
316c316
< oracle.install.asm.SYSASMPassword=Oracle_01
---
> oracle.install.asm.SYSASMPassword=
324c324
< oracle.install.asm.diskGroup.name=data
---
> oracle.install.asm.diskGroup.name=
335c335
< oracle.install.asm.diskGroup.redundancy=EXTERNAL
---
> oracle.install.asm.diskGroup.redundancy=
351c351
< oracle.install.asm.diskGroup.AUSize=1
---
> oracle.install.asm.diskGroup.AUSize=
363c363
< oracle.install.asm.diskGroup.disks=/dev/asm400,/dev/asm401
---
> oracle.install.asm.diskGroup.disks=
375c375
< oracle.install.asm.diskGroup.diskDiscoveryString=/dev/asm4*
---
> oracle.install.asm.diskGroup.diskDiscoveryString=
380c380
< oracle.install.asm.monitorPassword=Oracle_01
---
> oracle.install.asm.monitorPassword=
Deactivate CLONEORA
Now that CLONEORA has been prepped for an Oracle silent install it will be deactivated. The deactivated
CLONEORA will itself be cloned to WAVEORA1 and that is where the Oracle Database will be installed.
CLONEORA can be cloned as many times as needed and the new clone will have the Oracle Database
install prerequisites in place.
22
Figure 17: Deactivate cloneora
CLONEORA is shutdown or deactivated in IBM Wave terms by right clicking and then selecting
Deactivate.
Everything in this paper has dealt with a single z/VM system, but IBM Wave supports z/VM systems
which are members of a Single System Image (SSI) cluster.
23
Clone “CLONEORA”
The Linux system to be used to do the first Oracle Restart install will be cloned from CLONEORA. This
happens by right clicking the deactivated CLONEORA Linux image and then selecting “Cloning” followed
by “Clone”.
But first WAVEORA1 (the new clone) needs to be provided with RACF access to the z/VM guest LAN.
These are the same RACF commands that were used before CLONEORA was created.
rac au (waveora1) pass(icc630) owner(ibmuser) dfltgrp(sys1) name(clone)
Ready; T=0.01/0.01 20:22:38
rac pe system.lanvmc1 class(vmlan) id(waveora1) access(alter)
Ready; T=0.01/0.01 20:23:12
rac du (waveora1)
Ready; T=0.01/0.01 20:23:24
Once “Clone” has been selected the name, password, disk group, and other parameters are specified in
the same way that was done previously when CLONEORA was generated from RH65GOLD.
24
Figure 20: Configuration for WAVEORA1
After clicking “Go”, clicking “Close” after the “Cancel” changes to “Close”, and waiting a few minutes,
WAVEORA1 is ready to be activated.
25
Figure 21: Activate WAVEORA1
Boot WAVEORA1 by doing a right click on the icon and then clicking “Activate”.
26
Displaying the details of WAVEORA1 shows the following screen.
27
[oracle@WAVEORA1 ~]$ ssh waveora1 date
The authenticity of host 'waveora1 (192.168.150.5)' can't be established.
RSA key fingerprint is 1e:bb:38:8b:43:82:60:6e:7d:81:d3:d3:36:c4:c9:f2.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'waveora1,192.168.150.5' (RSA) to the list of known
hosts.
Sun Sep 14 20:44:52 CDT 2014
[oracle@WAVEORA1 ~]$ ssh waveora1 date
Sun Sep 14 20:44:58 CDT 2014
Listing 16: Add “waveora1” to known_hosts file
Now by right clicking the newly minted Linux and clicking “Execute Script”, the script to install the Oracle
Database can be run. The execute screen appears and a few details need to be filled in for the script to
execute successfully.
28
Figure 24: Script configuration setup
The script is run under the “oracle” user so the user and password are entered at the top of the screen.
The “Apply credentials to selected guests below” is selected and then “Browse” is selected to find the
install script to run.
The script does a silent install of Oracle Restart, a silent install of Oracle Database binaries, a silent
create of a container database, and a silent create of a pluggable database.
To run the script click “Go”, click “OK” on the popup. The cancel button will be changed to “Close” and
click “Close”. The silent install is running. When the script finishes an Oracle pluggable database running
on ASM is available.
The script ended successfully and generate output confirming that:
Creation of the pluggable database is 100% complete
The user “scott” was created
The script WAVEInit.oracle_install finished with return code:0. This shows that a pluggable database was
created as the latter part of the silent install script. The script also created a user “scott”. The command:
29
“sqlplus scott/tiger@WAVEORA1:1523/orapdb.cmo-demo” can be used to connect the user “scott” to the
newly created pluggable database.
Summary
IBM Wave was used to create a Linux image, CLONEORA. This image was created so that the original
Linux image, RH65GOLD, would remain as a prototype so that other pure Red Hat 6.5 Linux systems
could be built. After CLONEORA was created as a clone of RH65GOLD, the prerequisites necessary for
an Oracle Database installation were added to it. Once the prerequisites were installed, CLONEORA was
deactivated or shutdown by IBM Wave.
IBM Wave was then used to clone CLONEORA and create the Linux system WAVEORA1. A silent mode
Oracle product install was done on WAVEORA1 without the need of installing and verifying that
WAVEORA1 contained the prerequisites necessary for an Oracle Database install. Similarly, other clones
of the Linux image CLONEORA could be produced and they would be immediately available for an
Oracle Restart Installation.
Everything in this document was done on a single z/VM image, but IBM Wave supports multiple z/VM
systems which are members of a Single System Image (SSI) cluster.
30
Resources
IBM Wave for z/VM: Administration and Customization
SC27-6118-02
IBM Redbook
IBM Wave for z/VM Installation, Implementation, and Exploitation
SG24-8192-00
IBM Redbook
Experiences with Oracle Database 12c Release 1 on Linux on System z
SG24-8159-00
IBM Redbook
Advanced Networking Concepts Applied Using Linux on IBM System z
SG24-7995-00
31
About the author
Terry Elliott is an IBM z Systems specialist working in the IBM Oracle International Competency Center
at IBM Foster City. He has over 30 years of experience in information technology. Before joining the IBM
Oracle International Competency Center, Terry was an ERP z Systems performance specialist.
Thanks to the following people for their contributions to this project:
Stephen McGarril
System z Client Center in Poughkeepsie
Stephen Dulin
IBM Wave Service/Build/Test in Poughkeepsie
32
Trademarks and special notices
© Copyright. IBM Corporation 2015. All rights reserved.
References in this document to IBM products or services do not imply that IBM intends to make them
available in every country.
IBM, the IBM logo, RACF, z Systems, and z/VM are trademarks or registered trademarks of International
Business Machines Corporation in the United States, other countries, or both:
Red Hat, the Red Hat "Shadow Man" logo, and all Red Hat-based trademarks and logos are trademarks
or registered trademarks of Red Hat, Inc., in the United States and other countries.
Linux is a trademark of Linus Torvalds in the United States, other countries, or both.
Other company, product, or service names may be trademarks or service marks of others.
The information provided in this document is distributed “AS IS” without any warranty, either express or
implied.
The information in this document may include technical inaccuracies or typographical errors.
Information concerning non-IBM products was obtained from a supplier of these products, published
announcement material, or other publicly available sources and does not constitute an endorsement of
such products by IBM. Sources for non-IBM list prices and performance numbers are taken from publicly
available information, including vendor announcements and vendor worldwide homepages. IBM has not
tested these products and cannot confirm the accuracy of performance, capability, or any other claims
related to non-IBM products. Questions on the capability of non-IBM products should be addressed to the
supplier of those products.
All statements regarding IBM future direction and intent are subject to change or withdrawal without
notice, and represent goals and objectives only. Contact your local IBM office or IBM authorized reseller
for the full text of the specific Statement of Direction.
Some information addresses anticipated future capabilities. Such information is not intended as a
definitive statement of a commitment to specific levels of performance, function or delivery schedules with
respect to any future products. Such commitments are only made in IBM product announcements. The
information is presented here to communicate IBM's current investment and development activities as a
good faith effort to help with our customers' future planning.
Performance is based on measurements and projections using standard IBM benchmarks in a controlled
environment. The actual throughput or performance that any user will experience will vary depending
upon considerations such as the amount of multiprogramming in the user's job stream, the I/O
configuration, the storage configuration, and the workload processed. Therefore, no assurance can be
given that an individual user will achieve throughput or performance improvements equivalent to the
ratios stated here.
Photographs shown are of engineering prototypes. Changes may be incorporated in production models.
Any references in this information to non-IBM Web sites are provided for convenience only and do not in
any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part
of the materials for this IBM product and use of those Web sites is at your own risk.
33