Usuario:Juanda/lamp/Instalación

De WikiEducator
Saltar a: navegación, buscar

Intalación LAMP en Ubuntu 12.04

Introducción

  • LAMP es un acrónimo de Linux, Apache, Mysql y Php.
  • Forma un entorno de desarrollo muy extendido en la web.
  • Linux es el SO
  • Apache es el Servidor Web
  • Mysql la base de datos
  • Php el lenguaje de programación
  • Otra posibilidad es instalar sobre Windows (WAMP).
  • Tenemos otras posibilidades como XAMPP que tiene versión portable.

Instalación de MySql

  • Con usuario root o mediante sudo:
#apt-get install mysql-server mysql-client 

Instalación de Apache

apt-get install apache2

Instalación php

  • Instalaremos tanto php5 como el módulo con Apache:
apt-get install php5 libapache2-mod-php5
  • Reiniciaremos el servidor Apache:
  • Ojo que veamos un OK y no un FAIL!!!
juanda@juanda-PC:~$ sudo service apache2 stop
[sudo] password for juanda: 
 * Stopping web server apache2                                                  
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
 ... waiting                                                             [ OK ]
juanda@juanda-PC:~$ sudo service apache2 start
 * Starting web server apache2                                                  
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
                                                                         [ OK ]
juanda@juanda-PC:~$ 

Comprobación de servicios arrancados

  • Comprobamos que tanto mysql como apache2 estén arrancados
juanda@juanda-PC:~$ service mysql status
mysql start/running, process 1213
juanda@juanda-PC:~$ service apache2 status
Apache2 is running (pid 1415).
juanda@juanda-PC:~$