Complete.Org: Mailing Lists: Archives: webdev: March 2002:
[webdev] updated HostNotes
Home

[webdev] updated HostNotes

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: webdev@xxxxxxxxx
Subject: [webdev] updated HostNotes
From: Tom Hull <thull@xxxxxxxxxxx>
Date: Thu, 28 Mar 2002 11:25:32 -0600
Reply-to: webdev@xxxxxxxxx

This is the latest/greatest HostNotes file for the new webserver, most of
which I've posted previously:

-----

Notes on machine configuration:

Installed KRUD Red Hat 7.2:
  -- no mouse
  -- used default disk partitions
  -- all ext3 file systems
  -- selected server package
      -- deselected classic X (mistake: later loaded parts; mostly I wanted
         to run emacs using a remote X-server)
      -- selected database server
  -- grub loader (big mistake: later installed lilo)
  -- selected medium firewall with some exceptions (mistake: later reran
       lokkit to disable firewalling)
  -- set up root, user: tom

Post-install packages:

  -- deleted:
       leafnode
       wwwoffle
  -- added:
       apache, -devel, -manual
       emacs-X-11
       htdig
       lynx
       Mesa
       mod_auth_any, mod_auth_mysql, mod_auth_pgsql, mod_bandwidth,
         mod_dav, mod_perl, mod_python, mod_ssl, mod_throttle
       php, -manual, -mysql, -pgsql
       postgresql-devel, -tcl
       switchdesk
       Xaw3d
       XFree86, -100dpi-fonts, -75dpi-fonts, -xdm
       xinitrc

Network Setup:

  -- configured fixed IP address for local network, gateway, dns servers at
       kscable.com
  -- add local machines to /etc/hosts
  -- edited /etc/hosts.allow to allow local machines
  -- edited /etc/xinetd.d/telnet to enable

  NB ftp works as client but not server
  NB expect all of this to change when machine is moved to internet

Users:

  -- create a user identity for managing/running aolserver:
       useradd -c 'AOLServer Administrator' nsadmin
  -- create a user identity for managing cvs archive:
       useradd -c 'CVS Administrator' cvs
  -- probably need to create new user accounts for all users who need to
       be able to write to cvs repository

CVS Setup for openacs:

  -- initialize cvs repository:
       cvs -d /home/cvs/cvs init
       chown -R cvs.cvs /home/cvs/cvs
  -- unpack openacs archive:
       tar zxvf openacs-3.2.5.tgz
       mv openacs-3.2.5 openacs
  -- import openacs into cvs:
       su cvs
       export CVSROOT=/home/cvs/cvs
       cvs import -m 'openacs 3.2.5' openacs aclug start
  -- permissions on cvs (need to research this better: even anonymous
         users need to be able to write lock files)
       chmod -R a+w /home/cvs/cvs
  -- create and populate the website area: /home/aclug/openacs/www
       mkdir /home/aclug
       chown nsadmin.nsadmin /home/aclug
       su nsadmin
       cd /home/aclug
       export CVSROOT=/home/cvs/cvs
       cvs checkout openacs
       Notes:
         this can be updated any time cvs changes by re-running checkout
         early development can be done by editing in place, testing, checkin;
           longer term I'd expect to test most changes separately, then
           checkin, then update website area
         in addition to managed pages this creates CVS subdirectories,
           which should be invisible to website users
         need to review permissions issues
         this assumes that everything in website is in cvs/openacs; I'm
           not sure what happens if we try to merge other cvs checkouts
           (probably it confuses cvs diff/checkin); we should be able to
           make derived files without confusing cvs
  -- TODO: write website update script; write admin interfaces for cvs
       repository, including adding new users; any need for cvsweb-type
       UI?

PostgreSQL:

  -- installed 7.1.3 from RPMs
  -- initialize database:
       /etc/rc.d/init.d/postgresql start
       check that postmaster is running: ps -fu postgres
       NB: this set up /var/lib/pgsql/data, which currently only has 180MB
         free disk space; need to monitor this
       optional test:
         su - postgres
         createdb mydb
         psql mydb
  -- create user nsadmin:
       su - postgres
       createuser --createdb --adduser nsadmin
  -- create database:
       su - nsadmin
       createdb --username nsadmin --password aclug
       NB: subsequent calls of "psql aclug" have not prompted for password;
         don't quite understand this; maybe password is only needed if not
         actual user.
  -- load database schema:
       su - nsadmin
       cd /home/aclug/openacs/www/install
       ./load-geo-tables aclug
       cd /home/aclug/openacs/www/doc/sql
       check path in postgres.sql:
         uncomment lines 10-11: /usr/lib/pgsql/plpgsql.so
         comment lines 13-14: /usr/local/pgsql/lib/plpgsql.so
         NB: original source version assumes latter path (postgresql typically
           built from sources); cvs version will assume former path (installed
           from RPMs); this effectively reverses the install instructions
       psql -f load-data-model.sql aclug 2>datamodel.txt
         NB: the redirection file captures any errors; stdout does to tty,
           which echoes lots of CREATE, INSERT, etc. statements
       grep -i error datamodel.txt:
         psql:bookmarks.sql:69: ERROR:  ProcedureCreate: procedure chr
           already exists with same arguments [1]
         psql:wp.sql:488: ERROR:  RemoveFunction: function
           'wp_num_public_slides_owned(int4)' does not exist [2]
         psql:wp.sql:501: ERROR:  RemoveFunction: function
           'wp_num_public_slides_collaborat(int4)' does not exist [2]
         NB: investigation of these errors indicates that database is OK;
           changes as noted below result in no errors on rebuild (clean
           grep -i error):
           [1] comment out function chr(int4) in bookmarks.sql (function
               built into postgresql 7.1, which caused conflict)
           [2] these functions are preemptorily dropped before create to
               prevent redefinition; the error messages indicate that the
               drop was not needed
           the changes will be checked into cvs version
  -- tried to add pl/tcl language:
       createlang pltcl aclug:
         failed: /usr/lib/pgsql/pltcl.so: undefined symbol: Tcl_CreateSlave
       NB is this because postgresql RPM built without --with-tcl? RPM for
         postgresql-tcl is installed
  -- enable start-up on boot:
       /sbin/chkconfig postgresql on

Aolserver:

  -- downloaded aolserver-3.4.2 (from www.aolserver.com)
  -- gmake
       warnings (v. make.out):
         subscript has type char:
           tcl7.6/generic/tclBasic.c [1238]
           tcl7.6/generic/tclParse.c [332, 516, 642, 646, 734, 797]
         variable may be used before initialized:
           tcl7.6/generic/tclDate.c [1066]
         variable may be uninitialized:
           thread/pool.c [746]
         passing argument with different width than prototype:
           tcl8.3.2/generic/tclIOSock.c [57: ntohs]
           tcl8.3.2/unix/tclUnixChan.c [1792, 1839, 2413: ntohs; 2148: htons]
         initialization of incompatible pointer type:
           tcl8.3.2/unix/tclUnixChan.c [235, 254, 273]
           tcl8.3.2/unix/tclUnixPipe.c [71]
         passing arg as signed due to prototype:
           tcl8.3.2/unix/tclUnixFCmd.c [1093, 1144: Tcl_NewIntObj]
         long unsigned int format, __mode_t arg:
           tcl8.3.2/unix/tclUnixFCmd.c [1193]
         comparison is always false due to limited range of data type:
           nscp/nscp.c [417, 418, 421]
         use of "tmpnam" is dangerous, better use mkstemp:
           nsd/tclfile.c [502]
         use of "mktemp" is dangerous, better use mkstemp:
           nsd/tclfile.c [393]
       didn't try to fix these, although most should be trivial to fix
         (unlikely that any will actually fail)
       BSAFE variable not set, nsssl module not built; needs RSA Security
         product; couldn't find binary on www.aolserver.com.
  -- mkdir /usr/local/aolserver
  -- gmake install INST=/usr/local/aolserver
       v. make-install.out
  -- downloaded pgdriver-2.0.1 (from www.openacs.org)
       edit makefile:
         INSTALL=/usr/local/aolserver
         NSHOME=/usr/local/aolserver
         PGLIB=/usr/lib
         PGINC=/usr/include/pgsql
         CC=gcc
         COPTS=-fpic -shared -I$(PGINC) -I($NSHOME)/include -I-/usr/include
         note: latter defined under "Red Hat Linux with RPM PostreSQL"
       make
       make install
  -- chown -R nsadmin.nsadmin /usr/local/aolserver
  -- test installation at this point using sample-config.tcl file:
       su nsadmin
       cd /usr/local/aolserver
       bin/nsd -k -t sample-config.tcl
       use ps to verify 5 nsd processes
       use curl, lynx or other browser to access default file
       more log/server.log

