Web Server Apache









INSTALACIÓN 

Instalando el servidor desde tasksel

Deberemos arrancar nuestra máquina virtual Linux, y teclear en la línea de comandosaccederemos a la pantalla de instalación de paquetes, marcaremos la opción Lamp Server y aceptaremos.
servidor-local-ubuntu-paquete-lamp
Marcando esta casilla instalaremos de una sola vez ApachePHP y MySQL ya que el sistema se encargará de descargar los paquetes necesarios y de instalar el software.
En un punto de la instalación, el sistema nos solicitará que indiquemos una contraseña para el acceso a la base de datos MySQL. La indicaremos y proseguiremos con la instalación.
servidor-local-ubuntu-password-mysql
Una vez finalizada la instalación, es aconsejable que reiniciemos el equipo para que los servicios se activen correctamente.

Probando el servidor

Antes de continuar instalando mas aplicaciones, vamos a verificar que el servidor esta funcionando correctamente, y de paso, comprobaremos la configuración de la red que hicimos en la entrega anterior.
Desde nuestro equipo anfitrión, abriremos el navegador y teclearemos el nombre del servidor que indicamos en el fichero hosts, que en nuestro caso miservidor y comprobaremos como Apache está funcionando correctamente.
servidor-local-ubuntu-probando-apache
Para comprobar el funcionamiento de php, vamos a crear el típico phpinfo. Lo primero será situarnos en la carpeta donde se almacena el contenido web. Para ello teclearemo.
Una vez allí, crearemos el fichero con el editor «nano» que viene instalado por defecto:
Se nos abrirá el editor y teclearemos lo siguiente:
Despues pulsaremos F2 para guardar, s para sobreescribir y Intro para aceptar el nombre que le hemos asignado. A continuación accederemos al navegador en nuestro equipo anfitrión e indicaremos la url:
Si obtenemos esta ventana de información del servidor es que nuestro PHP está funcionando correctamente.
servidor-local-ubuntu-probando-php
Finalmente vamos a acceder por la línea de comandos para ver si MySQL esta bien instalado. Teclearemos:
e indicaremos la contraseña que indicamos en la instalación. Si se nos conecta al servidor MySQL es porque funciona correctamente. Una última prueba será ver las bases de datos actuales. Podemos visualizarlas si tecleamos:
show databases;servidor-local-ubuntu-probando-mysql
INSTALLATION
Installing the server from tasksel
We will have to start our Linux virtual machine, and type in the command line we will access the package installation screen, we will mark the Lamp Server option and we will accept.
server-local-ubuntu-package-lamp
By checking this box we will install Apache, PHP and MySQL at one time as the system will download the necessary packages and install the software.
At one point in the installation, the system will ask us to enter a password for access to the MySQL database. We will indicate it and continue with the installation.
server-local-ubuntu-password-mysql
Once the installation is finished, it is advisable that we restart the computer so that the services are activated correctly.
Testing the server
Before continuing to install more applications, we will verify that the server is working correctly, and in the process, we will check the network configuration we made in the previous delivery.
From our host computer, we will open the browser and type the name of the server that we indicate in the hosts file, which in our case is a server and we will check how Apache is working correctly.
server-local-ubuntu-testing-apache
To check the operation of php, let's create the typical phpinfo. The first thing will be to place ourselves in the folder where the web content is stored. For that we will type.
Once there, we will create the file with the “nano” editor that is installed by default:
The editor will open and we will type the following:
Then we will press F2 to save, s to overwrite and Enter to accept the name we have assigned. Next we will access the browser on our host computer and indicate the url:
If we get this server information window, our PHP is working correctly.
server-local-ubuntu-testing-php
Finally we will access the command line to see if MySQL is properly installed. We will type:
and we will indicate the password that we indicate in the installation. If you connect to the MySQL server, it is because it works correctly. A final test will be to view the current databases. We can visualize them if we type:
show databases; server-local-ubuntu-testing-mysql
VIDEOTUTORIAL

No hay comentarios.:

Publicar un comentario