Coolstack: Not just for Coolthreads

As per a previous article, I upgraded by home server to Nevada build 69, because I was about to make some changes, and wanted to be fully up to date before I did so.

I wanted to play with Confluence which is the wiki that Sun has chosen to run their wiki site. Confluence can run in a number of ways and connect to a number of different databases. Since I hadn't yet played with Postgres, I decided I would use that, and I also decided to run it using Tomcat instead of as a standalone app.

Given that I'm a bit of a neophyte when it comes to talking native SQL, I decided that I needed to run a tool of some sort to configure Postgres. I've used phpMyAdmin for MySQL for a while now, and figured there MUST be an equivalent for Postgres. Using my amazing powers of deduction, I googled phppgadmin, and lo and behold there it was: phpPgAdmin. All I needed was a php compatible webserver. Unfortunately the supplied apache2 with  Nevada isn't php ready, so I had to then decide.. do I compile myself, or do I find something easier. I vaguely remember hearing something about coolstack, which is "a collection of some of the most commonly used open source applications optimized for the Sun Solaris OS platform."

CoolStack 1.1 is available for both SPARC and x64, and contains pretty much all I needed, including tomcat. So a few downloads and pkgadds later, and I've got apache running, which means I can get phpPgAdmin running, which means I can perform my initial Postgres configuration, which means I can finally install Confluence under Tomcat, and everything's perfect. (Well it wasn't perfectly perfect, because I needed to read a couple of READMEs along the way, and a bit of on-line documentation, but it was fine.)

So, I've got tomcat listening on port 8081 as per normal and confluence sitting inside there as an applet talking happily to Postgres, and so I decide that I actually want to do the apache proxy thing so that I can have my confluence wiki appear to sit on my normal webserver port. This is quite easy to configure, you just need a few lines like this:

LoadModule proxy_module libexec/mod_proxy.so
LoadModule proxy_connect_module libexec/mod_proxy_connect.so
LoadModule proxy_ftp_module libexec/mod_proxy_ftp.so
LoadModule proxy_http_module libexec/mod_proxy_http.so
LoadModule proxy_ajp_module libexec/mod_proxy_ajp.so
LoadModule proxy_balancer_module libexec/mod_proxy_balancer.so
ProxyPass               /wiki           http://localhost:8081/wiki
ProxyPassReverse        /wiki           http://localhost:8081/wiki

(I don't actually know how many of the LoadModules I really need btw, I suspect I don't need the last 2)

Here comes the bad news. The apache2 that comes with CoolStack doesn't come with the mod_proxy.so modules, which means that I can't use it for proxying. I tried copying the  original mod_proxy.so modules to the coolstack one and loading it up, but when I tried to access the wiki, my system pretty much froze and the disks churned like mad. Had to kill the webserver to get things back to normal.

How did I fix? I reverted to the original Nevada supplied webserver, and configured the CoolStack based one to run on a different port which I can use when I want to use phpPgAdmin. At some point I'm going to have to solve the problem permanently, probably some further investigation, and trying to figure out exactly what's going wrong. But for now, its doing what I need, I just hope I don't want to run a php based app anytime soon. 

tags: 
Comments:

Have a look here about the modules, offered by the
3 Sun distributions of Apache HTTP server:

http://mail.opensolaris.org/pipermail/webstack-discuss/2007-August/000087.html

Posted by Thorleif Wiik on August 10, 2007 at 02:06 PM BST #

That's a useful comparison table. Although coolstack DOES have mod_php, which the table says it doesn't. Ideally, the sfw version should include php, and I'd be happy.

Posted by Michael Ramchand on August 10, 2007 at 04:20 PM BST #

Too bad every packages version of opensource software (sfw or coolThread/Stack) are at least 3 to 6 months late, including all the security fix thing.

Maybe Sun may spend a little more money on keeping the software up-to-date. (it took 6 months to patch SSL where every linux have it patched in the day...)

Too bad also Sun don't give any help compiling PHP on your own, so you don't have to mess up with adding more modules and patching the bad compiled once (like GD).

But the effort is worth trying :)

Posted by Prune on August 14, 2007 at 02:07 AM BST #

Cool Stack does come with a build script for PHP which you can run to rebuild it. If you install all of the libraries in CSKphplibsBundle, the build isn't too hard. But I discourage users from trying it because the build is huge.
Instead it's much easier adding a particular extension using phpize, which is what I recommend in the FAQ (http://cooltools.sunsource.net/coolstack/faq.html).

Btw, I've also posted a patch for the gd library which you can download from http://cooltools.sunsource.net/coolstack/gd-2.0.33_sparc.tar.bz2

As for Mike's original post, it is easy enough to build any apache module using apxs. See http://blogs.sun.com/shanti/entry/building_mod_jk. You can follow a similar procedure for mod_proxy.

If you come across any other deficiencies, please do let us know - we are planning the next rev of the stack.

Shanti

Posted by Shanti on August 14, 2007 at 10:50 AM BST #

Post a Comment:
Comments are closed for this entry.
About

mramcha

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today