Tuesday, January 22, 2013

Installing EBS R12.1.3 using Oracle VM Template without VM Server & Manager (Part 2 of 4)

Section 3 – Configuring Database Tier Template
Booting Linux in Rescue Mode – Start the Virtual Machine created for Database Server. Make sure the Linux bootable disk are inserted into CD-ROM / ISO Image and its supposed to boot from CD-ROM.

Enter ‘Linux Rescue’ at the prompt and enter to boot linux in rescue mode.
Choose the language and Keyboard layout

Configure both the network interfaces (eth0 and eth1). Right now we can just make it to use the IP address from DHCP, that will do the job. If you are confident enough your manual configuration will work and accessible from HOST along with Guest able to access the internet.
Just enable IPv4 support, that will do the job.
Used DHCP to obtain IP information.
Now we are done with configuring the first network adapter (i.e Host-Only adapter – used to connect the Guest Machine from HOST). Same we did we have to configure the second network adapter (i.e NAT adapter – it will be used to connect to the internet to download and update kernel files). Same can be achieved by browsing the files from installation media.

Now click on Continue and make a note of the mount point where system has been mounted. We need to access that to make the system work.
Click OK to return to shell prompt.  As instructed in the above screen shot please go to root environment by running command: chroot /mnt/sysimage

To proceed further we have two ways to accessing the virtual machine:
  • Access from VM Console
  • Access from HOST system. To use this we need to enable ‘sshd’ services in VM console before it can be used. Use command:
service sshd start
Before we proceed further and if you are planning to use the guest OS from HOST via SSH then please first check the IP of guest and OS and make sure its getting pinged from HOST OS

ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 08:00:27:88:88:C4
          inet addr:192.168.1.4  Bcast:192.168.1.255  Mask:255.255.255.0
C:\>ping 192.168.1.4
Pinging 192.168.1.4 with 32 bytes of data:
Reply from 192.168.1.4: bytes=32 time<1ms TTL=64
Reply from 192.168.1.4: bytes=32 time<1ms TTL=64
Reply from 192.168.1.4: bytes=32 time<1ms TTL=64
Reply from 192.168.1.4: bytes=32 time<1ms TTL=64

Ping statistics for 192.168.1.4:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms
Update the configuration files –

The kernels that are loaded while we booted the system in rescue mode supports Xen Kernel, where as our target kernel will going to support that. To make it work we need to modify modprobe.conf and install new kernel.

Before modifying the modprobe.conf its better to make a copy of it, so if something goes wrong we can recover that.
[root@localhost ~]# cp /etc/modprobe.conf /etc/modprobe.conf.xen
[root@localhost ~]# cat /etc/modprobe.conf
alias eth0 xennet
alias scsi_hostadapter xenblk
[root@localhost ~]# vi /etc/modprobe.conf
alias eth0 e1000
alias scsi_hostadapter ata_piix
alias scsi_hostadapter1 ahci
~
[root@localhost ~]# diff /etc/modprobe.conf /etc/modprobe.conf.xen
1,9c1,2
< alias eth0 e1000
< alias scsi_hostadapter ata_piix
< alias scsi_hostadapter1 ahci
---
> alias eth0 xennet
> alias scsi_hostadapter xenblk
[root@localhost ~]#
The data base disk images that we have added are mounted on mount point /u01. Please edit /etc/fstab so that fsck will not check to check and repair file system. Since the size of disk is large it better to skip the fsck test for /u01. Make sure /u01 looks like as image below

[root@localhost ~]# vi /etc/fstab
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/boot             /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-VM           swap                    swap    defaults        0 0
LABEL=ebs1211db         /u01                    ext3    defaults        1 0
[root@localhost ~]#
Update the /etc/sysconfig/oraclevm-template to disable automatic template configuration at boot time. Before running the configuration we need to make sure every thing is fine and we can proceed with template configuration. If we don’t disable then we may have to run through the same process again after boot. We could have directly updated the file, but I though its better not to delete content of the file where as just disable it and add a new entry as we needed.

[root@localhost ~]#vi /etc/sysconfig/oraclevm-template
# Template configuration
#
# Allow configuration of the template when the service is enabled
#
#RUN_TEMPLATE_CONF=YES
RUN_TEMPLATE_CONF=NO
~
[root@localhost ~]# grep RUN /etc/sysconfig/oraclevm-template
#RUN_TEMPLATE_CONF=YES
RUN_TEMPLATE_CONF=NO
[root@localhost ~]#
Installing a new Kernel – The kernel that were loaded while booting (Xen) is not going to work with OVM template, to make it work we need to replace it with standard kernel of same version. We could have used the ISO CD-ROM that we used to boot in rescue mode to install standard kernel or we can get it from the internet. I preferred to go over internet (Oracle Public Yum Server) to get the Kernel. That would defilnalty need an internet connection and the NAT adapter will do the job for us.

[root@localhost ~]# cd /etc/yum.repos.d
[root@localhost]# wget http://public-yum.oracle.com/public-yum-el5.repo
--2013-01-18 05:15:08--  http://public-yum.oracle.com/public-yum-el5.repo
Resolving public-yum.oracle.com... 141.146.44.34
Connecting to public-yum.oracle.com|141.146.44.34|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4220 (4.1K) [text/plain]
Saving to: `public-yum-el5.repo'

100%[======================================>] 4,220       --.-K/s   in 0s

2013-01-18 05:15:11 (71.9 MB/s) - `public-yum-el5.repo' saved [4220/4220]
[root@localhost]#
Update the yum repo file and make sure to set enabled=1 only for [ol5_u6_base]

[root@localhost]# vi public-yum-el5.repo
Validate if changes are correctly set
[root@localhost]# grep –B5 ‘enabled=1’ public-yum-el5.repo
Now install Kernel OL5U6 (2.6.18-238) from Oracle public yum server.
[root@localhost]# yum install kernel-2.6.18-238.el5

Press ‘Y’ to download and install the kernel.
Also install ‘screen’ if its not available. For me its not there so I installed it. This will be use full to create saved ssh sessions.

[root@localhost]# yum install screen
Upon completion create ‘initrd’ for the new kernel.
[root@localhost]# mkinitrd -v -f /boot/initrd-2.6.18-238.el5.img 2.6.18-238.el5
Now rescue tasks are done.  We need to restart the system now.

Reboot the Virtual Machine
-          Remove the disk from CD-ROM or change the boot order from Virtual Machine boot setting.
-          Start Virtual Machine and login with root user. The default root user password is ‘ovsroot’ as given in the read me file.
-          The SSH services would be starting automatically this time so no need to start SSH services manually.
Configure Oracle VM Database Server
The image file provided by Oracle already has template configuration script that runs and configure the database server as per our specs. In step it configures network adapters, directory paths, hostnames etc.  While we started the system in rescue mode we disabled the script. Now first enable the script and run it.

Enable OracleVM Template script
[root@localhost ~]# vi /etc/sysconfig/oraclevm-template
# Template configuration
#
# Allow configuration of the template when the service is enabled
#
RUN_TEMPLATE_CONF=YES
#RUN_TEMPLATE_CONF=NO
~
[root@localhost ~]# grep RUN /etc/sysconfig/oraclevm-template
RUN_TEMPLATE_CONF=YES
#RUN_TEMPLATE_CONF=NO
[root@localhost ~]#
After enabling the script we will execute it. Since we configured our network adapters use DHCP, while configuration we it requires to be changed to a static IP address. The script will automatically ask you about the details to configure the database server. Make sure to assign an IP address that is accessible in your network and by HOST. Also while the network adapters are configured system will restart the network adapters, So if you are connecting via SSH tools (like Putty) then you will get disconnected from Guest OS. That is the reason we installed ‘Screen’ so that we can recover the session and continue configuration. Its advisable to use Guest console for configuration. I have used Putty, So have saved a session using ‘screen’.

