Wednesday, December 23, 2009

Installing Oracle on openSUSE

Check out orarun before you install Oracle on openSUSE.

0. Ensure /etc/hosts has
127.0.0.1 localhost.localdomain localhost

1. Install C/C++ Development Library
2. Set the kernel parameters (you can do this via the installer as well)
3. Install additional packages via Computer -> Install Software
4. Install the libstdc++33 package. ie:
zypper install libstdc++33
(can't use yast32)
If not, you will get the following errors:

Here is a good starting point.

localhost:~ # zypper install libstdc++33
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following NEW package is going to be installed:
libstdc++33

1 new package to install.
Overall download size: 213.0 KiB. After the operation, additional 832.0 KiB will be used.
Continue? [y/n/?] (y):
Retrieving package libstdc++33-3.3.3-15.3.i586 (1/1), 213.0 KiB (832.0 KiB unpacked)
Retrieving: libstdc++33-3.3.3-15.3.i586.rpm [done (102.2 KiB/s)]
Installing: libstdc++33-3.3.3-15.3 [done]


Note: if you can't start the listener after installation, use IP address instead, e.g.:
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.1.128)(PORT = 1521))
)
)

ADR_BASE_LISTENER = /apps/oracle

tnsnames.ora:

Mounting host drives on openSUSE

Found out that I need to run the following command:

localhost:/ # mount -t vmhgfs .host:/ /mnt
localhost:/ # cd /mnt
localhost:/mnt # ls
host_d


I also found the vmware-hgfsclient command which (merely) displays the shared folders by name!

Tuesday, December 22, 2009

VMware Tools on openSUSE

It seems that after installing VMware tools on openSUSE, you will need to run the config manually (unlike CentOS).

cd /usr/bin
localhost:/usr/bin # ./vmware-config-tools.pl

Stopping VMware Tools services in the virtual machine:
Guest operating system daemon: done
Virtual Printing daemon: done
Unmounting HGFS shares: done
Guest filesystem driver: done


The module vmmemctl has already been installed on this system by another
installer or package and will not be modified by this installer. Use the flag
--clobber-kernel-modules=vmmemctl to override.

The module vmhgfs has already been installed on this system by another
installer or package and will not be modified by this installer. Use the flag
--clobber-kernel-modules=vmhgfs to override.

The module vmxnet has already been installed on this system by another
installer or package and will not be modified by this installer. Use the flag
--clobber-kernel-modules=vmxnet to override.

The module vmblock has already been installed on this system by another
installer or package and will not be modified by this installer. Use the flag
--clobber-kernel-modules=vmblock to override.

The module vmsync has already been installed on this system by another
installer or package and will not be modified by this installer. Use the flag
--clobber-kernel-modules=vmsync to override.

The module vmci has already been installed on this system by another installer
or package and will not be modified by this installer. Use the flag
--clobber-kernel-modules=vmci to override.

The module vsock has already been installed on this system by another installer
or package and will not be modified by this installer. Use the flag
--clobber-kernel-modules=vsock to override.

The module vmxnet3 has already been installed on this system by another
installer or package and will not be modified by this installer. Use the flag
--clobber-kernel-modules=vmxnet3 to override.

The module pvscsi has already been installed on this system by another
installer or package and will not be modified by this installer. Use the flag
--clobber-kernel-modules=pvscsi to override.



Detected X.org version 7.5.5.



The configuration file /etc/X11/xorg.conf can not be found. Do you want to
create a new one? (yes/no) [yes]

Shutting down HAL daemon done
Loading CPUFreq modules (CPUFreq not supported)
Starting HAL daemon done

X.Org X Server 1.6.5
Release Date: 2009-10-11
X Protocol Version 11, Revision 0
Build Operating System: openSUSE SUSE LINUX
Current Operating System: Linux localhost 2.6.31.5-0.1-desktop #1 SMP PREEMPT 2009-10-26 15:49:03 +0100 i686
Build Date: 02 November 2009 12:05:39PM

Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(++) Log file: "/tmp/vmware-config0/XF86ConfigLog.9236", Time: Wed Dec 23 15:44:35 2009
(EE) Unable to locate/open config file: "/tmp/vmware-config0/XF86Config.9236"
(==) Using default built-in configuration (30 lines)

