The above message indicate that all the configuration files are correctly entered. Stop program = “/usr/bin/systemctl stop rvice” Start program = “/usr/bin/systemctl start rvice” The output will be as below: Configuration file for syslog:Ĭheck process syslogd with pidfile /var/run/syslogd.pid You have to confirm your filesystem before entering the name. If failed port 3306 protocol mysql then restart Configuration file for Disk monitoring:Ĭheck filesystem disk1 with path /dev/xvda1 Start program = “/etc/init.d/mysql start” If failed port 22 protocol ssh then restart Configuration file for Mysql:Ĭheck process mysqld with pidfile /var/run/mysqld/mysqld.pid Stop program “/usr/bin/systemctl stop rvice” Start program “/usr/bin/systemctl start rvice” If failed port 80 protocol http then restart Configuration file for ssh: vi /etc/monit.d/sshdmonitorĬheck sshd with pidfile /var/run/sshd.pid Configuration file for HTTP:Ĭheck process httpd with pidfile /var/run/httpd/httpd.pid To configure the services which we want to monitor with monit we have to add seperate configuration files under the directory /etc/monit.d/ in which default configuration looks for extra configuration files. Monit home page will look like this: Configure services for monitoring with monit Use the username and password mentioned before. Open web browser and go to the below address: Use address localhost # only accept connection from localhostĪllow localhost # allow localhost to connect to the server andĪllow admin:monit # require user ‘admin’ with password ‘monit’Īllow # allow users of group ‘monit’ to connect (rw)Īllow readonly # allow users of group ‘users’ to connect readonlyįrom the settings, monit will listen on 2812 admin user with password monit will able to access the web interface from any network. Look for httpd port 2812, modify the following entries. Open monit configuration file /etc/monitrc. By default, monit listens on 2812 port, but it needs to be set up. Monit provides a web interface for process monitoring. Set logfile syslog Set up monit web interface This can be altered as per your need by changing the below line.Ĭhange log file by editing the following line: The main configuration file is /etc/monitrcīy default, monit is set to check the services at an interval of 1 min. Once monit is installed, you can add programs and processes to the configuration file. Start monit by using the following command. Monit is able to do automatic maintenance, repair, and run meaningful causal actions in error situations. With Monit, system status can be viewed directly from the command line, or via the web browser. Monit is a free, open source process supervision tool for Linux like operating systems. Try creating this file and saving it in your $HOME as. startx will obey the directives in ~/.Xclients if it exists (it does not by default). Installing gnome without gdm will be impossible, but that does not mean you have to use it. Change the 5 to a 3 and you will no longer boot straight into X. There are probably some comments that go with it. Look in /etc/inittab for this line: id:5:initdefault: CentOS still uses a SysV style init system. With regard to booting to console and using startx, this is just a matter of setting the default runlevel. There is also a minimal install CD that will get you a very small base That said, I notice this remark here under "CentOS 6 Releases": If you want to end up with anything involving GNOME at all though, this probably won't make much difference, and it is a hassle. If your space is so that tight this is a concern, then you will need to find a minimal install sans X and build up from there. The stuff you are talking about won't amount to much on disk, maybe 1/2 GB or so at most.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |