-
Notifications
You must be signed in to change notification settings - Fork 1
/
INSTALL
134 lines (92 loc) · 4.43 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
PREREQUISITES
-------------
CUWI requres CWB binaries and CWB::CQP perl module, which is
_not_ available on CPAN.
Please build and install the CWB binaries from this page:
http://cwb.sourceforge.net/download.php#cwb
Please install the Perl-CWB base package (no other perl modules are
needed for CUWI and CWB::Model) from this page:
http://cwb.sourceforge.net/download.php#perl
Alternatively, you can install the developer branch (with UTF-8
support), again only CWB::CQP perl module is needed:
svn co https://cwb.svn.sourceforge.net/svnroot/cwb/cwb/trunk cwb
svn co https://cwb.svn.sourceforge.net/svnroot/cwb/perl/trunk cwb-perl
See CWB Developer' page for more info:
http://cwb.sourceforge.net/developers.php#svn
INSTALLATION
------------
When CWB binaries and CWB::CQP module are installed, you can install
CUWI. Note that the tests will warn you if the cqp executable,
CWB::Config or CWB::CQP are not accessible.
You can install CUWI using CPAN:
cpan install CWB::CUWI
You can install manually by downloading the source from the repository
and running the provided build stripts. (CUWI depends on Mojolicious,
which has no out-of-core dependencies, and on CWB::CQP for backend
communications. Please see the relevant documentation for both
installation procedures: )
wget https://github.com/kvorg/CUWI/tarball/master -O cuwi.tar.gz
tar xvf cuwi.tar.gz
cd kvorg-CUWI*
perl Build.PL
./Build install
If you wish to install in a different location, replace the last line
with:
./Build install install_base=/path/to/cuwi/install
When upgrading, you my wish to uninstall the previous version to avoid
version clashes with modules:
./Build install uninst=1
See Module::Build for more info.
If you wish to deploy cuwi without installation, you can:
* copy the lib/ directory, cuwi script, and config file (from examples/)
to your deployment location
* copy Mojolicious lib directory in the same location as lib-extra
* adjust PERL5LIB env variable to help cuwi script find its modules
* copy Mojolicious' hypnotoad script for preforking server support,
if needed
CONFIGURATION
-------------
CUWI uses the CWB::Model module, which needs to be able to find your
registries. You can rely on CWB::Config, use CORPUS_REGISTRY
environment variable or set the value in cuwi.conf (see
examples/cuwi.conf). The latter two options expect a colon-delimited
list of registry directories. Unlike CWB itself, cuwi will ignore
registry files that look like editor backups and will try to parse
corpus info files for additional information to deduce corpus encoding
and generate help/tool-tip information. However, you should use the
standard CWB way of statint corpus encoding and language to help CQP
3.2.*.
See CWB::CUWI::Administration pod/man and CWB::Model pod/man for details.
CUSTOMIZATION AND DEPLOYMENT
----------------------------
For deployment information, see Mojolicious::Guides::Cookbook.
For customization, see Mojolicious::Guides::Rendering and cuwi help
inflate.
See also: cuwi generate help, cuwi help daemon, Mojo::Server::Hypnotoad
and Mojolicious or http://mojolicio.us/.
See CWB::CUWI::Administration, CWB::Model pod/man section on corpus
info file information and cuwi pod/man's section on virtual corpora if
you need to configure the behaviour of individual corpora
Examples:
---------
* Development mode (single server, low performance, informative error
pages):
PERL5LIB=./lib cuwi daemon --listen http://*:3000
(see cuwi help daemon for more options)
* Production mode pre-forking server (aka Hypnotoad, see
Mojolicious::Guides::Cookbook/Hypnotoad for info on configuration,
and Mojo::Server::Hypnotoad for more info:
# edit cuwi.conf to your leisure to configure the server
mkdir log # enables logging
# start pre-forking server:
PERL5LIB=./lib path-to-mojolicious-bin/hypnotoad cuwi
# repeat command to restart (hot-deploy) the server
# kill preforking server
PERL5LIB=./lib path-to-mojolicious-bin/hypnotoad -s cuwi
For production in other deployment modes such as plackup, plackup with
modperl, cgi, fastcgi and preforking server behind a proxy (nginx,
apache), see Mojolicious::Guides::Cookbook. In most cases, you need to
configure the environment and Mojolicious will figure out the rest to
deploy CUWI inside.
See doc/examples/cuwi-init.d-fedora for an example of a traditional
Fedora GNU/Linux init.d script for CUWI running on Hypnotoad.