Configuring OpenACS/AOLServer:

  -- edit /usr/local/aolserver/nsd.tcl config file, starting from openacs
       sample file:
         set serverdesc "ACLUG"
         set pageroot /home/aclug/openacs/www
       # nsssl: not handled yet
         ns_section "ns/server/${server}/tcl":
           ns_param library "/home/aclug/openacs/tcl"
         ns_section "ns/db/pools":
           s/OpenACS/ACLUG/g
         ns_section "ns/db/pool/main" +
         ns_section "ns/db/pool/log" +
         ns_section "ns/db/pool/subquery":
           ns_param DataSource localhost::aclug
           ns_param Password ...
       # nscp (copied from sample-config.tcl):
         set nscp_port 9999
         set nscp_addr 127.0.0.1
         set nscp_user ""
         ns_section "ns/server/${server}/modules":
           commented out: ns_param nsjava
         source /home/aclug/openacs/parameters/aclug.tcl
  -- create initial aclug.tcl from ad.tcl
       cd /home/aclug/openacs/parameters
       cp ad.tcl aclug.tcl
       cvs new -m 'initial copy from ad.tcl' aclug.tcl
       cvs update
  -- edit /home/aclug/openacs/parameters/aclug.tcl
       ns_section ns/server/${server}/acs:
         ns_param SystemName "ACLUG"
         ns_param PublisherName "ACLUG"
       note: this publishes mail addresses (@[ns_info hostname]):
         webmaster
         root
         bboard-robot
         contestprogrammer
         support-ticket-robot
         robot
  -- run aolserver, and verify default openacs web page:
       su root
       cd /usr/local/aolserver
       bin/nsd -k -u nsadmin -g nsadmin -t nsd.tcl
       run browser, check page; looks like "the ACLUG community" with login
  -- check initial openacs changes back into cvs
       su nsadmin
       cd /home/aclug/openacs
       export CVSROOT=/home/cvs/cvs
       cvs commit -m 'initial staging changes'
       cvs update
       NB actually, I did a cvs diff first to verify the changes
  -- bootstrap registration:
       register myself as user (login, logout)
       login as system, add myself as Site Administrator, logout
  -- set up aolserver to be automatically respawned:
       edit /etc/inittab, add line:
         as:2345:respawn:/usr/local/aolserver/bin/nsd \
           -it /usr/local/aolserver/nsd.tcl -u nsadmin -g nsadmin
       create script to manually restart server: /usr/local/bin/nsdrestart:
         -- minimally, script reads:
              killall nsd
         -- chown root.sys /usr/local/bin/nsdrestart
         -- chmod 744 /usr/local/bin/nsdrestart
       NB main problem with using init to respawn is that a broken config
          thrashes; main reason for doing it is to try to keep website
          live even if nsd crashes
  -- still need something to recycle log files (currently huge)

Current Tuning of /home/aclug/openacs/parameters/aclug.tcl:

  -- Current changes to ns_param per ns_section {default}
     ns_section ns/server/${server}/acs/content:
       SpecialIndexPage /aclug.html
     ns_section ns/server/${server}/acs/users:
       NormalUserMaxQuota = 2 {5}
       PrivilegedUserMaxQuota = 4 {20}
  -- Cvs changes:
       -- Arrange to put aclug-specific data in www/aclug:
            cd www; mkdir aclug; cvs add aclug
  -- Administration operations:
       -- calendar:
            Defined categories: ACLUG Events, Other Events
            Added two ACLUG Events: 4/8, 5/6 meetings
            Added one comment (how to remove?)
       -- bboard:
            Defined categories: Beginners
       -- faq:
            Defined one: Linux
       -- glossary:
            Defined several: /etc/passwd, GNU, GPL
  -- Build new www/index.tcl homepage
       -- hacked tcl/ad-defs.tcl.preload to define new procs:
            aclug_head -- customize <head> ... </head>
            aclug_header -- customize top of <body>
          tied them into ad_header so they're used by almost all user
          pages (but not admin pages, different header function there).
          eventually there will be aclug_footer.
       -- mkdir www/aclug/ for aclug-specific content, including:
            ed/ -- editorial files (why_register.adp)
            img/ -- images (Title.gif, touched up from ACLUG web page)
       -- created a style sheet file: www/aclug.css
            -- added to aclug_head proc
       -- wrote new www/index.tcl prototype:
            -- banner table with Title.gif on left, text on right
            -- prominent "This is a test prototype ..." warning
            -- three column layout, with links on left, intro in middle,
               events/news on right
            -- created some little boxy things for grouping info within
               columns, similar to photo.net: Account, What's Inside,
               Developers on left; About ACLUG in middle; Events, News
               on right. Added some links to left; ripped off some text
               for middle; haven't done right yet
            -- Account check user cookie, fetches name if logged in;
               Directory link only appears if logged in; if not logged
               in, offers Register and link to Why?

-- 
/*
 *  Tom Hull * thull at kscable.com * http://www.tomhull.com/
 */


[Prev in Thread] Current Thread [Next in Thread]
  • [webdev] updated HostNotes, Tom Hull <=