VMware: Howto setup vCenter Server 2.5 on Linux connecting to Oracle XE 10g Release 2 – Part I

7

Still processing all the info from VMworld Europe 2009 I remembered something about vCenter Server that it was available on Linux. I searched on the VMware site and found the beta version. I downloaded the virtual appliance and the installation guide. I Started vConverter to import the VA in to my workstation edition. Ok that went well. While the vm is starting let’s check the installation guide what we need to get it going.

vCenter Server on linux console

      Requirements for Installing VirtualCenter on Linux
      Installing VirtualCenter on Linux requires the following items:

  • VirtualCenter on Linux appliance
  • Virtualization platform, which can be any of the following:
  • ESX Server 3.5 or later
  • ESX Server 3i version 3.5 or later
  • Workstation 5.5 or later
  • VMware Player 2.0 or later
  • VMware Server 2.0 or later
  • Oracle database, version 10 or later
  • Browser with a network connection

I think I have everything I need to get started.

While working with Ubuntu Server I noticed that the swap partition was too small. I’ll describe how this can be fixed. To do this I’ll use gparted download the stable LiveCD.

1. Download Ubuntu Server 8.04.1 LTS (Hardy Heron) and import it to ESX or Workstation
2. Connect the gparted.iso to the Ubuntu vm
3. Then resize the ubuntu-server-8.04.1-i386.vmdk
    On ESX vmkfstools –X 9G <lun and folder>/ubuntu-server-8.04.1-i386.vmdk
    On workstation <workstation dir>\vmware-vdiskmanager.exe -x 9Gb < folder>/
    ubuntu-server-8.04.1-i386.vmdk
4. Start the Ubuntu vm and boot from the CD-ROM drive.
5. Start the option “GParted Live (Default settings)”
6. Select your preferred options and start X
7. Select the extended partition /dev/sda2 and resize the extended partition use the maximum space
8. Select the Linux-swap partition /dev/sda5 and resize the Linux swap partition use the maximum space
9. Click Apply to commit the changes
10. Shutdown the Ubuntu vm and change the memory to 512MB
11. Start the vm
12. Login to the vm with “notroot” and the password is “thoughtpolice”
13. Type in “sudo -s” and enter the password “thoughtpolice”
14. After resizing the swap partition it has to be reinitialized
   ~ # mkswap /dev/sda5 
   ~ # swapon /dev/sda5

15. Configure a Static IP address for your network card. If you want to configure a Static IP address you
      need to edit the /etc/network/interfaces and you need to enter the following lines.
   ~ # nano /etc/network/interfaces 
   # The primary network interface 
   auto eth0
   iface eth0 inet static
   address 192.168.242.12
   gateway 192.168.242.2
   netmask 255.255.255.0
   network 192.168.242.0
   broadcast 192.168.242.255

16. Setting up DNS
   ~ # nano /etc/resolv.conf
   enter the following details
   search VMpros.lan
   nameserver 192.168.242.2

17. To install Oracle XE, you need to add the following line to your /etc/apt/sources.list file
   deb http://oss.oracle.com/debian unstable main non-free

18. Update the application cache and upgrade the system
      ~ # aptitude update
      ~ # aptitude upgrade
19. Installing sshd to do the rest of the installation with putty
      ~ # aptitude install openssh-server 
      Answer yes to install the dependencies
      ~ # reboot
20. Download putty
21. Start putty select ssh and connect to 192.168.242.12
22. Login with “notroot” and the password is “thoughtpolice”
23. Login with sudo as root
      ~ # sudo –s 
      password is “thoughtpolice”
24. Install Oracle XE and the client
      ~ # aptitude install oracle-xe oracle-xe-client
      Answer “Y”
      Answer “yes”
      Reading package lists… Done  
   Building dependency tree 
   Reading state information… Done  
   Reading extended state information  
   Initializing package states… Done 
   Building tag database… Done 
   The following packages have been kept back: 
   bind9-host dnsutils libbind9-30 libisccc30 libisccfg30 linux-image-server linux-
   server 
   The following NEW packages will be installed:

   oracle-xe oracle-xe-client

   0 packages upgraded, 2 newly installed, 0 to remove and 7 not upgraded.
   Need to get 0B/247MB of archives. After unpacking 476MB will be used.
   WARNING: untrusted versions of the following packages will be installed!
   Untrusted packages could compromise your system’s security.
   You should only proceed with the installation if you are certain that
   this is what you want to do.
   oracle-xe-client oracle-xe
   Do you want to ignore this warning and proceed anyway?
   To continue, enter "Yes"; to abort, enter "No": yes
   Writing extended state information… Done
   (Reading database … 15663 files and directories currently installed.)
   Unpacking oracle-xe (from …/oracle-xe_10.2.0.1-1.1_i386.deb) …
   Unpacking oracle-xe-client (from …/oracle-xe-client_10.2.0.1-1.2_i386.deb) …
   Setting up oracle-xe (10.2.0.1-1.1) …
   Executing Post-install steps…
   -e You must run ‘/etc/init.d/oracle-xe configure’ as the root user to configure the
   database.
   Setting up oracle-xe-client (10.2.0.1-1.2) …
   Executing Post-install steps……….
   Oracle is installed
25. Configure oracle
      ~ # /etc/init.d/oracle-xe configure
   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]:
   Specify a port that will be used for the database listener [1521]:
   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: password
   Confirm the password: password
   Do you want Oracle Database 10g Express Edition to be started on boot (y/n) [y]:
   Starting Oracle Net Listener…Done
   Configuring Database…
   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"

      Accept the default options and enter the password
26. Let’s try connecting using sqlplus. It’s probably a good idea to do this as a non-root user, 
      so change to the oracle user. Also, connecting as the oracle user would allow us to connect as sysdba.
      ~ # su – oracle

27. Oracle needs a couple of environment variables configured for the client to work. You need to alter your
      PATH, too. You can put those lines in your ~/.bash_profile and the next time you log in you’ll have your
      environment configured correctly. You need to edit the .bash_profile and you need to enter the
      following lines.
      ~ # nano .bash_profile
   if [ -e /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh ]; 
     then
     source /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oracle_env.sh
   elif [ -e /usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin/oracle_env.sh ];
     then
     source /usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin/oracle_env.sh
   fi

28. To save you logging out and in again you can run source .bash_profile
29. After configuring Oracle XE and the environment variables are set. We will start connecting as sysdba
      to change the Database Home Page access 
   ~ # sqlplus / as sysdba
   SQL*Plus: Release 10.2.0.1.0 – Production on Fri Mar 6 04:08:12 2009
   Copyright (c) 1982, 2005, Oracle.  All rights reserved.
   Connected to:
   Oracle Database 10g Express Edition Release 10.2.0.1.0 – Production

   SQL>
30. Run the following command to enable remote access to the Database Home Page.
   SQL>exec dbms_xdb.setListenerLocalAccess(false);
   PL/SQL procedure successfully completed.
   SQL>Database Home Page31. Before we can start the vc installation we need to retrive the instance name from the Oracle DB
      SQL>select sys_context(‘USERENV’,’DB_NAME’) as Instance 
   SQL>from dual;  2

  
   INSTANCE 
   ——————————————————————————– 
   XE

   SQL>
      XE is the Database Instance. We need this when we connect vCenter Server to Oracle XE.

This is the end of Part I; watch out for Part II coming soon…

About Author

7 thoughts on “VMware: Howto setup vCenter Server 2.5 on Linux connecting to Oracle XE 10g Release 2 – Part I

  1. Excellent article. I am using VMWare with CentOS.
    The following instruction is key:
    SQL>exec dbms_xdb.setListenerLocalAccess(false);

    Then we have “netstat -an” returning:
    tcp 0 0 0.0.0.0:5050 0.0.0.0:* LISTEN
    instead of
    tcp 0 0 127.0.0.1:5050 0.0.0.0:* LISTEN
    Note I am using “5050” as port number to access to my Oracle Express instance.

    The connection from a remote machine, even using NAT on the VMWare image now works.
    Jean-Michel

  2. Say thanks for share pretty excellent informations. Your internet is great.I am impressed by the material that you have on this weblog. It exhibits how very well you understand this topic. Bookmarked this amazing web page, will appear back again for extra. You, my buddy, amazing! I discovered just the facts I already searched in all places and just wasn’t able to come across. What a ideal internet site. Like this site your site is 1 of my new most-loved.I such as this knowledge proven and it has provided me some sort of inspiration to have achievement for some reason, so keep up the wonderful do the job!

  3. I require a help from you. In my project there is a vcentre server(v5.0) which is managing two datacentre having 100 servers . Its using a separate oracle server . There was accidental shutdown occurs on both the vcentre and oracle . after , we are not able to see any list in the vcentre.
    I have checked with our DBA that oracle database is running fine and its in open state . Its also have tables and size 5 GB.
    service on vcentre status is below :
    #service vmware-vpxd status
    vmware-vpxd is running
    tomcat is running
    I tried with vpxd_odbcconfig and operation was sucessfull . But, I am not able to get the previous list.
    Can you please guide me
    1> what should be the status of database open state or mounted ?
    2> what is the process to connect the vcenter application with database ?

  4. Pingback: Brianlomax.Wix.Com

Leave a Reply

Your email address will not be published. Required fields are marked *