Newer
Older
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
[[_TOC_]]
## Installation Wiki.js
1. Follow the wiki.js instructions from https://docs.requarks.io/install/linux
1. Currently, we run the wiki service in screen.
1. Add 3000 port number in ```config.yml```
```yaml
port: 3000
db:
type: sqlite
```
1. Add a port number of 3000 in the firewall
```bash
sudo firewall-cmd --zone=public --add-port=3000/tcp --permanent
sudo firewall-cmd --reload
```
1. Run ```node server```
### Backup
Daily Backups should be enabled, and the backup data are located in ```/local/wiki/backup```
### for Development
To develop REST API accessed to wiki.js, use the graphql playground.
* http://ddcode-srv1:3000/graphql
## Installation mmonit/monit for monitoring the server
1. Install monit(agent) and mmonit(web server) from https://mmonit.com/monit/ and https://mmonit.com/download/ respectively
2. Edit monit/conf/monitrc and copy ~/.monitrc to configure the communication with mmonit
```bash
## Check the apache server process
check process apache with pidfile /var/run/httpd/httpd.pid
if cpu > 60% for 2 cycles then alert
if cpu > 80% for 5 cycles then alert
if totalmem > 200.0 MB for 5 cycles then alert
if children > 250 then alert
if disk read > 500 kb/s for 10 cycles then alert
if disk write > 500 kb/s for 10 cycles then alert
if 3 restarts within 5 cycles then unmonitor
group server
## Check the shiny server process
check process shiny with pidfile /var/run/shiny-server/shiny-server.pid
if cpu > 60% for 2 cycles then alert
if cpu > 80% for 5 cycles then alert
if totalmem > 2000.0 MB for 5 cycles then alert
if children > 250 then alert
if disk read > 500 kb/s for 10 cycles then alert
if disk write > 500 kb/s for 10 cycles then alert
if 3 restarts within 5 cycles then unmonitor
group server
```
3. Edit mmonit/conf/server.xml to communicate with in the localhost
```bash
<Connector address="localhost" port="8080" processors="10" /> # For only local communication
<Connector address="*" port="8080" processors="10" /> # For all users in public
```
4. Run mmonit and monit
```bash
mmonit start
monit start
```