root/trunk/hotstuff/installation.txt

Revision 426, 7.2 kB (checked in by josef, 4 years ago)

- mention how to test repositories under KDE 3 and KDE 4

Line 
1Hotstuff installation instructions
2==================================
3
4This guide contains complete installation instructions for the Hotstuff
5sources. It is highly recommended to install Hotstuff from binary packages
6(e.g. on Debian) since installation from source is not trivial and requires
7some care.
8In this guide, the installation instructions of dependencies and additional
9servers are also given for installing from source, since this might be
10requires 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.
23
24Step 1: install PostgreSQL
25--------------------------
26
27Currently, only PostgreSQL is supported as the database server. On most
28distributions, it is available as a pre-configured package. In case it isn't,
29it can be installed from scratch:
30
31% wget ftp://ftp5.es.postgresql.org/mirror/postgresql/source/ \
32  v8.0.3/postgresql-base-8.0.3.tar.bz2
33% tar xvjf postgresql-base-8.0.3.tar.bz2
34% ./configure --prefix=~/postgresql
35% make && make install
36
37A database can then be initialised with the following commands:
38
39% export PATH=~/postgresql/bin:$PATH
40% export PGDATA=~/postgresql/var
41% initdb
42% postmaster
43
44Hotstuff needs a dedicated database. Its setup will be described in
45the next step.
46
47Step 2: configure PostgreSQL
48----------------------------
49
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.
52
53Nowadays, the 'hotstuff-siteadmin' tool will handle this task. Call it
54once for a test repository, in the form:
55
56% hotstuff-siteadmin add test
57
58Step 3: install Perl modules
59----------------------------
60
61All the needed Perl modules can be installed from CPAN, in case the
62distribution doesn't provide them.
63Needed are:
64* DXS common: MIME::Base64, SOAP::Lite, Data::Dumper
65* DXS server: DBI (plus DBD::Pg module)
66* DXS client: DateTime, XML::DOM, Getopt::Long, Term::Shell, LWP::Simple
67* DXS client, optionally: Crypt::SSLeay, Term::Readline
68* GHNS scripts: a few of those of DXS, plus: XML::Writer, CGI
69
70* extra since 0.9.2: Date::Parse, DateTime
71
72% cpan
73...
74% export PERL5LIB=~/perl/lib/perl5/site_perl/5.8.6
75% perl -MCPAN -e "install XML::DOM"
76% perl -MCPAN -e "install DBD::Pg"
77% perl ...
78
79Step 4: configure Apache
80------------------------
81
82Apache, or equivalent web servers, should provide Hotstuff as a virtual
83host. However, this is not strictly necessary. There will be five different
84areas where web access to Hotstuff is needed or wanted:
85- the CGI scripts, which means hotstuff-dxs for DXS access and hotstuff-stuff
86  for providing the GHNS feeds
87- the admin interface (which ships with Hotstuff)
88- the user interface, called Cocodrilo, which can be installed anywhere since
89  it will interface with Hotstuff via HTTP
90- a WebDAV folder for uploads, when no FTP is used
91- the download area for the data and preview files and the provider file
92
93An example for an alternative web server would be:
94
95% thttpd -p 8080 -l ...../LOG -c "/cgi-bin/*"
96
97The web pages are stored in /usr/local/share/hotstuff-admin by default.
98See below for notes on the admin interface.
99
100Step 5: configure Hotstuff
101--------------------------
102
103The Hotstuff configuration template file must be copied to /etc
104and edited to fit the system configuration.
105
106% cp hotstuff/src/hotstuff.conf-dist /etc/hotstuff.d/foo.conf
107% vim /etc/hotstuff.d/foo.conf
108...
109
110When hotstuff-siteadmin is used, the most important values are already
111filled out.
112
113Step 6: import of test data
114---------------------------
115
116A Hotstuff database is useless without actual data. The hotstuff-scan tool
117usually looks for uploads and imports them into a database. It can however
118also process download feeds from other GHNS providers and fetch the referenced
119files for import. This is usually the easiest way to get some initial data.
120
121% wget http://download.kde.org/khotnewstuff/wallpaper/wallpaper.xml
122% hotstuff-scan -s wallpaper.xml -f
123
124Depending on the configuration, the second step may need to be performed as
125root.
126
127Step 7: Versioning
128------------------
129
130If the test data worked sufficiently, e.g. by pointing a GHNS implementation
131such as KNewStuff to it or by using the Cocodrilo web frontend, some advanced
132topics can be tackled. The first of them is versioning. Versioning is enabled
133in this step, afterwards the procedure of step 6 (the import of test data)
134should be repeated. The download directory as specified in hotstuff.conf will
135be used as the checkout directory.
136
137There are two ways of using hotstuff-versioning: As a transparent backend for
138conventional uploads (such as FTP, HTTP or WebDAV), and as a gateway to the
139Hotstuff database for when all data is already maintained in a version control
140system such as SVN.
141
142The first way works as follows:
143
144% hotstuff-versioning --setup /repository
145
146% (cd directory && svn status)
147% hotstuff-versioning -c hotstuff.conf
148
149What hotstuff-versioning does is that it looks for newly added files for the
150repository and adds versioning meta data to them. Files are placed into the
151checkout directory (equal to download directory) by hotstuff-scan which finds
152the files in the upload directory.
153
154The second way works as follows:
155
156No local repository is assumed, since the second way should work transparently
157with remote repositories. Similarly to the first way, the download directory
158equals the checkout directory. However, hotstuff-versioning doesn't look for
159locally added files to the checkout directory which are placed there by
160hotstuff-scan. Instead, it runs "svn update" or an equivalent command, and for
161each changed meta file invokes hotstuff-scan on its own, with the option to
162not remove any meta files and not move any preview or payload files.
163
164A cron job running every 10 minutes or so would execute the following command
165for each Hotstuff site:
166
167% hotstuff-versioning -c hotstuff.conf --repo
168
169One must ensure that the repository URL leads to an anonymous checkout. Also,
170the upload URL must be equal to the download URL so that hotstuff-scan can find
171the checked-out files. Finally, the actual repository URL must be given in the
172configuration file.
173
174Step 8: Desktop eXchange Service (DXS)
175--------------------------------------
176
177Running 'dxsclient' should be sufficient to test the DXS capabilities on the
178command line. The web service URL can be given as a parameter, and should
179point to the location of the hotstuff-dxs script.
180
181Step 9: Administration frontend
182-------------------------------
183
184The hotstuff-admin frontend is currently not well developed. In order to make
185use of it, copy htconf-dist to .htconf and fill out its values for one
186particular repository. (Only one can be administered at a time right now.)
187
188Step 10: Test
189-------------
190
191Under KDE 3, run 'khotnewstuff <providerurl>'.
192
193Under KDE 4, run 'khotnewstuff4 <file.knsrc>. This file must at least contain the
194following information:
195        [KNewStuff2]
196        ProvidersUrl=<providerurl>
197and must be placed in KDE's configuration directory, e.g. $KDEHOME/share/config.
Note: See TracBrowser for help on using the browser.