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
0g
n00b
n00b


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

WHY?

  • 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...)

IMPORTANT
  • 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.

STEPS
  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.

    /home/chiliasp/admin/conf/admd.conf
    /home/chiliasp/admin/conf/hkey.local.machine
    /home/chiliasp/asp-server-3000/casp.cnfg
    /home/chiliasp/chilicom/lib/hkey.local.machine
    /home/chiliasp/.installed_db
    /home/chiliasp/INSTALL/.webserver-cache

  5. Add Gentoo distro detection code to INSTALL/os.pm 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.
    Code:
    cd /home/chiliasp; cat|patch -p3 # type <ctrl>-D at the end

    --- /home/chiliasp-orig/INSTALL/os.pm   2002-04-04 18:01:18.000000000 +1000
    +++ /home/chiliasp/INSTALL/os.pm        2004-05-11 01:49:01.000000000 +1000
    @@ -441,6 +441,24 @@
      DISTRIBUTION:
       while(1)
       {
    +    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?).
    Code:
    --- /home/chiliasp-orig/INSTALL/apache.pm     2002-04-04 18:01:17.000000000 +1000
    +++ /home/chiliasp/INSTALL/apache.pm    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).
    Code:
    --- /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 @@
     [/home/chiliasp/asp-server-3000]
     engine_portcount=26
    -webserver_https=no
    +webserver_https=yes
     engine_asponboot=0
     webserver_note=
    -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_major=3
    -webserver_stop_script=/etc/rc.d/init.d/httpd stop
    +webserver_stop_script=/etc/init.d/apache stop
     webserver_api=eapi
     webserver_bundled=no
     webserver_distribution=Apache
     engine_dir=/home/chiliasp/asp-server-3000
     webserver_release=1
     webserver_name=Apache
    -webserver_realhost=old.host.name.com
    -webserver_start_script=/etc/rc.d/init.d/httpd start
    +webserver_realhost=new.host.name.com
    +webserver_start_script=/etc/init.d/apache start
     webserver_type=apache
     engine_name=asp-server-3000
     webserver_root=/etc/httpd
     webserver_minor=20
    -webserver_binary=/usr/sbin/httpd
    +webserver_binary=/usr/sbin/apache
     webserver_port=80
     engine_port=3000
     webserver_module=/home/chiliasp/module/linux2_optimized/apache_1.3.20/non-standard/Cobalt/mod_casp2.so
     webserver_dso=yes
    -webserver_conf=/etc/httpd/conf/httpd.conf
    +webserver_conf=/etc/apache/conf/apache.conf
     webserver_version=1.3.20


  7. Various commands to paste into bash.
    Code:
    ln -fs /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/libstdc++.so /home/chiliasp/server/lib/linux2_optimized/libstdc++-libc6.1-1.so.2
    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/caspd.pid /home/chiliasp/admin/logs/*.pid


  8. The module, /home/chiliasp/module/linux2_optimized/apache_1.3.20/eapi/mod_casp2.so, mostly works but will seg fault in some cases, so we recompile it. First you need this patch:
    Code:
    --- /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:
    Code:
    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:
    Code:
    AddModule mod_casp2.c


  11. Add these lines to the relevant virual host(s) to enable ASP:
    Code:
    ## 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.
    Code:
    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
    Code:
    /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).
    Code:
    /home/chiliasp/asp-server-3000/caspctrl startall

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


  15. You can start or stop the admin server with,
    Code:
    /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.

POST INSTALL
  • 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.)
    Code:
    OPTION=3
    SOCKET=/your/path/to/mysqld.sock

SEE ALSO

Slackware 7 hack along the same lines,
http://www.ackind.net/chilisoft/

Possible alternative methods of hosting legacy ASP sites,
http://asp2php.naken.cc/
http://www.apache-asp.org/
http://www.go-mono.com/mbas.html
http://www.stryon.com/whatis.asp
http://wwws.sun.com/software/chilisoft/index.html

Sun's post-EOL Cobalt support statements,
http://www.sun.com/hardware/serverappliances/eol.html

Gentoo Forum threads on installing Gentoo on Intel-based Cobalts, e.g.
https://forums.gentoo.org/viewtopic.php?t=28632

Firmware for Cube 3, RaQ3 & 4 for booting 2.4 kernels,
http://sourceforge.net/project/shownotes.php?group_id=83123&release_id=203159

For more info,
ftp://ftp-eng.cobalt.com/pub/users/thockin/2.4/
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