20110227

XAMPP - SO + Apache + MySQL + PHP + Perl

Según su propia web, XAMPP es una forma fácil de instalar la distribución Apache que contiene MySQL, PHP y Perl. XAMPP es realmente simple de instalar y usar - basta descargarlo, extraerlo y comenzar.
Es multiplataforma y está disponible para GNU/Linux, MS Windows, Mac OS y SUN/Oracle Solaris. Está pensado para desarrolladores web, de forma pueden probar sus desarrollos sin la necesidad de complicarse con la instalación de estos servidores.
Los pasos que he seguido para la primera ejecución han sido:

1.- descarga del software de la página del producto
cd ~/descargas
wget http://www.apachefriends.org/download.php?xampp-linux-1.7.4.tar.gz

2.- lo descomprimimos
sudo tar xzf xampp-linux-1.7.4.tar.gz -C /opt

3.- y lo ejecutamos
/opt/lampp/lampp start
Y ya podemos acceder http://localhost (o https según sea el caso) para acceder a la página principal.

Ejecutando /opt/lampp/lampp nos devuelve un buen abanico de opciones de inicio.
Si queremos conectarnos con el cliente de MySQL desde la línea de comandos y obtenemos el siguiente error:

bdispatcher@tatil02:/opt/lampp$ mysql 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

Lo único que tenemos que hacer el modificar la entrada socket en el fichero my.cnf de nuestra instalación para que apunte al socket de XAMPP:

bdispatcher@tatil02:/opt/lampp$ sudo find /opt/lampp/ -iname "*.sock*"
/opt/lampp/var/mysql/mysql.sock



As is written in its own web, XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use - just download, extract and start.
It's available for GNU/Linux, MS Windows, Mac OS and SUN/Oracle Solaris. It's pointed to the web developers who want an easy way to test and deploy their web applications.
Those are the steps followed to install and boot this server:

1.- download the package from the official website
cd ~/downloads
wget http://www.apachefriends.org/download.php?xampp-linux-1.7.4.tar.gz

2.- unpack it
sudo tar xzf xampp-linux-1.7.4.tar.gz -C /opt

3.- and boot it
/opt/lampp/lampp start

Now we can point our favorite web browser to http://localhost (or https) to access to the main page.
Typing /opt/lampp/lampp we get the full list of options.
Now if we try to reach the MySQL server but we get the following error:

bdispatcher@tatil02:/opt/lampp$ mysql 
ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

We just have to modify the socket parameter on our my.cnf with the right path to the XAMPP socket:

bdispatcher@tatil02:/opt/lampp$ sudo find /opt/lampp/ -iname "*.sock*"
/opt/lampp/var/mysql/mysql.sock

PS: If your English is better than mine and you find some mistakes, please tell me about them.

No hay comentarios: