Install latest influxdb on Ubuntu

curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add – source /etc/lsb-release echo “deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable” | sudo tee /etc/apt/sources.list.d/influxdb.list sudo apt-get update && sudo apt-get install influxdb sudo service influxdb start nJoy 😉  

PM2 set logs to compress and expire

Referring to the github README.md https://github.com/pm2-hive/pm2-logrotate pm2 install pm2-logrotate@2.6.0 pm2 set pm2-logrotate:compress true pm2 set pm2-logrotate:max_size 10M pm2 set pm2-logrotate:retain 7 pm2 conf { “pm2-logrotate”: { “max_size”: “10M”, “retain”: “7”, “compress”: “true”, “dateFormat”: “YYYY-MM-DD_HH-mm-ss”, “workerInterval”: “30”, “rotateInterval”: “0 0 * * *”, “rotateModule”: true }, “module-db”: { “pm2-logrotate”: { “uid”: null, “gid”: null } }…