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.

Hi I running a CentOS remotely now I want to install PHP/Mysql/apache into it. Can you guys please help me in doing so I'm newbie.

thanks

share|improve this question
2  
Just to be devils advocate: A total newbie wanting help installing LAMP is probably trying to learn web programming and probably not administering a server :) –  Colin Pickard Nov 12 '09 at 7:39
add comment

migrated from stackoverflow.com Nov 12 '09 at 8:01

This question came from our site for professional and enthusiast programmers.

5 Answers

up vote 0 down vote accepted

If you're more concerned with Web development than server administration, I'd either use a preconfigured LAMP stack (as recommended in another answer), or use Yum. E.g.

yum install httpd
yum install mysql
yum install php

See also: How to install LAMP using Yum

share|improve this answer
add comment

You can install them using yum. Here is a tutorial:

share|improve this answer
add comment

[Pardon the lack of proper links; I don't have enough reputation, apparently.]

As others have pointed out, a command like the following should get you a working install:

yum install httpd mysql-server mysql php php-mysql

You suggest that you're running this on a remote server though; if so, this is just the beginning.

If you're going to be running a LAMP stack on a box that's permanently connected to the internet, you need to make sure it's secured.

At this point, I had some links for you, but the spam system here is determined that I shall not post them, since I don't have enough reputation. Google for each of these topics:

  • Securing Apache
  • Securing PHP
  • Securing MySQL

and read the various articles you'll find that make suggestions about how to keep your install secure.

I'm going to use the one link I'm allowed to suggest you read this excellent guide to securing CentOS itself: http://wiki.centos.org/HowTos/OS%5FProtection

The important thing in all of this is that you understand all the commands you're running, and the reasoning behind them, so you end up with something secure that meets your requirements. Then, you need to stay on top of patches - it's not enough to simply go "that's secured now", dust off your hands, and move on. Your server will get hacked.

One other thing: A lot of guides suggest installing from source. I'd suggest you ignore them to start with. Install using yum, then subscribe to CentOS announce list (google "centos announce") to hear about security upgrades you need to apply. You don't want to have to track all the Apache/PHP/MyWql mailing lists and recompile from scratch every time there's a patch that needs applying - that's what package managers are for.

Of course, if the server you're installing onto isn't actually internet facing, you can ignore everything past the point where you get the working LAMP stack =)

share|improve this answer
add comment

This is a nice 6 part article that will show you how to build the perfect CENTOS.

CentOS Setup

share|improve this answer
add comment

the easy way is using yum like this:


sudo yum install httpd mysql php php-mysql --enablerepo=centosplus

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.