Changeset 319
- Timestamp:
- 02/01/07 09:41:40 (2 years ago)
- Files:
-
- trunk/hotstuff/Makefile (modified) (4 diffs)
- trunk/hotstuff/installation.txt (modified) (4 diffs)
- trunk/hotstuff/man/hotstuff-siteadmin.1 (added)
- trunk/hotstuff/src/hotstuff-siteadmin (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/hotstuff/Makefile
r318 r319 2 2 3 3 prefix = /usr/local 4 webprefix = / var/www5 confprefix = / etc4 webprefix = /usr/local/share 5 confprefix = /usr/local/etc 6 6 7 7 dprefix = $(DESTDIR)$(prefix) … … 10 10 11 11 all: 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 13 17 14 18 install-common: … … 37 41 cp man/hotstuff-http.1 $(dprefix)/share/man/man1 38 42 cp man/hotstuff-downloads.1 $(dprefix)/share/man/man1 43 cp man/hotstuff-siteadmin.1 $(dprefix)/share/man/man1 39 44 cp man/ghnsmetatemplate.1 $(dprefix)/share/man/man1 40 45 … … 44 49 mkdir -p $(dprefix)/share/man/man1 45 50 cp man/hotstuff-dxs.1 $(dprefix)/share/man/man1 51 cp man/dxsclient.1 $(dprefix)/share/man/man1 46 52 mkdir -p $(dprefix)/lib/cgi-bin 47 53 cp dxs/DXS.pm $(dprefix)/lib/cgi-bin trunk/hotstuff/installation.txt
r318 r319 9 9 servers are also given for installing from source, since this might be 10 10 requires whenever a piece of software is not available. 11 12 Step 0: install Hotstuff 13 ------------------------ 14 15 If not yet done, all Hotstuff scripts and manual pages should 16 be installed. A simple Makefile is included so calling 'make install' 17 should be sufficient. This will put all of Hotstuff into directories 18 under the /usr/local hierarchy. If this is not wanted, modify the Makefile 19 first. 20 21 If the system is new, do not forget to install tools such as less, vim, 22 make, subversion and the like. 11 23 12 24 Step 1: install PostgreSQL … … 36 48 ---------------------------- 37 49 38 The database must be created first. 50 The database must be created first. This used to require the setup of a 51 database and a user for it, and its initialisation with SQL schema files. 39 52 40 % psql template1 41 CREATE USER hotstuff WITH PASSWORD 'xxx'; 42 CREATE DATABASE hotstuff WITH OWNER hotstuff; 43 /q 53 Nowadays, the 'hotstuff-siteadmin' tool will handle this task. Call it 54 once for a test repository, in the form: 44 55 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 58 57 59 58 Step 3: install Perl modules … … 94 93 % thttpd -p 8080 -l ...../LOG -c "/cgi-bin/*" 95 94 95 The web pages are stored in /usr/local/share/hotstuff-admin by default. 96 96 97 Step 5: configure Hotstuff 97 98 -------------------------- … … 100 101 and edited to fit the system configuration. 101 102 102 % cp hotstuff/src/hotstuff.conf-dist /etc/hotstuff. conf103 % vim hotstuff.conf103 % cp hotstuff/src/hotstuff.conf-dist /etc/hotstuff.d/foo.conf 104 % vim /etc/hotstuff.d/foo.conf 104 105 ... 105 106 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. 107 When hotstuff-siteadmin is used, the most important values are already 108 filled out. 112 109 113 110 Step 6: import of test data trunk/hotstuff/src/hotstuff-siteadmin
r284 r319 10 10 #echo "hotstuff-siteadmin info" 11 11 echo "hotstuff-siteadmin add <reponame>" 12 exit13 12 } 14 13 … … 16 15 { 17 16 echo "Stopped." 18 exit 17 exit 1 19 18 } 20 19 21 20 if test -z $1 || test -z $2; then 22 21 help 22 exit 1 23 23 fi 24 24 25 25 if test $1 != "add"; then 26 26 help 27 exit 1 28 fi 29 30 schema=/usr/share/hotstuff-common/hotstuff.sql 31 conftemplate=/etc/hotstuff.conf-dist 32 33 if [ ! -f $schema ]; then 34 echo "Error: SQL schema file '$schema' is missing." >&2 35 exit 1 36 fi 37 38 if [ ! -f $conftemplate ]; then 39 echo "Error: Configuration template '$conftemplate' is missing." >&2 40 exit 1 27 41 fi 28 42 … … 44 58 45 59 mkdir -p /etc/hotstuff.d 46 cp /etc/hotstuff.conf-dist$conf.tmp || {60 cp $conftemplate $conf.tmp || { 47 61 bailout 48 62 } … … 70 84 echo "Setting up database for $2..." 71 85 72 schema=/usr/share/hotstuff-common/hotstuff.sql73 86 su -c "psql --host=localhost --user=$owner --pass $name < $schema" postgres \ 74 87 || bailout