X is running fine with the new config file.

Creating a new initrd boot image for the kernel.

Kernel image: /boot/vmlinuz-2.6.31.5-0.1-desktop
Initrd image: /boot/initrd-2.6.31.5-0.1-desktop
Root device: /dev/sda2 (mounted on / as ext4)
Resume device: /dev/sda1
Kernel Modules: vmxnet vmxnet3 pvscsi thermal_sys thermal scsi_transport_spi mptbase mptscsih mptspi ata_generic ide-core piix ide-pci-generic processor fan crc16 jbd2 ext4
Features: block usb resume.userspace resume.kernel
Bootsplash: openSUSE (800x600)
28274 blocks
Checking acpi hot plug done
Starting VMware Tools services in the virtual machine:
Switching to guest configuration: done
Guest operating system daemon: done
Virtual Printing daemon: done

The configuration of VMware Tools 8.1.3 build-203739 for Linux for this running
kernel completed successfully.

You must restart your X session before any mouse or graphics changes take
effect.

You can now run VMware Tools by invoking the following command:
"/usr/bin/vmware-toolbox" during an X server session.

To enable advanced X features (e.g., guest resolution fit, drag and drop, and
file and text copy/paste), you will need to do one (or more) of the following:
1. Manually start /usr/bin/vmware-user
2. Log out and log back into your desktop session; and,
3. Restart your X session.

Enjoy,

--the VMware team

Network Configuration on openSUSE

Here's the configuration on openSUSE to get it hooked up on the Internet. Note, the settings on VMware are the same as for CentOS.

For other types of network settings, check out this page.

Applications -> System -> Administrator Settings -> Network Devices -> Network Settings



Note: No need to add routing information.


Thursday, December 17, 2009

About Apache HTTP Server

Checking if it is installed:
[root@localhost ~]# rpm -q httpd
httpd-2.2.3-31.el5.centos
[root@localhost ~]# yum install httpd-2.2.3-31.el5.centos
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: mirror.files.bigpond.com
* base: mirror.pacific.net.au
* extras: mirror.files.bigpond.com
* updates: mirror.files.bigpond.com
Setting up Install Process
Package httpd-2.2.3-31.el5.centos.i386 already installed and latest version
Nothing to do



Starting the HTTP Server:
/sbin/service httpd start
Starting httpd: [ OK ]
[root@localhost usr]# ps -ef| grep http
root 4331 1 0 11:37 ? 00:00:00 /usr/sbin/httpd
apache 4332 4331 0 11:37 ? 00:00:00 /usr/sbin/httpd
apache 4333 4331 0 11:37 ? 00:00:00 /usr/sbin/httpd
apache 4335 4331 0 11:37 ? 00:00:00 /usr/sbin/httpd
apache 4336 4331 0 11:37 ? 00:00:00 /usr/sbin/httpd
apache 4337 4331 0 11:37 ? 00:00:00 /usr/sbin/httpd
apache 4338 4331 0 11:37 ? 00:00:00 /usr/sbin/httpd
apache 4339 4331 0 11:37 ? 00:00:00 /usr/sbin/httpd
apache 4340 4331 0 11:37 ? 00:00:00 /usr/sbin/httpd
root 4342 2962 0 11:37 pts/1 00:00:00 grep http


Config files:
[root@localhost www]# cd /etc/httpd
[root@localhost httpd]# ls
conf conf.d logs modules run

Installing Cognos8

I got this error message when installing Cognos8:
$ ./issetup
./issetup: error while loading shared libraries: libXm.so.3: cannot open shared object file: No such file or directory


It turns out that the library libXm.so.3 is not installed.

Here's how to get it:

