1. LAB 1: Install OS Zone & DB2 2
1.1. Prerequisites / Hardware Requirement 2
1.5. Create Virtual Hard Disk 11
1.6. Create Storage Pool and Zone 13
1.8. Install DB2 Server on DB Zone 15
1.LAB 1: Install OS Zone & DB2
1.1.Prerequisites / Hardware Requirement
Solaris OS needs 4 GB disk space and 400MB RAM
Each additional zone needs 70MB hard disk
Swap space
Normally same as the VM physical RAM
Disk space for tmp folder
Check how many swap space for each application servers and sum up (may check from info center)
WAS & WPS 6.0, tmp folder needs minimum 1.5GB
DB2 512MB RAM
IBM HTTP Server 0.5GB RAM, 1GB disk space
LDAP
Network Deployment
VM Hard disk space = Solaris OS disk space + Swap space
How many zones required? Depending on the infrastructure designs.
-
Define Zone
Memory
Hard disk (GB)
Zone 1: DB2
0.5 GB
0.2
Zone 2: Network Deployment
0.5 GB (512MB)
0.3
Zone 3: WAS/WPS Cluster 1
(1.7x2)+(1.5x2) = 6.4
Zone 4: WAS/WPS Cluster 2
(1.7x2)+(1.5x2) = 6.4
Zone 5: Web Server
0.5 GB
1
Zone 6: LDAP
0.2
Zone 7: Solaris 10
0.4 GB
4
Swap Space
Equal to physical memory
1.5
TOTAL:
4 GB
20 GB
1.2.Create Virtual Machine
Name and Location
Guest Operating System – Solaris Operating System (64-Bit)
Memory and Processor - 4GB and 2 processors
Hard Disk – 20GB
Network Adapter – Bridged
Notes:
Bridged – network created is visible inside and outside.
Host Only – invisible from inside and outside.
NAT – invisible inside, but can go out.
CD / DVD Drive – Use an ISO image (sol-10-u4-ga-x86-dvd.iso)
Floppy Drive – Don’t add a floppy drive.
USB Controller – either one will do.
Ready to complete – verify summary and click finish.
1.3.Install Solaris 10
Installation Summary
Network: Yes
DHCP: No
Hostname: [Juice/Kfc/Arsenal]
IP: [192.168.16.1 / 192.168.17.1 / 192.168.18.1]
Subnet mask: 255.255.0.0
Enable IPv6: No
Steps for installing
-
Check Route Table
$ netstat -rn
Shut down Solaris
$ shutdown –g0 –i5 –y OR $ init 5
Reboot Solaris
$ shutdown –g0 –i6 –y OR init 6 OR reboot
DHCP is dynamically assigned IP. If yes, the server is dependant on DHCP (not HA), means if DHCP server down, this will affect our own server.
To know which network it routes to, netmask (BINARY) AND destination IP.
After installation, at VMWare console, click “Add VMWare Plugin” to install plugin to Guest. Select 800x600 resolution.
1.4.Configure SSH
To allow root login remotely
$ cd /etc/ssh
$ vi sshd_config (server config)
edit PermitRootLogin from no to yes
$ svcadm restart ssh
Verify: ssh from another machine
Generate trust key (Every time root remotely login, no need to key in password)
Navigate to root’s home directory
$ ls –a
$cd .ssh
Check if there is id_rsa.pub inside. If no, generate the public and private key:
$ ssh-keygen –t rsa [-f keyname]
If no directory .ssh, generate using command:
$ ssh localhost date (generate .ssh directory in home directory)
$scp id-rsa.pub_root@coffee:/tmp
in coffee server, mv /tmp/id_rsa.pub /root/.ssh/authorized_keys2
Disable send mail
$ svcadm disable sendmail
1.5.Create Virtual Hard Disk
At the VMWare Host,
$ vmware-vdiskmanager –c –s 4GB 0a lsilogic –t 0 disk1.vmdk
At the VMWare Guest GUI, Add Hardware > Add Hard disk
At the VMWare Guest
$ touch/reconfigure (Issue scan OS hardware)
$ init 6
1.6.Create Storage Pool and Zone
Check available disk | $ format c1t0d0 c1t1d0 (new virtual disk) |
Check file system usage | $ df –h |
Create storage pool | - zpool create <pool> <virtual device> $ zpool create tank c1t1d0 |
Check storage pool status | $ zpool status |
Create new ZFS file system | $ zfs create tank/zones
|
Set mount point to global zone | $ zfs set mountpoint=/zones tank/zones |
List all ZFS | $ zfs list |
Create a new zone | - zfs create <zone path/zone name> $ zfs create tank/zones/db |
Create zone conf file to install the zone | $ vi /zones/db/db.cfg Create set zonepath=/zones/db set autoboot=false add net set physical=e1000g0 set address=192.168.16.2 end add fs set type=lofs set special=/software set dir=/sw end verify commit |
Configure zone | $ zonecfg –z db –f db.cfg |
List zones with status | Status: CONFIGURED, INSTALLED, RUNNING $ zoneadm –z list –cv (zone now is configured) $ zonecfg –z db info |
Change zone mod | Change the file permission for zone root before install $ chmod 700 db |
Install package to zone | (It takes some time to install) $ zoneadm –z db install |
Boot/Start the zone | (Boot the zone since set the autoboot to false) $ zoneadm –z boot |
Login to zone’s system console | $ zlogin –C db Choose DECVT100 Terminal |
Logout zone | $ exit Login: ~. Password: ~. |
Check zone status continually | $ while true; do zoneadm list –cv; sleep 3; done |
1.7.Add Domain Name
Login to the zone
Edit /etc/hosts
Add one domain name to the server ip address
Test the domain name
$ ping <ip address>
$ ping –s <domain name>
1.8.Install DB2 Server on DB Zone
Copy installation file (SSH & Untar) | $ cat C9658ML.tar | ssh root@192.168.16.1 “(mkdir -p /software/db2; cd /software/db2; gzip -cd; tar -xvf -)” |
Install DB2 Server | $ cd /software/db2 $ ./db2_install Enter: DB2.ESE |
Import DB2 License | $ /opt/IBM/db2/v8.1/adm/db2licm -a <license: db2ese.lic > |
Create group | $ groupadd –g 100 db2fgrp1 $ groupadd –g 101 db2agrp $ groupadd –g 102 db2igrp1 |
Create user | $ useradd –u 100 –g db2fgrp1 –d /export/home/db2fenc1-m db2fenc1 $ useradd –u 101 –g db2agrp –d /export/home/db2adm -m db2adm $ useradd –u 100 –g db2igrp1 –d /export/home/db2inst1-m db2inst1 |
Change user password | $ passwd db2fenc1 $ passwd db2adm $ passwd db2inst1 |
Add instance service port | $ vi /etc/services Add: db2c_db2inst1 50000/tcp |
Create DB instance (It will generate sqllib directory) | $ cd /opt/IBM/db2/V8.1/instance $ ./db2icrt –a SERVER –p db2c_db2inst1 –s ese –w 64 –u db2fenc1 db2inst1 (To drop the instance, use db2idrop) |
Add project | $ projadd –c “DB2 instance 1” user.db2inst1 |
Set tuning parameter on resources control | $ su – db2inst1 $ id –p $ exit |
Modify project | Login to the zone again and set these: $ projmod –s –K “project.max-shm-memory=(priv,4G,deny)” user.db2inst1 $ projmod –s –K “project.max-shm-ids=(priv,4K,deny)” user.db2inst1 $ projmod –s –K “project.max-msg-ids=(priv,4K,deny)” user.db2inst1 $ projmod –s –K “project.max-sem-ids=(priv,4K,deny)” user.db2inst1
|
Create SAMPLE database | $ cd /opt/IBM/db2/V8.1/bin $ ./db2sampl |
Verify database connection | $ db2 list db directory $ db2 connect to sample user db2inst1 |
1.9.Install DB2 Client on Application Zone
Install DB2 Client | $ cd /software/db2 $ ./db2_install Enter: DB2.ADMCL |
Create group | $ groupadd –g 100 db2fgrp1 $ groupadd –g 101 db2agrp $ groupadd –g 102 db2cgrp1 |
Create user | $ useradd –u 100 –g db2cgrp1 –d /export/home/db2inst1-m db2inst1 |
Change user password | $ passwd db2inst1 |
Add instance port | $ vi /etc/services Add: db2c_db2inst1 50000/tcp |
Create instance | $ cd /opt/IBM/db2/instance $ ./db2icrt –a SERVER –s client –w 32 –u db2inst1 db2inst1 |
Login as client user | $ su – db2inst1 |
Catalog node | $ db2 “catalog tcpip node WPSNODE remote <DB Server IP/Hostname> server db2c_db2inst1 |
Catalog database | $ db2 “catalog database SAMPLE as SAMPLE at node WPSNODE” |
1.10.Create Zone Snapshot
Shutdown all zones | $ zlogin <zone> init 5 |
Snapshot zone | $ zfs snapshot –r tank/zones@<filename> |
No comments:
Post a Comment