Cherokee Web Server References

Had a spare minute to pass along some of the many links we’ve used to keep tabs on Cherokee. If you need more detail about Cherokee, please look here :

and

http://www.cherokee-project.com/doc/cookbook_php.html

The following items may cover details posted elsewhere on this blog:
http://usefulubuntu.blogspot.com/2010/06/install-cherokee-from-ppa.html

http://www.cherokee-project.com/doc/basics_installation_unix.html#APT

http://ubuntuforums.org/showthread.php?t=1751879

https://launchpad.net/ubuntu

// debian runlevel config tool
http://www.linux.com/directory/Software/Debian-Runlevel-Configuration-Editor-%28rcconf%29/details

// launchpad ppa archives for cherokee on ubuntu
https://launchpad.net/~cherokee-webserver/+archive/ppa
// which suggests addling the following lines to your sources.lst

deb http://ppa.launchpad.net/cherokee-webserver/ppa/ubuntu natty main
deb-src http://ppa.launchpad.net/cherokee-webserver/ppa/ubuntu natty main
Signing key: 1024R/EBA7BD49 (What is this?)
Fingerprint: 0AD0B667B67DAA477F5FF89F51BB8E83EBA7BD49

How do I use software from a PPA?

To start installing and using software from a Personal Package
Archive, you first need to tell Ubuntu where to find the PPA.

Important: The contents of Personal Package Archives are not checked
or monitored. You install software from them at your own risk.

Adding the PPA to Ubuntu 9.10 (Karmic) and later

If you’re using the most recent version of Ubuntu (or any version from
Ubuntu 9.10 onwards), you can add a PPA to your system with a single
line in your terminal.

Step 3: You’ll see that the text-box directly below reads something like this:

deb http://ppa.launchpad.net/gwibber-daily/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/gwibber-daily/ppa/ubuntu jaunty main

Copy those lines.

Step 4: Open a terminal and type:

sudo gedit /etc/apt/sources.list

This will open a text editor containing the list of archives that your
system is currently using. Scroll to the bottom of the file and paste
the lines you copied in the step above.

Save the file and exit the text editor.
Step 5: Back on the PPA’s overview page, look for the Signing key
heading. You’ll see something like:

1024R/72D340A3 (What is this?)

Copy the portion after the slash but not including the help link; e.g.
just 72D340A3.

Step 6: Now you need to add that key to your system so Ubuntu can
verify the packages from the PPA. In your terminal, enter:

sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys 72D340A3

Replace 72D340A3 with whatever you copied in the step 5.

This will now pull down the PPA’s key and add it to your system.

Step 3: Now, as a one-off, you should tell your system to pull down
the latest list of software from each archive it knows about,
including the PPA you just added:

sudo apt-get update

Now you’re ready to start installing software from the PPA!

and

// notes on installing cherokee
http://www.howtoforge.com/installing-cherokee-with-php5-and-mysql-support-on-ubuntu-9.04

The PPA location you can use to download Cherokee: // how to get latest cherokee PPA into the sources https://launchpad.net/~cherokee-webserver/+archive/ppa

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

The final part of this saga follows as I forgot to tell you about the issues in upgrading a Cherokee version, if you have already had a prior version installed. You read in a previous post how there might be an artifact in the sources.list pointing to an older PPA archive for Cherokee. In that file, it was necessary to remove the DEB and DEB-SRC entries for the Cherokee PPA.

Another issue arose when clicking the Apply button in Synaptic. This was a report of a conflict between the existing /etc/apt/cherokee.conf and a new version that was to be installed for version 1.2.98. I was given a choice to keep the existing version or replace the existing version. So before taking that choice, pulled up a terminal session, changed directories to /etc/cherokee and did a

sudo mv cherokee.conf cherokee.conf.bak

to preserve my old settings. Needed to be root to get over the security bits. Then click the
replace button to do the deed.

I’m going to ‘diff’ the two versions and report back to you when the differences can be identified. I’m rather sure that these differences relate to the server and vserver entries created in the existing version as now under 1.2.98, Cherokee does not ‘see’ any of those settings, so conclude this .conf file has those settings. More later.

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

Now we have our repositories updated and upgraded, we can use a friendly GUI like Synaptic package manager. Find it here under System > Administration > Synaptic Package Manager then click that.

Synaptic Package Manager
Synaptic Package Manager
Cherokee Modules Available in Synaptic Package Manager
Cherokee Modules Available in Synaptic Package Manager

The screenshot below is how mine looked after the upgrade. Cherokee was used in the search box to choose only those components used by Cherokee.

This screenshot (click to grow) was taken after the upgrade so it shows the installed version of Cherokee modules as 1.2.98 though before the upgrade, it showed version 1.2.2. I could then right click on each module to pull up the ‘Mark’ menu.

At that point ‘Mark for Upgrade’ was an active choice shown in white text. Just clicked it to mark for upgrade on each cherokee module with a green box. Clicked the ‘Apply’ checkmark at the top of the screen and since this system had an active internet connection, synaptic found the correct cherokee PPA repository and downloaded the marked modules.

 


 

 

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 Cherokee web server 1.2.98 display which gives us a confirmation that cherokee has been successfully upgraded to this later version :

Cherokee /About Confirmation Page
Cherokee /About Confirmation Page

Now one last piece of this puzzle will be revealed in part five of this series.

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.

Cherokee Web Server – Part 2

Why wouldn’t the PHP pages display correctly in my browser ? Found the answer here: http://www.cherokee-project.com/doc/cookbook_php.html

Just looked at this post again and feel that it’s too short of screen shots of the cherokee admin panels and tabs. Check back again soon as i hope to have additional panel views to guide you further on this venture. 🙂

We need the cherokee-admin feature,  so from a terminal command line type:

cherokee-admin -b

then open a browser and in the address bar, type:

http://localhost:9090

to bring up the cherokee admin feature. The whole idea is simple once you see how, look across top for the VSERVER icon and click that. Down the left side is a list of your virtual servers, i only have one, so it’s called default. Click that to see a set of tabs like BASIC, HOST MATCH, BEHAVIOR, etc. Click the BEHAVIOR choice then at the bottom is RULE MANAGEMENT button. Click that.

This will take you to a BEHAVIOR panel with a + sign which you click. This opens a dialog of different kinds of servers you could install. Click LANGUAGES to see choices of PHP and .NET, etc. Click PHP then click ADD button at bottom.

You may need to use a terminal session to find out if you have FAST CGI features. In terminal, type:

php-cgi -v

to see your featureset. If you see (cgi-fcgi) then you have fast cgi processing available to you.

Back on the BEHAVIORS panel you should now see Extensions PHP on the left and on the right side, your handler can now be FAST-CGI

Finally be sure to click the SAVE button at top of admin panel. You can choose a graceful server restart. In a browser address type:

http://localhost/about

just to see if things are running ok. Mine was not. So i tried stopping and restarting the server. From a terminal session, type:

/etc/init.d/cherokee status

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

/etc/init.d/cherokee stop

then:

/etc/init.d/cherokee start

then from a browser address bar, typed:

http://localhost/info.php

to bring up a full panel of cherokee server stats about PHP. Sit back, have a cuppa and admire your work 🙂

Cherokee Web Server on Ubuntu 10.10

Hello world 🙂

Started reading a tutorial on web servers and seems like apache is not the only game in town. Cherokee offers some amazing speed improvements above those of apache and it is much better at scaling up for large volumes of hit. This article was in LXF142 – March, 2011 issue of  LinuxFormat from www.TuxRadar.com

So thought i might try it. I have an old Sony laptop FX501, 256MB memory & 1GZ cpu with a blitzed keyboard and cracked display panel – no i cannot read it, but did manage to install ubuntu 9.04 some time ago and after sorting out the problems with the broadcom pcmcia wireless connection, i could use Chicken-VNC from my iMac PPC. This iMac baby has a beautiful 19″ swing-arm display panel, so it’s short on horse-power and 768MB of memory is slow, but the keyboard is brill as is the display panel. So started upgrading my old sony, did backups – you DO take backups don’t you ???

Have now loaded further modules onto the sony and it is now at ubuntu 10.10 and soon to become ubuntu 11.04 when released.

To do a proper install, have to use ubuntu terminal to stop both apache and tomcat6 which run at system BOJ.

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

Did a Cherokee server install using the instructions here :

http://www.howtoforge.com/installing-cherokee-with-php5-and-mysql-support-on-ubuntu-9.04

have created a test php page as described called /var/www/info.php, did

chmod a+x info.php
chmod 777 info.php

just to avoid permission issues.

killed both apache and tomcat servers, then did:

/etc/init.d/cherokee start

which worked ok and started Opera browser, then keyed this in my browser address bar :

http://localhost

to confirm cherokee is running ok. Then when i try

http://localhost/info.php

it does not send the php file thru the parser, but brings up a DOWNLOADING FILE dialog, to let me save the source.

Think i may need to change a config table somewhere to make it happen, but where ???

REFERENCES: