Popular just now

ad1

Webmin installation of Apache and MySQL randomly stop on CentOS

One of the things that I do rarely is creating and configuring a Linux OS and web server for a client. Especially a Virtual Private Server. In the print business most servers are Microsoft Windows machines and I typically find myself doing a lot of these. But a few weeks ago a friend wanted a tester for his new VPS hosting service and I volunteered. But many things that I never encountered before had to be fixed.



I decided to use the CentOS image when creating a server instance. I also went with Webmin Virtualmin. This is where things started to get irritating. The CentOS image and Webmin work fine but there are many things that happen automatically when using the Ubuntu image that have to be done manually on CentOS. Auto-starting the Apache and MySQL services does not happen because the configuration Webmin delivers to CentOS is incomplete. So here's what to look for and fix when your Apache server and others like MySQL seem to randomly stop.

Check the configuration:

[root@ ~]# chkconfig --list httpd
httpd              0:off    1:off    2:off    3:off    4:off    5:off    6:off

There are no autostart on settings so add some and check them:

[root@ ~]# chkconfig --level 23 httpd on


[root@ ~]# chkconfig --list httpd
httpd              0:off    1:off    2:on    3:on    4:off    5:off    6:off


Now do the same for MySQL and any other service that should persist through a server restart or cleanup procedure.

[root@ ~]# chkconfig --list mysql
error reading information on service mysql: No such file or directory
[root@ ~]# chkconfig --list mysqld
mysqld             0:off    1:off    2:off    3:off    4:off    5:off    6:off
[root@ ~]# chkconfig --level 23 mysqld on
[root@ ~]# chkconfig --list mysqld
mysqld             0:off    1:off    2:on    3:on    4:off    5:off    6:off
[root@ ~]#



No comments:

Post a Comment