Changeset 319

Show
Ignore:
Timestamp:
02/01/07 09:41:40 (2 years ago)
Author:
josef
Message:

- manual page for hotstuff-siteadmin
- simplify installation instructions a bit - who needs manual SQL editing anyway?

[commit from josef@nada]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/hotstuff/Makefile

    r318 r319  
    22 
    33prefix = /usr/local 
    4 webprefix = /var/www 
    5 confprefix = /etc 
     4webprefix = /usr/local/share 
     5confprefix = /usr/local/etc 
    66 
    77dprefix = $(DESTDIR)$(prefix) 
     
    1010 
    1111all: 
    12         @echo "Total installation is discouraged." 
     12        $(MAKE) install-common 
     13        $(MAKE) install-scripts 
     14        $(MAKE) install-dxs 
     15        $(MAKE) install-admin 
     16        $(MAKE) install-doc 
    1317 
    1418install-common: 
     
    3741        cp man/hotstuff-http.1 $(dprefix)/share/man/man1 
    3842        cp man/hotstuff-downloads.1 $(dprefix)/share/man/man1 
     43        cp man/hotstuff-siteadmin.1 $(dprefix)/share/man/man1 
    3944        cp man/ghnsmetatemplate.1 $(dprefix)/share/man/man1 
    4045 
     
    4449        mkdir -p $(dprefix)/share/man/man1 
    4550        cp man/hotstuff-dxs.1 $(dprefix)/share/man/man1 
     51        cp man/dxsclient.1 $(dprefix)/share/man/man1 
    4652        mkdir -p $(dprefix)/lib/cgi-bin 
    4753        cp dxs/DXS.pm $(dprefix)/lib/cgi-bin 
  • trunk/hotstuff/installation.txt

    r318 r319  
    99servers are also given for installing from source, since this might be 
    1010requires whenever a piece of software is not available. 
     11 
     12Step 0: install Hotstuff 
     13------------------------ 
     14 
     15If not yet done, all Hotstuff scripts and manual pages should 
     16be installed. A simple Makefile is included so calling 'make install' 
     17should be sufficient. This will put all of Hotstuff into directories 
     18under the /usr/local hierarchy. If this is not wanted, modify the Makefile 
     19first. 
     20 
     21If the system is new, do not forget to install tools such as less, vim, 
     22make, subversion and the like. 
    1123 
    1224Step 1: install PostgreSQL 
     
    3648---------------------------- 
    3749 
    38 The database must be created first. 
     50The database must be created first. This used to require the setup of a 
     51database and a user for it, and its initialisation with SQL schema files. 
    3952 
    40 % psql template1 
    41 CREATE USER hotstuff WITH PASSWORD 'xxx'; 
    42 CREATE DATABASE hotstuff WITH OWNER hotstuff; 
    43 /q 
     53Nowadays, the 'hotstuff-siteadmin' tool will handle this task. Call it 
     54once for a test repository, in the form: 
    4455 
    45 Afterwards, all the tables and indices must be stuffed into the database. The 
    46 corresponding schema files are shipping with Hotstuff. 
    47  
    48 % cd hotstuff/schemas/ 
    49 % psql --host=localhost --user=hotstuff --password hotstuff < hotstuff.sql 
    50 % psql --host=localhost --user=hotstuff --password hotstuff < hotstuffadmin.sql 
    51 % psql hotstuff 
    52 SELECT * FROM directory; 
    53 ... 
    54  
    55 In older versions, one might need to edit /etc/postgresql/pg_hba.conf to 
    56 replace 'indent' with 'password' for all local IP connections (IPv4 and 
    57 IPv6). 
     56% hotstuff-siteadmin add test 
    5857 
    5958Step 3: install Perl modules 
     
    9493% thttpd -p 8080 -l ...../LOG -c "/cgi-bin/*" 
    9594 
     95The web pages are stored in /usr/local/share/hotstuff-admin by default. 
     96 
    9697Step 5: configure Hotstuff 
    9798-------------------------- 
     
    100101and edited to fit the system configuration. 
    101102 
    102 % cp hotstuff/src/hotstuff.conf-dist /etc/hotstuff.conf 
    103 % vim hotstuff.conf 
     103% cp hotstuff/src/hotstuff.conf-dist /etc/hotstuff.d/foo.conf 
     104% vim /etc/hotstuff.d/foo.conf 
    104105... 
    105106 
    106 If not yet done, all Hotstuff scripts and manual pages should 
    107 be installed. A simple Makefile is included so calling 'make install' 
    108 should be sufficient. 
    109  
    110 If the system is new, do not forget to install tools such as less, vim, 
    111 make, subversion and the like. 
     107When hotstuff-siteadmin is used, the most important values are already 
     108filled out. 
    112109 
    113110Step 6: import of test data 
  • trunk/hotstuff/src/hotstuff-siteadmin

    r284 r319  
    1010        #echo "hotstuff-siteadmin info" 
    1111        echo "hotstuff-siteadmin add <reponame>" 
    12         exit 
    1312} 
    1413 
     
    1615{ 
    1716        echo "Stopped." 
    18         exit 
     17        exit 1 
    1918} 
    2019 
    2120if test -z $1 || test -z $2; then 
    2221        help 
     22        exit 1 
    2323fi 
    2424 
    2525if test $1 != "add"; then 
    2626        help 
     27        exit 1 
     28fi 
     29 
     30schema=/usr/share/hotstuff-common/hotstuff.sql 
     31conftemplate=/etc/hotstuff.conf-dist 
     32 
     33if [ ! -f $schema ]; then 
     34        echo "Error: SQL schema file '$schema' is missing." >&2 
     35        exit 1 
     36fi 
     37 
     38if [ ! -f $conftemplate ]; then 
     39        echo "Error: Configuration template '$conftemplate' is missing." >&2 
     40        exit 1 
    2741fi 
    2842 
     
    4458 
    4559mkdir -p /etc/hotstuff.d 
    46 cp /etc/hotstuff.conf-dist $conf.tmp || { 
     60cp $conftemplate $conf.tmp || { 
    4761        bailout 
    4862} 
     
    7084echo "Setting up database for $2..." 
    7185 
    72 schema=/usr/share/hotstuff-common/hotstuff.sql 
    7386su -c "psql --host=localhost --user=$owner --pass $name < $schema" postgres \ 
    7487        || bailout