49ed axeorcat: Linux
Go to content Go to navigation Go to search

Ubuntu Server Setup Edgy to Feisty

Upgrading from Edgy to Feisty went like clockwork, to use an archaic analogy.

At time of writing this gave me newer releases of a lot of important packages I use:

Feisty 7.04 released 2007/4/19
Kernel: 2.6.20-15
Libc6: 2.5-0ubuntu14
apache2: 2.2.3-3.2
mysql-server-5.0_5.0.38
postgresql-server: 8.2_8.2.3-3
php: 5.2.1-0ubuntu1
python: 2.5.1
ruby: 1.8.5-4
gnome: 2.18.1-0
sun-java: 6-00-2

Edgy 6.01 released 2006/10/26
Kernel: 2.6.17-10
libc6: 2.4
apache2: 2.0.55-4
mysql-server: 5.0_5.0.24a-9
posgresql-server: 8.1_8.1.4
php: 5.1.6
python: 2.4.3
ruby: 1.8_1.8.4-5
gnome: 2.16.1-0
sun-java: 1.5.0-08

Only slight manual intervention was requried for postgres which gives instructions during the upgrade to the console. Basically you just run pg_upgradecluster and remove pg 8.1 when it’s all looking good. To use the JDK package it can help to set JAVA_HOME to /usr/lib/jvm/java-6-sun in your profile.

Ubuntu Desktop setup

Install Sun’s JDK

You will need to accept the license manually so first you may need to set debconf to use an interactive confirmation method
dpkg-reconfigure debconf
If you do not do this, installation may fail with the error “sun-dlj-v1-1 license could not be presented
Next install the software
sudo aptitude install sun-java5-jdk
We’re not quite there still because default Ubuntu comes with gcj installed so you need to tell it to use Sun’s JVM as an alternative.
By default, about 80 of the executable files under /usr/bin are actually symlinks to files under /etc/alternatives which are managed by update-alternatives
sudo update-alternatives --config java
After selecting Sun’s JVM, the symlink under /etc/alternatives will change from
java -> /usr/lib/jvm/java-gcj/jre/bin/java
to
java -> /usr/lib/jvm/java-1.5.0-sun/jre/bin/java
If you still have problems with gcj getting in the way you can remove it with apt-get remove -purge java-gcj-compat

Multimedia players/codecs

Ubuntu wiki page. (if using adept make sure you tick unsupported and proprietary software boxes, and select packages from all)

Amarok has no sound
Easily fixed by installing “xine extra plugins” (libxine-extracodecs)

totem cannot play back xvid AVIs etc
Easily fixed by installing gstreamer plugins packages.

install realplayer so I can watch BBC news ;)
dpkg -i realplayer_10.0.7-0.0_i386.deb Now it works nicely in Firefox after a restart.

Configuration

KDE hotkeys
For some reason this is under “System Settings”->“Regional and Accessibility”

_ Change KDE single click to double click_
Compulsory for selecting multiple files. Do this in mouse settings.

Getting Tomcat native APR to work

2006-08-04 19:56:02,750,INFO,main,,,,,,,The Apache Tomc
at Native library which allows optimal performance in production environments was not found on the jav
a.library.path: /usr/java/jdk1.5.0_05-b05/jre/lib/i386/server:/usr/java/jdk1.5.0_05-b05/jre/lib/i386:/
usr/java/jdk1.5.0_05-b05/jre/../lib/i386:/usr/X11R6/lib:/usr/java/jai-1_1_2/lib

Change foreground colour for gnome panel

Transparent panels are great in principle but they are not very readable in GNOME with black text.

Luckily GNOME widgets can be customized in a common way, as long as you know the right class names.

Just edit your .gtkrc-2.0 file in your home directory (create it if one does not exist) and set the colors that work for you. For example, a bright white text for inactive buttons and a blackish text for the active button is set as follow:

style "panel"
{
  fg[NORMAL]               = "#ffffff"
  fg[ACTIVE]               = "#0f0f0f"
  bg[ACTIVE]               = "#C0C0C0"
}
widget "<strong>PanelWidget</strong>" style "panel"
widget "<strong>PanelApplet</strong>" style "panel"
class "<strong>Panel</strong>" style "panel"
widget_class "<strong>Mail</strong>" style "panel"
class "<strong>notif</strong>" style "panel"
class "<strong>Notif</strong>" style "panel"
class "<strong>Tray</strong>" style "panel"
class "<strong>tray</strong>" style "panel"