yum whatprovides libXm.so.3

Loaded plugins: fastestmirror
extras 325/325
openmotif22-2.2.3-18.i386 : Open Motif runtime libraries and executables
Repo : base
Matched from:
Other : libXm.so.3


yum install openmotif22.i386

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* addons: mirror.usonyx.net
* base: ftp.monash.edu.au
* extras: mirror.optus.net
* updates: mirror.usonyx.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package openmotif22.i386 0:2.2.3-18 set to be updated
--> Processing Dependency: libXp.so.6 for package: openmotif22
--> Running transaction check
---> Package libXp.i386 0:1.0.0-8.1.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

==========================================================================================================================
Package Arch Version Repository Size
==========================================================================================================================
Installing:
openmotif22 i386 2.2.3-18 base 1.3 M
Installing for dependencies:
libXp i386 1.0.0-8.1.el5 base 23 k

Transaction Summary
==========================================================================================================================
Install 2 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 1.3 M
Is this ok [y/N]: y
Downloading Packages:
(1/2): libXp-1.0.0-8.1.el5.i386.rpm | 23 kB 00:01
(2/2): openmotif22-2.2.3-18.i386.rpm | 1.3 MB 00:47
--------------------------------------------------------------------------------------------------------------------------
Total 27 kB/s | 1.3 MB 00:50
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : libXp 1/2
Installing : openmotif22 2/2

Installed:
openmotif22.i386 0:2.2.3-18

Dependency Installed:
libXp.i386 0:1.0.0-8.1.el5

Complete!
[root@localhost bin]#

Now I can start the install! :-)

Monday, December 14, 2009

Installing Oracle on CentOS

For a very comprehensive guide, look here.

Make the changes by editing the /etc/sysctl.conf file and then rebooting the server
1. Setup kernel parameters
kernel.shmall = 268435456
# For Oracle
kernel.sem = 250 32000 100 128
kernel.shmmni = 4096
#kernel.shmall = 2097152
kernel.shmmax = 2147483648
#kernel.semnsl = 250
#kernel.semmns = 32000
#kernel.semopm = 100
#kernel.semmni = 128
fs.file-max = 6815744
net.core.rmem_default = 41943404
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576
net.ipv4.ip_local_port_range = 9000 65500


2. Configure additional swap space

You can find more details here.

Since my disks have filesystem fully created, I have to use the mkfs:
dd if=/dev/zero of=/swapfile bs=1024 count=1600000
Setup the swap file with the command:
mkswap /swapfile
To enable the swap file immediately but not automatically at boot time:
swapon /swapfile
To enable it at boot time, edit /etc/fstab to include:
/swapfile swap swap defaults 0



3. Install additional packages (ensure there is Internet connectivity):
yum -y install compat-libstdc++-296.i386 \
compat-libstdc++-33.i386 \
elfutils-libelf-devel.i386 \
glibc-devel.i386 \
glibc-headers.i386 \
gcc.i386 \
gcc-c++.i386 \
libaio-devel.i386 \
sysstat.i386 \
unixODBC.i386 \
unixODBC-devel.i386

Connecting to WebLogic on guest OS

To connect to WebLogic running on 7001 on guest OS, the firewall settings on both guest and host OS has to be configured to allow communications via 7001:



Network Configuration

In order to use Linux effectively for my company's apps, I need to make sure that I am able to connect from my host (Windows Vista) to my guest OS (CentOS).

After several rounds of trying and researching via Google, I've finally got it working! :-)

1. Ensure that Windows firewall is turned off


2. Set network connection to Bridged



3. Find out your local IP settings on Windows


4. Set the network on guest OS to be on the same network as host IP






5. Make sure you can ping from host OS to guest OS:


6. Make sure you can ping the gateway from guest OS to host OS:


7. Test that you can connect to Internet from guest OS:


8. Renable Windows firewall and run the above tests again to make sure everything is working.

Adding VMware disks to CentOS

The steps for doing this is clearly documented in this link.