[root@localhost ~]# screen –S ebsdb
Now start the OracleVM-Template script
[root@localhost ~]# /etc/init.d/oraclevm-template start
It will ask for static IP address that we want to assign to our Oracle EBS database server. Provide NetMask and Gateway and DNS server as specified in the screenshot above. Once you specified the DNS and press enter the screen stops at this point (because I am using Putty). The network adapter are getting restarted and assigned with new IP address. After few seconds start a new session with new IP address that you assigned and proceed. Just invoke the saved SSH session.
Now we can see the same session. Please proceed further by providing requested details
Enter valid domain name for database server anything (host.domain.com). After that it will show network summary and ask APPS password to continue (APPS password is ‘apps’ for this instance).
There after the script will and configure your vision instance database server.
Now database server configuration is completed. If you check the OracleVM-Template file (/etc/sysconfig/oraclevm-template) you will see the RUN_TEMPLATE_CONF =NO.

DO NOT SHUTDOWN DB SERVER WHILE WE CONFIGURE APPS SERVER. 

Lets proceed to next section where we will be configuring Application Tier Server. 


Previous-: Section 1 & 2

11 comments :

  1. Hi Tauseef...

    Im a Oracle Apps Technical architect and I was trying to install R12 vision on my new laptop.. Among all the articles out there I found yours as the most simple and detailed article.. However Im stuck at the point where we install the yum repository. When I do wget http://public-yum.oracle.com/public-yum-el5.repo, I get an error Unable to resolve the address... What do you think the issue can be with the network configuration.. Please help...

    ReplyDelete
    Replies
    1. Hi Sandeep,

      Well when I was doing for the first time I had this issue two and I primarily believe this is because of the ethernet card setup. We enabled two ethernets on the virtual machine 'Host Only' and 'NAT'. Check the IP details of 'NAT' adapter. It should be dhcp enabled and have IP address assigned. You can also try by restarting ethernet adapters or by restarting the virtual machine.

      Also check that your host machine is able to connect to internet and there is no firewall that is blocking the connection.

      Happy Installation...

      Delete
  2. Hi Tauseef,
    Very good notes!. A question I have is, why do you need to apply Oracle Linux Kernel from oracle yum server ?. After performing all tasks until DHCP configuration if you perform command: uname -r it lists:
    2.6.18-238.el5
    Which is the same as the one you downloaded from yum server.

    ReplyDelete
    Replies
    1. Hello,

      I haven't checked that.. Well that good to know that same kernel is already available.. that really saves some time and effort. Initially I tried on some lower Linux version, So may be after moving to higher version I haven't checked the kernel version...

      Delete
  3. Hi Tauseef,

    Thank You Very Much for your detailed article. I am technical consultant. First time i am trying to install R12.1.3 VM template in Host desktop with Windows8.1. I have following problems with my install , Could you please help me on this.

    Initially I have setup Host Only and NAT networks in virtual machine. But it not connecting to internet so, i have changed to Bridged Netwrok (I am using WIFI in desktop).

    When i try to download kernal using "wget http://public-yum.oracle.com/public-yum-el5.repo", i have got the following error

    Resolving public-yum.oracle.com... 23.73.180.107, 23.73.180.114
    connecting to public-yum.oracle.com|23.73.180.107|:80... connected.
    HTTP request sent, awaiting response... 404 Not Found
    2013-12-22 12:10:22 ERROR 404: Not Found.

    Its connected to server , but got 404 Not Found error.

    So , i tried to create the file public-yum-el5.repo manually. Clipboard did not support for me. Then i have used the putty in host machine to create the file manually.

    After that i have ran the command "yum install kernel-2.6.18-238.e15" again i have got the following. i can't move forward from here.

    o15_u6_base | 1.1 kB 00:00
    o15_u6_base/primary | 1.1 kB 00:00
    015_u6_base 4551/4551
    Setting up install process
    No Package kernel-2.6.18-238.e15
    Nothing to do





    ReplyDelete
    Replies
    1. Hi Tauseef,

      I found out the issue, i have used the public-yum-e15.repo instead of public-yum-el5.repo.


      Template is stopped after 50% with following error.

      ERROR at line 1:
      ORA-01503: CREATE CONTROLFILE failed
      ORA-01565: error in identifying file ‘/u01/E-BIZ/db/apps_st/data/oss_sys01.dbf’
      ORA-27048: skgfifi: file header information is invalid
      Additional information: 13

      getConnectionUsingAppsJDBCConnector() –>
      APPS_JDBC_URL=’null’
      Trying to get connection using SID based connect descriptor
      getConnection() –>
      sDbHost : ebsdb
      sDbDomain : local.org
      sDbPort : 1563
      sDbSid : VIS
      sDbUser : APPS
      Trying to connect using SID…
      getConnectionUsingSID() –>
      JDBC URL: jdbc:oracle:thin:@ebsdb.local.org:1563:VIS
      Exception occurred: java.sql.SQLException: ORA-01034: ORACLE not available
      ORA-27101: shared memory realm does not exist
      Linux-x86_64 Error: 2: No such file or directory

      ——————-ADX Database Utility Finished—————

      RC-00118: Error occurred during creation of database
      Raised by oracle.apps.ad.clone.ApplyDatabase

      StackTrace:
      java.lang.Exception: Control file creation failed
      at oracle.apps.ad.clone.ApplyDatabase.doConf(ApplyDatabase.java:635)
      at oracle.apps.ad.clone.ApplyDatabase.doApply(ApplyDatabase.java:473)
      at oracle.apps.ad.clone.ApplyDatabase.(ApplyDatabase.java:366)
      at oracle.apps.ad.clone.ApplyDBTier.(ApplyDBTier.java:110)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:501)
      at oracle.apps.ad.clone.util.CloneProcessor.run(CloneProcessor.java:67)
      at java.lang.Thread.run(Thread.java:595)

      Kernel Versions are

      [root@ebsdb yum.repos.d]# rpm -qa | grep kernel
      kernel-uek-headers-2.6.32-100.26.2.el5
      kernel-xen-2.6.18-128.0.0.0.2.el5
      kernel-2.6.32-100.0.19.el5
      kernel-xen-2.6.18-238.0.0.0.1.el5
      kernel-firmware-2.6.32-100.0.19.el5
      kernel-uek-firmware-2.6.32-100.26.2.el5
      kernel-uek-2.6.32-100.26.2.el5
      kernel-2.6.18-238.el5

      Regards,
      Rama

      Delete
    2. Hi Rama,

      Well looking at the error I feel that services were not able to start and while it tries to connect with database its failing. Fortunately I never had this error. Did you started a fresh installation after you figured out you took wrong version of YUM repo.. if not I would say lets try fresh and see ..It should work.

      Delete
    3. Hi Tauseef
      I followed your instructions and evrything go well upto setting up the virtualbox files and I started configuring the Database Tier (Part 2 of 4)
      But I am having problem on modifying the "modprobe.conf" step. (as well as the steps after that). When I type the command
      sh-3.2# vi etc/modprobe.conf
      I get the screen with two lines
      >alias etho xennet
      >alias scsi_hostadapter_xenblk
      I don't see the command prompt to enter the next command as per your instructions. The screen stay like that and when I try to type CTRL + z I get the warning
      STOPPED(SIGTSTP) followed by the last command I entered
      Please advise if I need to enter some other command to get to the command prompt.
      I am new to EBS. I am basically a finance person, with major in accounting. My knowledge of Linux at this stage is very limited. I would appreciate if you can guide me further.
      Regards,
      Masood

      Delete
  4. Hi Masood,

    You have to follow VI editor command to edit the file.

    Here once you open the file # vi etc/modprobe.conf
    Press 'I' on the keyboard, that will take you insert mode.
    Now you can use your keyboard arrow to move up and down and delete/backspace to delete the records. Edit the record as mentioned, once done type below in sequence.

    ':'
    then
    'q' and press enter.

    Regards
    Tauseef

    ReplyDelete
  5. Tauseef

    I am trying to install 12.2.2 on my laptop using the steps that you have mentioned. I am getting stuck when updating the kernel.

    wget http://public-yum.oracle.com/public-yum-el5.repo is not resolving the host address.

    I checked some comments earlier in this post where someone changed the adapter from NAT to Bridged, which I tried, but still got the same error.

    I am using Oracle Linux 5.9 as it was the one that R12.2.2 seemed to be using.

    When I do uname-r I get 2.6.18-348.el5

    ReplyDelete
  6. Oracle apps and Fusion Self Paced Training Videos by Industry Experts. Please Check oracleappstechnical.com

    ReplyDelete

SeachBox