[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]
On Sun, 13 May 2007 09:13:35 +0100 Neil Winchurst <neil@xxxxxxxxxxxxxxxxx> wrote: > > Usually Apache and MySQL start at boot, not at login. > Perhaps it would be better for me to simply stop the programs in a > terminal screen. I know how shutdown mysql. Apache is the problem. > Until yesterday I didn't even know it was running all the time. > > How do I stop apache please, that is the equivalent of mysqladmin > shutdown? Why? What is the problem with apache? Normally, GNU/Linux processes take up very few resources as daemons. Without apache, http://localhost won't work. It seems more than a little pointless to stop apache at each login - if you really only want apache running when you are testing website code, you should simply remove the apache symlink from the /etc/rc$foo.d/ runlevel and start apache when you need it with: $ sudo apache2ctl start (assuming apache2) Intuitively, replacing "start" with "stop" will do what it says on the tin. :-) If you only stop apache at login without doing anything about /etc/rc $foo.d/, it will be started automatically at boot (when presumably you aren't using the computer) and stopped at login (when you are) which seems perverse. Apache normally remains running because if you want to view files from another machine on your home network, it is trivially easy to view http://192.168.0.1 etc. from anywhere else on the network, using any OS and any browser. Don't forget, you may also need to start mysql at such times too if the website code itself needs a database. This is why mysql and apache are usually both left running automatically on all machines where they are installed. I'd recommend that if you use mysql and apache at all, leave them running automatically from boot to shutdown. If you don't use them, remove the packages entirely. (use apt-get remove --purge). Take a look at the dwww package - it makes full use of http://localhost to serve up documentation (including manpages) for any -doc packages you have installed as well as any other package that includes documentation of some sort. It makes it much easier to work out what all these GNU/Linux packages and commands actually do and gives you a very good reason to run apache at all times, just like nearly everyone else who has apache installed. Apache (and mysql) are actually (IMHO) next to useless if they are not left to run in the background at all times from boot to shutdown. -- Neil Williams ============= http://www.data-freedom.org/ http://www.nosoftwarepatents.com/ http://www.linux.codehelp.co.uk/
Attachment:
pgpxUgblwPcOW.pgp
Description: PGP signature
-- The Mailing List for the Devon & Cornwall LUG http://mailman.dclug.org.uk/listinfo/list FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html