Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a question, I want to shutdown the server in order to add some memory.There are several services running in this server:Mysql,apache and so on.I want to konw do I need to stop these services at first before I run the shutdown command
On all Linux distributions I've ever used, you don't need to manually shut down services that are in packages supplied by the distro (i.e. in an RPM/DEB/whatever package). They are shut down automatically as part of the system shutdown process when you run "shutdown -h now". This would most certainly apply to services like mysql and apache.
The only things you may need to shut down manually are services that you might have written yourself, or installed in a non-standard way. Even the shutdown for these can be automated by writing startup & shutdown scripts. The exact location for these depends on the distro you are running, though (often /etc/rc.d or /etc/init.d).
I hope this helps. If not, tell us which distro you are running, so someone can try and help with more specific information.
The only things you may need to shut down manually are services that you might have written yourself, or installed in a non-standard way. Even the shutdown for these can be automated by writing startup & shutdown scripts. The exact location for these depends on the distro you are running, though (often /etc/rc.d or /etc/init.d).
Clifford
Thanks very much for the rapidly reply! The OS of that server is Ubuntu 9 64bit.I have a glance at the path
Code:
/etc/rc2.d/
I only found some scripts which filename start by "S",but no one start with"K".Dose the system can also stop these services automatically?Actrually there are only three app running in this server mysql,apache2,glassfish.I found first of them are installed in a standard way,and the other I can stop it manually.
Towards the end of the shutdown process, after the K* shutdown scripts have been run, the shutdown procedure sends signal 15/SIGTERM to all remaining process then pauses (5 seconds on Slackware) then sends signal 9/SIGKILL to all remaining processes.
The design intention is that the services/daemons that do not have K* scripts are designed to be able to shut down quickly on receipt of SIGTERM, before the SIGKILL (which cannot be ignored) mops up any remaining processes.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.