diff --git a/doc/gnu-linux-create-user.md b/doc/gnu-linux-create-user.md index b4be9e6..9aff640 100644 --- a/doc/gnu-linux-create-user.md +++ b/doc/gnu-linux-create-user.md @@ -10,6 +10,5 @@ sudo passwd ``` * add user to sudo group\ ``` -su - -usermod -a -G sudo +sudo usermod -a -G sudo ``` diff --git a/doc/monit.md b/doc/monit.md new file mode 100644 index 0000000..9a3f3f2 --- /dev/null +++ b/doc/monit.md @@ -0,0 +1,80 @@ +# Update The System + +``` +sudo apt-get update +sudo apt-get upgrade +``` + +Once your system is updated, restart your system to make these changes take effect with the following command: + +``` +exit +login +``` + +# Installing Monit + +``` +sudo apt install monit --no-install-recommends +``` + +Once Monit is installed, start Monit service and enable it to start on boot time by running the following command: + +``` +sudo systemctl start monit +sudo systemctl enable monit +``` + +You can check the status of Monit service any time by running the following command: + +``` +systemctl status monit +``` + +Backup config and enable integrated http daemon + +``` +sudo cp /etc/monit/monitrc /etc/monit/monitrc-orgnl +sudo vi /etc/monit/monitrc-orgnl +sudo systemctl restart monit +systemctl status monit +``` + +You can see the status of Monit with the following command: + +``` +sudo monit status +``` + +To check configuration files syntax, use: + +``` +sudo monit -t +``` + +Check monitored processes summary: + +``` +sudo monit summary +``` + +Configure Monit for Apache Service + +By default Monit comes with the pre-defined template for some of process and services. You can find these templates in /etc/monit/conf-available/ directory. By default template for Apache is available in Monit. So you will only need to enable it. You can enable it by running the following command: + +``` +sudo ln -s /etc/monit/conf-available/apache2 /etc/monit/conf-enabled/ +``` + +Next, restart monit servcie to apply these changes with the following command: + +``` +sudo systemctl restart monit +systemctl status monit +``` + +To start running all of the monitored programs. + +``` +sudo monit start all +``` diff --git a/readme.md b/readme.md index a1e1224..93ae63f 100644 --- a/readme.md +++ b/readme.md @@ -19,6 +19,7 @@ * [Mastarm](doc/mastarm.md) * [Maven](doc/maven.md) * [Mongo](doc/mongo.md) +* [Monit](doc/monit.md) * [MS Teams](doc/ms-teams.md) * [NextCloud](doc/nextcloud.md) * [Node](doc/node.md)