Friday, February 24, 2012

Oracle 11gR2 + Ubuntu 11.10

First prereqs:

sudo apt-get install build-essential libaio1 libaio-dev lesstif2 lesstif2-dev libc6-i386 libc6-dev-i386 gawk ksh libmotif3 alien libtool lsb-rpm lib32stdc++6 lib32z1 ia32-libs sysstat rlwrap unixodbc unixodbc-dev elfutils rpm x11-utils ksh libxp6

wget http://ftp3.nrc.ca/debian/pool/main/g/gcc-3.3/libstdc++5_3.3.6-18_amd64.deb
dpkg -i libstdc++5_3.3.6-18_amd64.deb

Into /etc/sysctl.conf:
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 1024 65535
net.core.rmem_default = 1048576
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576

Into /etc/security/limits.conf
oracle soft nproc 2048
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

and the other usual stuff.

When you get the nnfyboot error:

export LD_LIBRARY_PATH=$ORACLE_HOME/lib
ln -­s /usr/bin/basename /bin/basename
ln ­-s $ORACLE_HOME/lib/libclient10.a $ORACLE_HOME/lib/libagtsh.a
$ORACLE_HOME/bin/genagtsh $ORACLE_HOME/lib/libagtsh.so 1.0

(Edit for 11.2.0.3)

mkdir /usr/lib64
ln -s /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a /usr/lib64
ln -s /usr/lib/x86_64-linux-gnu/libpthread_nonshared.a /usr/lib64

Also see here for the following instructions:

During relinking operation OUI will fail and in $ORACLE_HOME/install/make.log  you will find following error.
/u01/app/dev/Middleware/agent11g/lib/libnnz11.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[1]: *** [/u01/app/dev/Middleware/agent11g/sysman/lib/emdctl] Error 1
make[1]: Leaving directory `/u01/app/dev/Middleware/agent11g/sysman/lib'
Solution:
======
When you start to install with ./runInstaller, run in another terminal window (as root)
ls $ORACLE_HOME/sysman/lib/ins_emagent.mk
At first this will produce an error, as the installer wont have created this file yet.
Once the file exists, do:
vi $ORACLE_HOME/sysman/lib/ins_emagent.mk
Search for the line
$(MK_EMAGENT_NMECTL)
Change it to:
$(MK_EMAGENT_NMECTL) -lnnz11

What's more, insanely for some reason we could link Oracle libraries with the GCC 4.6 on 10.2.0.2 but not on 10.2.0.3. gcc is a symlink to /usr/bin/gcc4.6 by default.

apt-get install gcc-4.4
cd /usr/bin
rm gcc
ln -s gcc-4.4 gcc
once it's all linked w/o errors
rm gcc
ln -s gcc-4.6 gcc

and then retry and retry and retry. Insane!

Until Ubuntu gets Oracle certified, it's server won't be taken seriously. On the other hand, Oracle hasn't certified OEL6 with Oracle 11gR2 so I'm not taking Oracle seriously either.

Saturday, February 11, 2012

VMWare ESX Killing trick


Nice way

  • locate the VM:
  vmware-cmd -l
  • Shutdown the VM:
   vmware-cmd /vmfs/volumes///.vmx stop
  • Just turn the power off:
   vmware-cmd /vmfs/volumes///.vmx stop hard

Nasty way

   ps auxfww|grep 
  kill -9 

Skype, qjackctl and pulse notes

Tested on Dell Latitute and Asus Eee.

Also should work fine with any recording device (including on-board / webcam mikes), mixer is used to provide better mikes and multiple people recording).

Plug the UCA-202 into the laptop.

Setup

Add the following to .asoundrc:



hakan@hakan-laptop:23:28:55:~$ cat .asoundrc 
pcm.pulse {
    type pulse
}
ctl.pulse {
    type pulse
}
pcm.!default {
    type pulse
}
ctl.!default {
    type pulse
}


Start qjackctl and add the following to the execute script after startup bit:

pactl load-module module-jack-sink channels=2; pactl load-module module-jack-source channels=2;pacmd set-default-sink jack_out

Verify /proc/asound/cards and set the hardware to the correct one.

Then start up the jack daemon, open the connections, disconnect all.

Start up a 4-track Timemachine: timemachine -c 4

Connections
  • Connect the PulseAudio Jack Sink left & right to Timemachine channels 1 & 2.
  • Connect System-capture 1 & 2 to Timemachine channels 3&4.
  • Connect System-capture 1 & 2 to Pulseaudio Jack Source channels left and right (so that Skype people can hear you talking via the mike).
  • To monitor yourself, connect System-capture 1&2 to System playback 1 &2 (Folio Notebook master mix/tape button must be depressed to achieve this - which causes a lot of 50Hz hum), other mixer to be tested.
Power up the mixer, send the mike 1 to left channel, mike 2 to right channel. Test both channels to see if you are recording into Timemachine. 

Start Pavucontrol and mute all devices apart from the USB one. 
Set Pavucontrol Recording: Skype : Input from: Jack Source (PulseAudio Jack Source).

Set up a Skype test call and check if you can hear it via the mixer headphones and the mixer mike is played back to you. If you are using a second PC to test in the same room, Skype's echo cancellation makes it very tricky. Also make sure that the pavucontrol input volume is set to 100% at least to start with.