Skip to main content

Making sure a daemon runs on server reboot

  • strict warning: Non-static method view::load() should not be called statically in /var/www/vhosts/litzastark.com/sites/all/modules/views/views.module on line 906.
  • strict warning: Declaration of views_handler_argument::init() should be compatible with views_handler::init(&$view, $options) in /var/www/vhosts/litzastark.com/sites/all/modules/views/handlers/views_handler_argument.inc on line 744.
  • strict warning: Declaration of views_handler_filter::options_validate() should be compatible with views_handler::options_validate($form, &$form_state) in /var/www/vhosts/litzastark.com/sites/all/modules/views/handlers/views_handler_filter.inc on line 607.
  • strict warning: Declaration of views_handler_filter::options_submit() should be compatible with views_handler::options_submit($form, &$form_state) in /var/www/vhosts/litzastark.com/sites/all/modules/views/handlers/views_handler_filter.inc on line 607.
  • strict warning: Declaration of views_handler_filter_boolean_operator::value_validate() should be compatible with views_handler_filter::value_validate($form, &$form_state) in /var/www/vhosts/litzastark.com/sites/all/modules/views/handlers/views_handler_filter_boolean_operator.inc on line 159.
  • strict warning: Non-static method view::load() should not be called statically in /var/www/vhosts/litzastark.com/sites/all/modules/views/views.module on line 906.
  • strict warning: Declaration of views_handler_filter_node_status::operator_form() should be compatible with views_handler_filter::operator_form(&$form, &$form_state) in /var/www/vhosts/litzastark.com/sites/all/modules/views/modules/node/views_handler_filter_node_status.inc on line 13.
  • strict warning: Declaration of views_plugin_style_default::options() should be compatible with views_object::options() in /var/www/vhosts/litzastark.com/sites/all/modules/views/plugins/views_plugin_style_default.inc on line 24.
  • strict warning: Declaration of views_plugin_row::options_validate() should be compatible with views_plugin::options_validate(&$form, &$form_state) in /var/www/vhosts/litzastark.com/sites/all/modules/views/plugins/views_plugin_row.inc on line 134.
  • strict warning: Declaration of views_plugin_row::options_submit() should be compatible with views_plugin::options_submit(&$form, &$form_state) in /var/www/vhosts/litzastark.com/sites/all/modules/views/plugins/views_plugin_row.inc on line 134.
Posted in

Another piece of code that I always seem to have to look up when I need it... The command for getting mysqld (or another daemon) to start up when the server reboots is chkconfig, used as follows:

chkconfig mysqld on

If you just enter chckconfig, it will output a list of the daemons and their current status:

 anacron         0:off   1:off   2:on    3:on    4:on    5:on    6:off crond           0:off   1:off   2:on    3:on    4:on    5:on    6:off dc_client       0:off   1:off   2:off   3:off   4:off   5:off   6:off dc_server       0:off   1:off   2:off   3:off   4:off   5:off   6:off httpd           0:off   1:off   2:on    3:on    4:on    5:on    6:off ip6tables       0:off   1:off   2:off   3:off   4:off   5:off   6:off iptables        0:off   1:off   2:on    3:on    4:on    5:on    6:off mdmonitor       0:off   1:off   2:on    3:on    4:on    5:on    6:off messagebus      0:off   1:off   2:on    3:on    4:on    5:on    6:off mysqld          0:off   1:off   2:on    3:on    4:on    5:on    6:off netconsole      0:off   1:off   2:off   3:off   4:off   5:off   6:off netfs           0:off   1:off   2:off   3:on    4:on    5:on    6:off netplugd        0:off   1:off   2:off   3:off   4:off   5:off   6:off network         0:off   1:off   2:on    3:on    4:on    5:on    6:off rdisc           0:off   1:off   2:off   3:off   4:off   5:off   6:off restorecond     0:off   1:off   2:off   3:off   4:off   5:off   6:off rsyslog         0:off   1:off   2:on    3:on    4:on    5:on    6:off saslauthd       0:off   1:off   2:off   3:off   4:off   5:off   6:off sendmail        0:off   1:off   2:off   3:off   4:off   5:off   6:off sshd            0:off   1:off   2:on    3:on    4:on    5:on    6:off udev-post       0:off   1:on    2:on    3:on    4:on    5:on    6:off

The columns indexed by number indicate the settings for specific runlevels; it appears that when you've turned a daemon on, it sets runlevels 1-4 to the on state.