Próxima revisión | Revisión previaÚltima revisiónAmbos lados, revisión siguiente |
es:howtos:network_services:setup_apache_php_mysql [2019/02/11 12:23 (UTC)] – creado slackwarespanol | es:howtos:network_services:setup_apache_php_mysql [2019/02/16 19:54 (UTC)] – [Configuración de Apache, PHP y MySQL] pedro.herrero |
---|
<!-- Add your text below. We strongly advise to start with a Headline (see button bar above). --> | <!-- Add your text below. We strongly advise to start with a Headline (see button bar above). --> |
====== Setup Apache, PHP and MySQL ====== | |
| |
In order to configure your Slackware Linux box as a MySQL-PHP -ready web server, please follow these instructions: | ====== Configuración de Apache, PHP y MySQL ====== |
| |
* Install the Apache (httpd), php and MySQL packages from the Slackware discs or Slackpkg. | Para configurar su máquina Slackware Linux como un servidor web preparado para MySQL-PHP, siga estas instrucciones: |
* Fix php time zone (many apps will complain about this if you don't do it). Edit '''/etc/httpd/php.ini''' and find the following line and uncomment it: <code> | |
date.timezone = America/Chicago <--change to correct time zone | * Instale los paquetes Apache (httpd), php y MySQL desde los discos Slackware o Slackpkg. |
| * Corrija la zona horaria de php (muchas aplicaciones se quejarán de esto si no lo hace). Edite '''/etc/httpd/php.ini''', busque la siguiente línea y descoméntela: <code> |
| date.timezone = America/Chicago <--cambie a la zona horaria correcta |
</code> | </code> |
* As the root user, open the '''/etc/httpd/httpd.conf''' Apache configuration file with your preferred text editor. Then, find the following line and uncomment it (delete the '#' character at the start of the line): <code> | * Como usuario root, abra el archivo '''/etc/httpd/httpd.conf''' de configuración de Apache con su editor de texto preferido. Luego, busque la siguiente línea y descoméntela (elimine el carácter '#' al principio de la línea): <code> |
Include /etc/httpd/mod_php.conf | Include /etc/httpd/mod_php.conf |
</code> Now your Apache will include the PHP module when it starts. | </code> Ahora su Apache incluirá el módulo PHP cuando se inicie. |
* Set a server name (if your machine's IP doesn't resolve to a name). Edit the '''/etc/httpd/httpd.conf''' and uncomment the following line: <code> | * Establezca un nombre de servidor (si la IP de su máquina no se resuelve con un nombre). Edite el archivo '''/etc/httpd/httpd.conf''' y descomente la siguiente línea: <code> |
ServerName www.example.com:80 <--change www.example.com to an IP or your machine's name | ServerName www.example.com:80 <--cambie www.example.com a una IP o el nombre de su máquina |
</code> | </code> |
* Optionally (but recommended), you can configure Apache to use an '''index.php''' file as your directory index. You just have to search the following line...: | * Opcionalmente (pero recomendado), puede configurar Apache para que use un archivo '''index.php''' como índice de su directorio. Sólo tiene que buscar en la siguiente línea...: |
* Optionally 2, if you use Perl for web scripts, you may want to add '''index.pl''' also. <code> | * Opcionalmente 2, si utiliza Perl para scripts web, puede que desee añadir '''index.pl''' también. <code> |
<IfModule dir_module> DirectoryIndex index.html </IfModule> | <IfModule dir_module> DirectoryIndex index.html </IfModule> |
</code> ... and change it to: <code> | </code> ... y cámbielo a: <code> |
<IfModule dir_module> DirectoryIndex index.html index.php </IfModule> | <IfModule dir_module> DirectoryIndex index.html index.php </IfModule> |
</code> Please note the '''index.php''' part added. You can now __save__ and close your '''/etc/httpd/httpd.conf''' file and restart your Apache server in order to have your modifications applied. As root, execute: <code bash> | </code> Por favor, tenga en cuenta la parte añadida "index.php". Ahora puede __guardar__ y cerrar su archivo '''/etc/httpd/httpd.conf''' y reiniciar su servidor Apache para que se apliquen sus modificaciones. Como root, ejecute: <code bash> |
apachectl restart | apachectl restart |
</code> | </code> |
| |
\\ | \\ |
* If you want your Apache server to start automatically when you start your box, you can change the permissions of the '''/etc/rc.d/rc.httpd''' file. Execute the following command as root: <code bash> | * Si desea que su servidor Apache se inicie automáticamente cuando inicie su equipo, puede cambiar los permisos del archivo '''/etc/rc.d/rc.httpd'''. Ejecute el siguiente comando como root: <code bash> |
* chmod 755 /etc/rc.d/rc.httpd | * chmod 755 /etc/rc.d/rc.httpd |
</code> Now your Apache server will start automatically when your system boots. \\ \\ In order to configure your MySQL installation, please see the [[howtos:databases:install_mysql_on_slackware|Install MySQL On Slackware]] doc. | </code> Ahora su servidor Apache se iniciará automáticamente cuando su sistema arranque. \\ \\ Para configurar su instalación de MySQL, por favor vea el documento [[es:howtos:databases:install_mysql_on_slackware|Install MySQL En Slackware]]. |
| |
| |
===== Final Considerations ===== | ===== Reflexiones finales ===== |
| |
* Normally you would want to test your recent changes in order to know if they have worked. After restarting Apache, create a '''test.php''' file on your '''/var/www/htdocs/''' directory with the following: <code php> | * Normalmente usted querría probar sus cambios recientes para saber si han funcionado. Después de reiniciar Apache, cree un archivo '''test.php''' en su directorio '''/var/www/htdocs/''' con lo siguiente: <code php> |
<?php phpinfo(); ?> | <?php phpinfo(); ?> |
</code> Now you can open your favorite web browser to the following URL: http://localhost/test.php . If you your PHP installation's settings are displayed, then you have configured your Apache correctly, otherwise, please re-check this documentation (getting sure you have followed every step correctly), or contact us at ##slackware on FreeNode. | </code> Ahora puede abrir su navegador web favorito en la siguiente URL: http://localhost/test.php . Si se muestra la configuración de su instalación PHP, entonces ha configurado su Apache correctamente, de lo contrario, por favor vuelva a comprobar esta documentación (asegurándose de que ha seguido cada paso correctamente), o póngase en contacto con nosotros en ##slackware en FreeNode. |
| |
| |
===== Sources ===== | ===== Fuentes ===== |
| |
<!-- If you are copying information from another source, then specify that source --> | <!-- If you are copying information from another source, then specify that source --> |
* Original source: [[http://slackware-es.com/tutoriales/administracion/configurar-apache-php-y-mysql-en-slackware-linux]] | * Fuente original: [[http://slackware-es.com/tutoriales/administracion/configurar-apache-php-y-mysql-en-slackware-linux]] |
<!-- Authors are allowed to give credit to themselves! --> | <!-- Authors are allowed to give credit to themselves! --> |
* Originally written by User [[wiki:user:pavel |Pavel E.]] | * Escrito Originalmente por el Usuario [[wiki:user:pavel |Pavel E.]] |
| * Traducido por --- //[[wiki:user:pedro.herrero|Pedro Herrero García]] 2019/02/16 19:33 (UTC)// |
| |
{{tag>howtos apache php author_pavel}} | {{tag>howtos apache php author_pavel}} |
| |
| |