[webdev] hello world
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Hey, I have the default openacs-provided, aolserver-served web page
(title: "the ACLUG community") up on my screen. Roughly speaking, this
means the yucky part (getting the tools to work) is mostly done, and
the fun part (building up website content) can start.
Here are my rough notes on configuration so far. Let me know if you have
any comments/suggestions/questions. If you want to see this, get in touch
with me. Maybe in a couple of days we can move it onto a connection? One
more schedule thingy: I'm leaving this Friday for approx. two weeks, so
it would be good to get it up and online before then. (Share the fun, so
to speak.)
---------------------------------------------------------------------------
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:
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 "the ACLUG community"
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
----------------------------------------------------------------------------
df -k:
Filesystem 1k-blocks Used Available Use% Mounted on
/dev/sda5 381139 69269 292192 20% /
/dev/sda1 46636 6260 37968 15% /boot
/dev/sda3 925008 180148 697872 21% /home
none 63172 0 63172 0% /dev/shm
/dev/sda2 2522076 782868 1611092 33% /usr
/dev/sda6 256667 77074 166341 32% /var
/dev/cdrom 715840 715840 0 100% /mnt/cdrom
--
/*
* Tom Hull * thull at kscable.com * http://www.tomhull.com/
*/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [webdev] hello world,
Tom Hull <=
|
|