-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL
146 lines (106 loc) · 4.51 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
135
136
137
138
139
140
141
142
143
144
145
===== Build dependencies =====
* gcc (>= 6.1) or clang (>= 3.8)
* cmake (>= 3.4)
* libfcgi (>= 2.4)
* qtbase (>= 5.4)
* gzip
===== Runtime dependencies =====
* Libraries:
* libfcgi
* libqt5core
* Command-line programs:
* spawn-fcgi
* zip
===== Some configuration options =====
* -DWITH_SYSTEMD_SUPPORT={ON, OFF} (default: ON)
* -DSYSTEMD_UNIT_FILES_DIR={...} (default: /lib/systemd/system/)
* -DCMAKE_INSTALL_PREFIX=/usr
* -DCMAKE_BUILD_TYPE={Release, RelWithDebInfo, Debug, MinRelSize}
* -DCMAKE_CXX_COMPILER=/usr/bin/g++
* -DCMAKE_CXX_FLAGS="-s -Os -fdata-sections -ffunction-sections -fPIC -D_FORTIFY_SOURCE=2 -static-libgcc"
* -DCMAKE_EXE_LINKER_FLAGS="-Wl,--gc-sections -Wl,--strip-all -Wl,--as-needed"
===== Installation =====
mkdir -p builddir
cd builddir
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr ..
make
sudo make install
===== Basic configuration files =====
* /etc/sibuserv/webui-launcher.conf
* /etc/sibuserv/webui-settings.json
For better perfomance place "cache_directory" and "sessions_directory" on SSD
or even in RAM (tmpfs).
===== Launching sibuserv-webui daemon using systemd =====
sudo systemctl daemon-reload
sudo systemctl enable sibuserv-webui
sudo systemctl restart sibuserv-webui
At first launch sibuserv-webui will unpack embedded resources into specified
directories (see "config_directory" and "cache_directory" variables in
webui-settings.json config). By default:
* /home/sibuserv/.config/sibuserv-webui
* /home/sibuserv/.local/share/sibuserv-webui/cache
===== Configuring FastCGI in Nginx =====
* If you want to use Sibuserv Web UI as part of your basic website:
http://localhost/build-server/
http://<your-domain-name>/build-server/
when edit nginx config (for example, /etc/nginx/sites-available/default)
where you need to paste something like this:
server {
listen 80 default;
listen [::]:80 default;
location /build-server/ {
fastcgi_pass localhost:35827;
include /etc/nginx/fastcgi_params;
}
}
And do not forget to edit /etc/sibuserv/webui-settings.json
where you need to change "prefix_string" variable:
"prefix_string": "/build-server/",
* If you want to use Sibuserv Web UI as separate website on specific domain name:
http://build-server.local/
http://build-server.<your-domain-name>/
when edit Nginx config (for example, /etc/nginx/sites-available/default)
where you need to paste something like this:
server {
listen 80;
listen [::]:80;
server_name build-server.local;
location / {
fastcgi_pass localhost:35827;
include /etc/nginx/fastcgi_params;
}
}
And do not forget to edit /etc/sibuserv/webui-settings.json
where you need to change "prefix_string" variable:
"prefix_string": "/",
* Attention! It is strongly recommended to use HTTPS for connecting to Web UI.
Even self-signed SSL certificate is much better for security than plain HTTP
connections.
To force HTTPS usage you need to configure Nginx accordingly. And do not
forget to edit /home/sibuserv/.config/sibuserv-webui/common-settings.json
config in text editor or using "/settings" page at website:
"https_only": true,
* Also it is a good idea to enable gzip compression for your web site for
reducing a size of transferred files and for decreasing the time of pages
loading as a result of this.
Edit Nginx config (for example, /etc/nginx/sites-available/default)
where you need to paste something like this:
gzip on;
gzip_proxied any;
gzip_comp_level 9;
gzip_types text/plain text/css text/javascript \
application/javascript application/x-javascript application/json;
===== Adding website users =====
su sibuserv --command 'sibuserv-webui --add-user'
or
sudo --user sibuserv sibuserv-webui --add-user
All user configs are stored in <config_directory>/users/ subdirectory.
By default: /home/sibuserv/.config/sibuserv-webui/users/
Since JSON format is used there you may edit user configs in any text editor.
Once you add website user with admin privileges and signing in as this user you
will be able to add and edit other user configs at "/settings/users" web page.
User passwords are stored in a enough secure way: they are hashed using
PBKDF2-SHA256 with more than 400 000 iterations. If you want to speed up users
authorization process or decrease the system load, just decrease the value of
"rounds" variable in src/settings/usersettings.cpp and recompile the program.
For updating user passwords use command-line tool or Web UI.