Como Instalar Apache Centos 6.2

Páginas: 4 (841 palabras) Publicado: 3 de julio de 2012
CENTOS 6 LAMP INSTALL (APACHE MYSQL & PHP) VIA YUM


CentOS Apache Install via YUM

The first step is to install the Apache web server, RHEL based distributions call this package httpd notApache. Often admins get this command wrong and type “yum install apache” or “yum install apache2″ – the correct command to install Apache on CentOS is:
yum update

yum install httpd
Start Apache onCentOS:
/etc/init.d/httpd start
Add MySQL to start at boot type the following:
chkconfig httpd on

CentOS MySQL install via YUM

Enter the following command to install CentOS MySQL Server andclient via YUM:
yum install mysql-server mysql
Start MySQL on CentOS type:
/etc/init.d/mysqld start
Add MySQL to start at boot type the following:
chkconfig mysqld on

First start the mysqldaemon, then type mysql:
/etc/init.d/mysqld start
mysql
 

Changing MySQL Root Password
By default the root password is empty for the mysql database. It is a good idea to change the mysql rootpassword to a new one from a security point of view.
mysql> USE mysql;
mysql> UPDATE user SET Password=PASSWORD('newpassword') WHERE user='root';
mysql> FLUSH PRIVILEGES;
Once done, check by logging in:mysql -u root -p
Enter Password:

CentOS Install PHP & php-mysql via YUM

To install PHP and php-mysql (php-mysql is required so that PHP can talk to MySQL) on CentOS 6 type:
yum install phpphp-mysql
FYI here is the full CentOS LAMP command (this will install Apache, MySQL & PHP all in one go):
yum install httpd php php-mysql mysql mysql-server

If you did everything right above youshould see the CentOS test page if you browse to http://localhost (or your servers IP if you are on another box). If you don’t see a page below and it simply does not load chances are iptables isblocking httpd traffic you should configure iptables to allow httpd traffic however for now you  may want to disable the CentOS firewall.
[pic]
I would recommend creating a file called index.php in...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Como instalar Centos 6.0
  • instalar apache
  • Instalar Apache
  • Cómo instalar y configurar dhcp-ldap en centos 5.
  • instalar apache
  • ¿Como instalar el servidor apache?
  • instalar apache
  • apache instalar

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS