Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Migrate Sun Chilisoft ASP sites from Cobalt to Gentoo
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message

Joined: 11 Feb 2004
Posts: 9
Location: Melbourne, Australia

PostPosted: Wed Jun 02, 2004 4:54 pm    Post subject: Migrate Sun Chilisoft ASP sites from Cobalt to Gentoo Reply with quote

How to migrate the Sun Chilisoft Active Server Pages package from Cobalt RaQ 4 to Gentoo


  • Sun has EOL'd the Cobalts, and will only fix security related bugs for another 18 months (see links below).
  • The upgrade to ASP 4 supports several distros explicitly, but Gentoo isn't amongst them. Legacy web sites may not need the extra functionality to justify the cost of the upgrade.
  • Gentoo offers a new lease of life for the Cobalt RaQ4 hardware (I haven't tried it, but it is reported to work).
  • I don't trust the RedHat/Cobalt/Sun installer not to hose my Gentoo server (a sandbox may help, I don't know enough to say. Yes, an ebuild would be nice...)

  • This note describes how to transplant the Sun Java (aka Chilisoft) Active Server Pages 3.6.2 package as installed on a Cobalt RaQ 4 (AMD-K6-III, glibc 2.1.3) onto a Gentoo system (Pentium III, gcc-3.3.2-r5, glibc-2.3.2-r9, linux 2.4.26, apache 1.3.31). Other combinations of hardware and software have not been attempted (and may or may not have binary compatibility issues).
  • If you encounter such problems, it should be possible to create a chroot using an x86 or pentium III stage tarball and install and run apache and chiliasp etc there. Again, this is untried. If you are converting your RaQ to Gentoo, binary compatibility should not be a problem, given the right choice of libraries.
  • Migration of optional tool packages has not been attempted.
  • Sun Java ASP plays nicely with my Gentoo box. However, I can't be held responsible for any damage or loss caused by your following these instructions.

  1. Use the system maintenance panel on the donor Cobalt RaQ to update to the latest bundled ASP (3.6.2 works).

  2. Copy /home/chiliasp and /var/opt/casp/chili.ini from the donor to the recipient server. Please don't ask me for a copy.

  3. (Optional) Add or remove virtual sites in /home/chiliasp/asp-server-3000/casp.cnfg

    This can be done using the admin console later, but note that the admin console doesn't detect any vhosts that are defined in an Included apache config file if the <Include> directive uses a relative path to the config file. You may wish to add the new server's name as a virtual host. Of course, no virtual web server name changes in config files are required if the recipient server is also going to receive the donor's web site(s).

  4. If different, change the hostname from the donor to recipent everywhere it appears in the files listed below.


  5. Add Gentoo distro detection code to INSTALL/ You can try pasting the following, but patch(1) can be picky about tabs and spaces in the indentation. If it barfs you'll have to use an editor.
    cd /home/chiliasp; cat|patch -p3 # type <ctrl>-D at the end

    --- /home/chiliasp-orig/INSTALL/   2002-04-04 18:01:18.000000000 +1000
    +++ /home/chiliasp/INSTALL/        2004-05-11 01:49:01.000000000 +1000
    @@ -441,6 +441,24 @@
    +    if (-e "/etc/gentoo-release") {
    +      $Details{distribution} = "Gentoo";
    +      $Details{distribution_flavor} = "Gentoo";
    +      if (open(GENTOO,"</etc/gentoo-release")) {
    +        my $line = <GENTOO>;
    +        $line =~ s/[^0-9]*([0-9]+\.[0-9]+).*/$1/;
    +        my $gentoo = $line;
    +        if ($gentoo =~ /[0-9]+/) {
    +          $Details{distribution_version} = $gentoo;
    +        }
    +      }
    +      $Details{package_formats} = ["ebuild"];
    +      last DISTRIBUTION;
    +    }
         if (-e "/etc/mandrake-release") {
           $Details{distribution} = "Mandrake";
           $Details{distribution_flavor} = "RedHat";

    The following patch may be needed in case the installer modules are ever invoked again (who knows?).
    --- /home/chiliasp-orig/INSTALL/     2002-04-04 18:01:17.000000000 +1000
    +++ /home/chiliasp/INSTALL/    2004-05-14 16:27:00.000000000 +1000
    @@ -16,6 +16,15 @@
        LINUX        =>
    +    GENTOO      =>
    +    {
    +     webserver_root             => "/etc/apache",
    +     webserver_binary_root      => "/usr/sbin",
    +     webserver_conf             => "/etc/apache/conf/apache.conf",
    +     webserver_start_script     => "/etc/init.d/apache start",
    +     webserver_stop_script      => "/etc/init.d/apache stop"
    +    },
         REDHAT      =>
          webserver_root             => "/etc/httpd",

  6. Make Gentoo specific changes to /home/chiliasp/.installed_db This can't be piped into patch unless it matches your existing settings (note the hostname).
    --- /home/chiliasp-orig/.installed_db 2003-01-22 04:42:33.000000000 +1100
    +++ /home/chiliasp/.installed_db        2004-05-14 17:41:11.000000000 +1000
    @@ -1,28 +1,28 @@
    -webserver_status_script=/home/chiliasp/INSTALL/apachectl "binary=/usr/sbin/httpd" "conf=/etc/httpd/conf/httpd.conf" status
    +webserver_status_script=/home/chiliasp/INSTALL/apachectl "binary=/usr/sbin/apache" "conf=/etc/apache/conf/apache.conf" status
    -webserver_stop_script=/etc/rc.d/init.d/httpd stop
    +webserver_stop_script=/etc/init.d/apache stop
    -webserver_start_script=/etc/rc.d/init.d/httpd start
    +webserver_start_script=/etc/init.d/apache start

  7. Various commands to paste into bash.
    ln -fs /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/ /home/chiliasp/server/lib/linux2_optimized/
    chown -R root:root /home/chiliasp
    chmod -R o-w /home/chiliasp
    chmod 640 /home/chiliasp/admin/conf/service.pwd
    chmod 666 /home/chiliasp/admin/web/odbc/driversdb/QEDBF.INI /home/chiliasp/caspdoc/QEDBF.INI /home/chiliasp/caspsamp/perrosdata/QEDBF.INI
    chgrp nobody /home/chiliasp/admin/conf/service.pwd
    cp /dev/null /home/chiliasp/admin/logs/server
    cp /dev/null /home/chiliasp/admin/logs/access
    cp /dev/null /home/chiliasp/logs/error-3000
    cp /dev/null /home/chiliasp/logs/installer_errors
    cp /dev/null /home/chiliasp/logs/server-3000
    rm -f /home/chiliasp/INSTALL/.virtualsites-cache.Cobalt /home/chiliasp/logs/*.gz /home/chiliasp/admin/logs/ /home/chiliasp/admin/logs/*.pid

  8. The module, /home/chiliasp/module/linux2_optimized/apache_1.3.20/eapi/, mostly works but will seg fault in some cases, so we recompile it. First you need this patch:
    --- /home/chiliasp-orig/module/source/build/mod_casp2.c    2002-04-04 18:01:28.000000000 +1000
    +++ /home/chiliasp/module/source/build/mod_casp2.c 2004-05-18 00:03:28.000000000 +1000
    @@ -31,7 +31,7 @@
     #endif /* !WIN32 */
     /* chiliasp dispatcher interface        */
    -#include "dispint.h"   
    +#include "/home/chiliasp/module/source/build/dispint.h"   
     /* setup version number and include headers */
     /* for backwards compatability                          */

  9. Next (re-)emerge apache 1.3:
    MY_BUILTINS=--add-module=/home/chiliasp/module/source/build/mod_casp2.c emerge \<=net-www/apache-2

  10. Add this line to /etc/apache/conf/apache.conf:
    AddModule mod_casp2.c

  11. Add these lines to the relevant virual host(s) to enable ASP:
    ## Sun Chili!Soft ASP installer
    AddHandler chiliasp .asp
    AddHandler chiliasp .asa
    CaspLib /home/chiliasp/asp-server-3000

  12. Add the ExecCGI flag to the Options directive for the relevant virtual host(s). If you want to read the online documentation or test the sample apps, add these Alias directives to your vhost config.
    Alias /casp401k /home/chiliasp/caspsamp/401K/content
    Alias /caspsamp /home/chiliasp/caspsamp
    Alias /caspagent /home/chiliasp/caspsamp/friendship/agent/content
    Alias /spicepack_samples /home/chiliasp/caspsamp/spicepack_samples
    Alias /caspdoc /home/chiliasp/caspdoc
    Alias /caspclient /home/chiliasp/caspsamp/friendship/client/content

  13. Restart Apache
    /etc/init.d/apache restart

  14. Start the ASP server (this should go in an init script, if you don't want to create one, modify apache's).
    /home/chiliasp/asp-server-3000/caspctrl startall

    To stop it,
    /home/chiliasp/asp-server-3000/caspctrl stopall

  15. You can start or stop the admin server with,
    /home/chiliasp/admtool -s # start it up
    /home/chiliasp/admtool -e # shut it down

  16. Having started the admin server, you should be able to point your web browser to the admin control panel URL that admtool reports on startup (given no rules in your firewall blocking TCP port 5100). Configure to taste.

  • Run the diagnostics (and demos) to make sure it all works.
  • Secure your ASP server settings (no parent paths, inherit user security, etc).
  • Block the admin server port at your firewall.
  • Change admin users and/or passwords using /home/chiliasp/admtool interactively (run it with no arguments).
  • (Tip) MySQL DSNs can use socket files. Add the following to the settings for a MySQL DSN in /home/chiliasp/asp-server-3000/odbc.ini if you want that. (This means you can tell mysql to skip-networking.)


Slackware 7 hack along the same lines,

Possible alternative methods of hosting legacy ASP sites,

Sun's post-EOL Cobalt support statements,

Gentoo Forum threads on installing Gentoo on Intel-based Cobalts, e.g.

Firmware for Cube 3, RaQ3 & 4 for booting 2.4 kernels,

For more info,
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum