I'm wanting to start a database server every time that the RedHat machine reboots (not whenever a user logs in). Which file do I need to add the startup command to?
Let's assume that you've installed "MySQL" database software via RPM package.
On RedHat systems, this installs the script "mysqld" in "/etc/rc.d/init.d/"
To enable this to be started and stopped at bootup and shutdown, you would enter this command
"chkconfig --add mysqld 35 on"
This tells the chkconfig program (unique to RedHat I believe) to add/register the mysqld script to the automated handling of the init process on runlevels 3 and 5, and to turn on/enable the service at boot (otherwise it would be registered but left off). For RedHat, runlevel 3 is text and 5 is GUI (I believe this is still true these days).
Also, you are not starting a "server", it is a service. The server is the big box it's running on. You might also call it a daemon in more directed unix/linux parlance. However, "service" will do nicely.
However, I don't seem to have chkconfig installed (unless it's not part of the PATH and I need to be in a specific directory to run it. It's not in /bin. I downloaded the .tar.gz file, gunzipped and tarred it but till couldn't get it installed. Is there a way to create the symbolic links without using chkconfig. I have tried ln -s but that also doesn't seem to do the trick.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.