Search results for linux

HOWTO Install Starling

I was recently contacted by someone who got stuck setting up Starling and realized that the documentation is relatively sparse on setting up Starling. The process is easy once you know how Starling works on the inside, but not looking in.

To get started, I will assume you have ruby and ruby gems already installed. This will depend on your flavor of distribution, but should not be difficult and come standard on every modern version of Linux I’ve used.

run:

gem install starling

Create the Starling queue directory in /var/spool/starling

Start staring with these minimum set of arguments:

/usr/bin/starling -d -h $HOST -p $PORT \ -P /var/run/starling/starling.pid

Also, if you’ll be running Starling in a PHP environment, make sure your version doesn’t have the EOL bug described in my post: http://www.osterman.com/wordpress/2008/07/18/starling-protocol-bug-in-stats-response

Also, note that Starling creates a queue file for each key verbatim. So if a key is, ‘namespace/something’, then Starling will fail to do the set if the ‘namespace’ directory does not exist under the /var/spool/starling directory. You can also just not use ‘/’ in your keys.

Also, note that Starling does not automatically purge the queue files after it rotates them. You’ll want to cron a job to run periodically to delete them. We run this nightly to purge files not accessed in 4 days:

find /var/spool/starling/ -type f -atime +4 -delete
by creating a file in /etc/cron.daily/starling with those contents.

All that being said, we’re still very happy with it and process about a million jobs a day.

Please let me know in the comments if your still having problems!

VMWare Upgrades

VMWare can be a real bore to upgrade when there are major kernel updates. Very often, the supplied modules with VMWare will not compile.

For example, I got this today:

CC [M]  /tmp/vmware-config0/vmmon-only/linux/driver.o /tmp/vmware-config0/vmmon-only/linux/driver.c:197: error: unknown field ‘nopage’ specified in initializer /tmp/vmware-config0/vmmon-only/linux/driver.c:198: warning: initialization from incompatible pointer type make[2]: *** [/tmp/vmware-config0/vmmon-only/linux/driver.o] Error 1

The solution is always to use the non-standard installer available at:

http://groups.google.com/group/vmkernelnewbies/files?pli=1

Download the latest vmware-any-any-update tarball, decompress it, and run the included runme.pl script inside. It works just like the vmware-install.pl script distributed with VMWare, but this version includes patches to make everything run without a hitch.

X.Org 7.1 on Debian with FGLRX drivers

# download the latest ati installer wget https://a248.e.akamai.net/f/674/9206/0/www2.ati.com/drivers/linux/ati-driver-installer-8.36.5-x86.x86_64.run X_VERSION=x710 LANG=C LC_ALL=C sh ati-driver-installer-8.36.5-x86.x86_64.run --buildpkg Debian/unstable # install the source (tar.bz2 file will be placed in /usr/src) dpkg -i fglrx-kernel-source_8.36.5-1_i386.deb cd /usr/src tar -jvxf fglrx.tar.bz2  cd /usr/src/linux make-kpkg --append-to-version=-2-686-smp modules_image cd /usr/src # install the kernel module and xorg driver dpkg -i xorg-driver-fglrx_8.36.5-1_i386.deb dpkg -i fglrx-kernel-2.6.16-2-686-smp_8.36.5-1+2.6.16-686-10.00.Custom_i386.deb # reboot and check with fglrxinfo

Converting a VMWare image to a RAW (ISO) Image

If you configured VMWare to use 2gb filesystem chunks, then you cannot just convert the vm.vmdk file to a raw image, you instead need to convert each chunk, then merge them together.

qemu-img  convert -f vmdk /home/e/vm/vm-s001.vmdk -O raw /tmp/vm-001.raw qemu-img  convert -f vmdk /home/e/vm/vm-s002.vmdk -O raw /tmp/vm-002.raw qemu-img  convert -f vmdk /home/e/vm/vm-s003.vmdk -O raw /tmp/vm-003.raw qemu-img  convert -f vmdk /home/e/vm/vm-s004.vmdk -O raw /tmp/vm-004.raw qemu-img  convert -f vmdk /home/e/vm/vm-s005.vmdk -O raw /tmp/vm-005.raw

 then,

cat vm-002.raw >> vm-001.raw cat vm-003.raw >> vm-001.raw cat vm-004.raw >> vm-001.raw cat vm-005.raw >> vm-001.raw

If you were successful, 

fdisk -l /tmp/vm-001.raw
 should produce a partition table
eon:/tmp# fdisk -l vm-001.raw You must set cylinders. You can do this from the extra functions menu. Disk vm-001.raw: 0 MB, 0 bytes 255 heads, 63 sectors/track, 0 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes

     Device Boot      Start         End      Blocks   Id  System vm-001.raw1   *           1         997     8008371   83  Linux vm-001.raw2             998        1044      377527+   5  Extended Partition 2 has different physical/logical endings:      phys=(1023, 254, 63) logical=(1043, 254, 63) vm-001.raw5             998        1044      377496   82  Linux swap / Solaris


  

Wikify WordPress

Test a search for linux.

Java + Firefox + Debian

Getting JAVA to work with Firefox under Debian GNU/Linux is a real pain in the ass. This is what I did to have a working java:

1. Download the j2 runtime environment (j2re) kit from SUN as RPM.
Goto: http://java.com/en/download/manual.jsp
Select: Linux RPM (self-extracting file)

2. Run the self-extracting .bin file

chmod 755 jre-1_5_0_02-linux-i586-rpm.bin

3. Download Alien to convert RPM to DEB

apt-get install alien

4. Convert the RPM file with alien:

alien j2re-1_4_2_07-linux-i586.rpm

5. Install deb:

dpkg -i j2re_1.4.2_07-1_i386.deb

6.

cd /usr/lib/mozilla-firefox/plugins
ln -s /usr/java/j2re1.4.2_07/plugin/i386/ns610-gcc32/libjavaplugin_oji.so .

7. You need to run unpack from the /usr/java/j2re1.4.2_07 directory, as:

./unpack rt.pack rt.jar
./unpack jsse.pack jsse.jar
./unpack charsets.pack charsets.jar
./unpack plugin.pack plugin.jar

8. Start firefox, and browse to about:plugins url.

OR

edit /etc/apt/sources.list, add

deb http://public.planetmirror.com/pub/ubuntu-backports/ hoary-backports main universe multiverse restricted deb http://public.planetmirror.com/pub/ubuntu-backports/ hoary-extras main universe multiverse restricted
apt-get update apt-get install sun-j2sdk1.5

restart firefox

Comprehensive Debian (unstable) /etc/apt/sources.list

deb http://orinoco-usb.alioth.debian.org/debian/ unstable/
deb http://archive.ubuntu.com/ubuntu hoary-backports main restricted universe multiverse
deb http://linux.csua.berkeley.edu/debian/ unstable main contrib non-free
deb-src http://linux.csua.berkeley.edu/debian/ unstable main contrib non-free
deb http://security.debian.org/ testing/updates main
deb http://wine.sourceforge.net/apt/ binary/
#opera web browser
deb http://deb.opera.com/opera/ unstable non-free
deb-src http://mentors.debian.net/debian unstable main contrib non-free