Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I started with one server running Apache, PHP, MySQL. Now I have split off my web server so I am running all the PHP files on one server and my MySQL is still on the original server. Are there services / programs that I can turn off or uninstall from the MySQL Server now, or do I need to keep httpd (etc) running? I know how to turn it off, I need to know if it is okay to turn it off without breaking anything.

I am using Amazon AWS and connecting from the PHP server to the MySQL database using the MySQL Database's Internal DNS / IP Address.

I am using Amazon Linux AMI release 2012.09

Thank you for any insight you can provide.

share|improve this question
    
What linux distribution are you using? –  Tom O'Connor Jan 10 '13 at 21:20
add comment

2 Answers

up vote 3 down vote accepted

I believe the following commands will work on your distribution.

service httpd stop

This command will stop the current httpd service. But keep in mind that it is still configured to start up on system boot.

If you would like to configure httpd to no longer start on system boot. I would look into "chkconfig"

But, if you like to copy and pasta - this should solve your problem.

chkconfig httpd off

(You can, in most cases use the example above for other services you have installed on the server that no longer need to be used)


Also, if you are only using this server for MySQL then I would take some time and look into your firewall configuration. There are going to be a lot of rules that allow traffic that you probably are not going to need anymore. If you would like more guidance on which ports to consider closing / changing you'll have to post more information.

Lastly, in future questions please provide more information. It's hard for anyone to say, "yes turn, "this, this, this, and this off" "


Yes, You can turn httpd off if you are not serving any html, php etc files on that server.

share|improve this answer
add comment

Httpd is only used if you are planning to serve any content or site. If not, you can shutdown Apache service safely and it won't break anything.

Amazon itself doesn't use Apache in any tasks.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.