Thanks to gnome support

memcached

Spent a while looking at memcached as its simplicity and cross platform nature is very appealing. It’s something you just make a socket to and dump some data into, and it just keeps it in memory. Problem is that memcached itself doesn’t do much other than that – put stuff in memory and define a protocol.

Some of the work you’d expect of a cacheing solution is left to the client implementation. Talking of which I tried out the perl and the java versions. The java client is bigger than you might think as it contains non-blocking code with quite complicated thread queues. Not sure I’d want that bloat in my application, but sensibly the default getInstance returns a blocking instance by default. The java client is not the worst code I’ve ever seen but it’s not exactly great either. There’s quite a lot of repetition, especially the code which sends each call type over the network. No big deal, I or anyone else could easily tidy it up and optimize it.

From previous experience I expect the overhead of all the non-blocking client code is actually not worth it, and that was confirmed by a (very simple) test class I wrote.

The perl test application I wrote performed better than the Java one in general. I expect this is due to some bloat in the Java client. In particular the Java client performed very poorly for large cache values, whilst the perl client scaled O(1).

For PHP, perl and so on, memcached could be useful just running on the same box as a semi persistent store for cross request data sharing, but you need to keep a very close eye on the client code, and probably write your own wrapper to implement all the other cache stuff you need in practice.

For Java, there are great cacheing solutions that run in-process of course, like ehcache, which I have had good results with (although I haven’t benchmarked them much yet), and several Java distributed cache solutions.

ubuntu gcc install authentication warning

After doing a

sudo apt-get install build-essential

I got

WARNING: The following packages cannot be authenticated! linux-kernel-headers libc6-dev cpp-4.0 cpp gcc-4.0 gcc libstdc+6-4.0-dev g+-4.0 g++ make dpkg-dev build-essential. Install these packages without verification [y/N]? y

So I installed it anyway.

Installing Ubuntu on a new Tecra M5 laptop

Get kubuntu linux configured on brand new Tecra M5 laptop

Mysql user debian-sys-maint

There’s a mysql user called debian-sys-maint

Linux Video: dvd::rip, mencoder, mp4

Linux gpac/x264/mp4/mpeg4ip/mplayer etc

Ubuntu 5.1 on Tecra 9000

Smooth install of Ubuntu 5.1 on an old Tecra 9000 laptop.

Moving to apache2 and mod_jk the debian way

Moving to debian package installation of apache2 and configuring mod_jk (NOT mod_jk2!)

Wierd apt behaviour when downgrading

You need to remove a default release line from your apt conf:

APT::Default-Release “stable”;

in order to downgrade packages. Dont ask me why.

I performed successful downgrade from testing to stable for all my production servers that needed it using the pinning priority technique. Needed just a handful of manual apt-get install XXX/stable commands on top. Sweet.

Linux PC installs: first Ubuntu release fails

Tecra 9100
Ubuntu warthog – install failed, said it couldnt proceed without floppy disk..
Tried pre-release Ubuntu hedgehog on Tecra 9100 – failed for same reason.
Fedora Core 2 installed fine

My Akasa PC
Ubuntu warthog – failed, said it couldnt detect the CDROM drive. The CDROM drive is a standard Sony CRX300a which shouldnt cause any probs.
pre-release Ubuntu hedgehog failed for same reason.
Fedora Core 2 installed fine

X - VNC

vncserver issues

misc errors

Misc error info.

Problems with CVS on vm0 and Tomcat symlinks

CVS server on vm0 kept leaving lock files around. Happened after couldnt get port 22 to vm0. There was some kind of file IO error on a particular file which was screwing everything up. Fixed by removing that file from CVS repository and readding it via cvs. The server had obviously got v confused by something low level.

Tomcat failed to follow symlinks so added the usual context resource entries. Interestingly, the allowLinking didnt work if the docBase was set to “” in the default context but was fine with a proper full path docBase in a named context.

0