The steps are:
1. Create new SCSI virtual disk via VMware
2. Run fdisk ( In Linux the first SCSI drive is sda, the second sdb, the third sdc, etc. since this was the second SCSI drive we added to the system, the device is known as /dev/sdb):
fdisk /dev/sdb
3. To create a new partition we enter the command n to create a new partition. This is going to be a primary partition p, and the first partition number 1. Because I want this disk to consume the full 12 GB I specified earlier we start at the first cylinder and end it at the last cylinder. We then want to write the partition table with the new partition we have just created so we enter the command w which writes the new table and exits fdisk.
4. Format the new partition we enter the command mkfs -t ext3 /dev/sdb1. This command makes a new files system with the type t ext3 on the /dev/sdb1 partition, this is the first partition on the sdb disk.
5. Create mount dir eg. /apps
6. Mount the filesystem: run mount -t ext3 /dev/sdb1 /apps
7. Modify the fstab for the new partition
After we open the fstab file in the previous step we add the following line:
/dev/sdb1 /software ext3 defaults 1 1
The first column is the partition name, the second is the default mount point, the third is the filesystem type. The fourth is the mount options, in this case I used default which mounts the drive rw, suid, dev, exec, auto, nouser and asynchronous. The 5th and 6th options are for the dump and fsck options. If dump is set to 1 the filesystem is marked to be backed up, if you are going to have sensitive material on the drive its a good idea to set it to 1. If fsck is set to greater than 1, then the operating system uses the number to determine in what order fsck should be run during start up. If it is set to 0 it will be ignored such as in the case of a cdrom drive since its a solid state disk. For more information on the fstab file check out this article: http://www.tuxfiles.org/linuxhelp/fstab.html

Configuring VMware Tools

Next thing I did is to install VMware tools on it. Do this via the VMware main menu VM -> Install VMware tools

This will mount a filesystem /media/VMware Tools:



Untar the files via the command : gunzip -c /media/VM*/VM*gz | tar -xvf -


Follow the instructions that appear at the bottom of VMware to install:


Take the default values for all prompts:



Do not install the experimental VMware Filesystem Sync Driver:




Once you have done this, you can start vmware tools - this will allow you to share directories between host and vmware os:


Configure the directories to share via VM -> Settings ->


You can now see the host directories on Linux:

Configuring CentOS on VMware - Display

The first thing I did when I started up the CentOS I got from thoughtpolice was to configure the desktop resolution - it's irritating when the desktop appears so small on my laptop screen with so much unused space. Do this via System > Administration > Display.

Change the hardware (I'm using Dell M6400 Laptop).


Once that is done, I can change the resolution and everything fits nicely.

Linux on VMware

I don't want to re-install my OS on my laptops, so what I am going to do is to use VMware for my Linux testing. It turns out that there are already sites that have VMware images for Linux.

thoughtpolice has quite a comprehensive list. Check it out here.

I'm using the one for CentOS since it is based on Redhat and Redhat is the Linux flavour supported by my company's apps.

I'm also going to try on openSuse since it is based on SLES which is another flavour of Linux supported by my company's apps. For openSUSE, I will be installing it from scratch. I got my ISO download from here.

openSUSE is the freeware version of SUSE Linux Enterprise Server (SLES). To find out the differences, check out this link.

My First Entry

Since the software company I am working for has Linux as one of it's supported platform, I've decided to get my hands dirty on Linux.

Actually I've been playing around with unix on pc since my University days (which was way back in 1993). That time, I experimented on FreeBSD. I did try Linux when I started working in 1995 but I didn't really have much time to play with it as the systems I was supporting used mainly SCO Unix (which also runs on X86).

Its been a long time coming and I am excited of this journey. I'm setting up a blog of the things I've learnt. Hopefully it will be helpful for myself and others. :-)

Oh by the way, for the record, my company apps is supported on :
RHEL 4 for x86 AS,
RHEL 5 for x86 AP
SLES 9, 10 for x86