-
Notifications
You must be signed in to change notification settings - Fork 2
/
README-DEV
120 lines (80 loc) · 3.16 KB
/
README-DEV
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
The purpose of this document is to provide instructions for preparing a setup
that can be used to develop the NewsGate Server.
By now the development binary package (containing the reqired compile and
runtime dependencies for the NewsGate server) is installed, Elements library
is built. We suposed to result with the following directory tree structure:
~/projects
Elements
NewsGate
Server
SiteConfig
Workspace
If by some reason you decide to change the directory structure the following
instructions and configuration files must be changed respectivelly.
Compilation
-----------
Clone the Server and change the current directory to the project's one.
$ cd ~/projects
$ mkdir NewsGate
$ cd NewsGate
$ git clone [email protected]:newsgate/Server.git
$ cd Server
Run OpenSBE script which creates configure script.
osbe
Create the build output directory as well as default.config file with the
compilation options that should be used for the build. You can use cpp
preprocessor to generate such a configuration file from default.config.t
template passing some controlling macros to the preprocessor (read comments in
default.config.t for details). You can also adjust specific compile options
in the generated configuration file.
$ mkdir build
$ cpp -DDEBUG -DARC_x86_64 -DORB_TAO -DELEMENTS_SRC=~/projects/Elements \
-DELEMENTS_BUILD=~/projects/Elements/build default.config.t > \
./build/default.config
Now you can generate Makefiles corresponding to your compile options.
cd build
../configure --enable-no-questions=yes
make -j8
Configuration
-------------
Clone the Server configuration and change the current directory to the
project's one.
$ cd ~/projects/NewsGate
$ git clone [email protected]:newsgate/SiteConfig.git
$ cd SiteConfig/Template
Run OpenSBE script which creates configure script.
osbe
$ mkdir build
Create default.config file.
$ cpp -DHOST=$HOSTNAME -DSSH_KEY=~/.ssh/adkey -DELEMENTS_SRC=~/projects/Elements \
-DELEMENTS_BUILD=~/projects/Elements/build \
-DNEWSGATE_SRC=~/projects/NewsGate/Server \
-DNEWSGATE_BUILD=~/projects/NewsGate/Server/build \
-DNEWSGATE_WORKSPACE=~/projects/NewsGate/Workspace default.config.t > \
./build/default.config
Run configure.
$ cd build
$ ../configure --enable-no-questions=yes
@@ For some reason configure script doesn't work properly in the interactive
(default) mode. Should be some osbe bug.
# Remove old configuration if present.
#
$ rm -r -f ~/projects/NewsGate/Workspace/etc
$ make install destdir=~/projects/NewsGate proddir=/Workspace \
sysconfdir=/Workspace/etc
$ cp ~/projects/NewsGate/Server/VERSION \
~/projects/NewsGate/Workspace/etc/NewsGate
Management
----------
Prior the first run you need to unpack dictionaries in the Elements library:
$ cd ~/projects/Elements/dict
$ for f in *.gz; do gunzip -c $f >${f%.*}; done
Now you can start NewsGate:
$ cd ~/projects/NewsGate/Workspace/etc
$ ./newsgate.sh start
The first start is slower than the next ones as the management script creates
the database on the first run.
$ ./newsgate.sh status
$ lynx localhost:7180 # End-user WEB interface.
$ lynx localhost:7181 # Admin WEB interface (username admin, pass admin).
$ ./newsgate.sh stop