Cherokee Web Server – Part 3 – How To Update in Ubuntu 11.04

During a review of my systems, i noticed that after i upgraded my sony 512Mb system to ubuntu 11.04, it did not have the punch i expected from the move from 10.10 and i put this down to more things happening in 11.04 than before. So i started to use Lubuntu as a more light-weight environment for my old sony as it is just a spare box we can test on. There are a choice of desktop environments when you first boot ubuntu. On the log on screen, at the bottom left, is a drop-down panel offering several desktops to choose from during boot time. I liked XFCE a lot but decided to use Lubuntu as it seemed nippy-er and looked nicer – a subjective opinion if ever there was one. 🙂

But for all that, the poor performance continued and had to look for other reasons. One problem i had when using XFCE or Lubuntu was that i could not use chicken-vnc from my Apple iMac PPC to control the sony (which has a busted keyboard and screen), so i had to forget about Lubuntu and fall-back to Gnome. I can VNC into my sony using the Gnome desktop and it works ok, but not quick.

So what else could be eating my system ? Opening a terminal, and doing a ‘ps -e’ command, there were a number of things running that i really don’t need. Update-notifier was killable as i do that often myself and on such a small system, the unexpected performance hit is unwelcome. The update manager peeks at the Ubuntu repositories every so often. So i did a ‘kill -9 1662’ cos that was it’s job number.

There was also a copy of mysql daemon running as well. Now you may remember that mysql is a database server and eats a lot of resource, so to kill that we can use the ‘service’ command to stop it.

sudo service mysql stop

Did you ever look at the swappiness value for your system ? https://help.ubuntu.com/community/SwapFaq gives us a way to look at how ubuntu uses the swap partition or swap file that’s created when we first install ubuntu. From their page, we find :

  • swappiness can have a value of between 0 and 100
  • swappiness=0 tells the kernel to avoid swapping processes out of physical memory for as long as possible
  • swappiness=100 tells the kernel to aggressively swap processes out of physical memory and move them to swap cache

cat /proc/sys/vm/swappiness
vm.swappiness=60

That was what the original install used, so i followed the above SwapFaq to change mine to zero to keep more in memory and use swap less. Subjectively, it does seem better but that could be my imagination. 🙂

Then i noticed that my old friend was still running apache2 as a web server and tomcat 6 for web services. Ouch !

Had to look up my own notes to install Cherokee. See part 1 here and part 2 here. Fortunately, i’d left myself enough hints as to how this goes when we need to install/update Cherokee. It required stopping both tomcat and apache web server.

/etc/init.d/tomcat6 stop
/etc/init.d/apache2 stop

Then to check the status of Cherokee :

/etc/init.d/cherokee status

to review the server status, and since mine was not running, i had to key:

/etc/init.d/cherokee start

then from a browser address bar to confirm Cherokee was happy, I typed:

http://localhost/about

to see something like this display below right. Of course, mine did not say 1.2.98 as the version. It had version 1.2.2, which is rather old. So it looked like an upgrade was also over-due for Cherokee. Looking back at my notes, this was going to need a change in the ubuntu sources file that identifies non-ubuntu personal package archives, or PPA’s for short.

Cherokee software sits on the Launchpad site located here and you should see something like this. In this pix below, is a red line around the most recent version of Cherokee. Notice that it says ‘natty’ which is the name for ubuntu 11.04, so this is the one i picked. You may need to do other reading about PPA security keys and the like. Anyway, this is what it takes to upgrade Cherokee to the next version.

PPA for Cherokee Web Server - Ubuntu 11.04

Ok, now have a look at the PPA screenshot below right to see Display sources.list entries for: which has a drop down next to it. Click there to reveal your choices as to which flavor of ubuntu you have. Why do that ? Well, when you click a choice the deb and deb-src entries in the text box are adjusted to the values we’ll need next.

PPA Choice of Ubuntu Flavor
PPA Choice of Ubuntu Flavor

So after clicking my choice of natty, the text box looked like this. Then copied that text to my clipboard to update the ubuntu sources.list of repositories.

PPA DEB Choices
PPA DEB Choices

Click on this image to see a bigger version.

Here is a link to more ideas about updating ubuntu repositories. I generally use the Synaptic package manager GUI for these things rather than apt-get. But look here: https://help.ubuntu.com/community/Repositories/CommandLine for more info. A terminal command line like this could be used too:

sudo gedit /etc/apt/sources.list

Now copy the deb text from your clipboard into the sources.list file and save it. You might also need to review your version to see if the PPA for cherokee has already been declared before. If so, remove the deb and deb-src for those before saving your new sources.list file.

sudo apt-get update
sudo apt-get upgrade

To download new and revised versions of software for your system, these commands should now do it. More info on apt-get here. Read part four of this series to continue this upgrade.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s