[[_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 ```