Agradecemos a GNUtransfer el habernos cedido un VPS y otros recursos para escribir este articulo.
En este articulo veremos como instalar WordPress en un VPS o en un servidor dedicado.
Para nuestro articulo usaremos el dominio example.geeklab.com.ar y nuestra IP es la 69.61.93.19
Comenzamos desde una instalación mínima de Debian Wheezy o Ubuntu Precise Pangolin.
Primero debemos instalar los paquetes necesarios apache2, libapache2-mod-php5, php5, php5-curl, php5-intl, php5-mcrypt, php5-mysql, php5-sqlite, php5-xmlrpc, mysql-server, mysql-client
root@x19:/# apt-get install apache2 libapache2-mod-php5 php5 php5-curl php5-intl php5-mcrypt php5-mysql php5-sqlite php5-xmlrpc mysql-server mysql-client Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common ca-certificates libaio1 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libcap2 libcurl3 libdbd-mysql-perl libdbi-perl libhtml-template-perl libicu48 libldap-2.4-2 libltdl7 libmcrypt4 libmysqlclient18 libnet-daemon-perl libplrpc-perl librtmp0 libssh2-1 mysql-client-5.5 mysql-common mysql-server-5.5 mysql-server-core-5.5 Suggested packages: www-browser apache2-doc apache2-suexec apache2-suexec-custom php-pear libipc-sharedcache-perl libmcrypt-dev mcrypt libterm-readkey-perl tinyca The following NEW packages will be installed: apache2 apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common ca-certificates libaio1 libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap libcap2 libcurl3 libdbd-mysql-perl libdbi-perl libhtml-template-perl libicu48 libldap-2.4-2 libltdl7 libmcrypt4 libmysqlclient18 libnet-daemon-perl libplrpc-perl librtmp0 libssh2-1 mysql-client mysql-client-5.5 mysql-common mysql-server mysql-server-5.5 mysql-server-core-5.5 php5 php5-curl php5-intl php5-mcrypt php5-mysql php5-sqlite php5-xmlrpc 0 upgraded, 39 newly installed, 0 to remove and 0 not upgraded. Need to get 19.9 MB of archives. After this operation, 137 MB of additional disk space will be used. Do you want to continue [Y/n]?
Se nos pedirá que ingresemos un password para el usuario root de mysql
Se nos pide que reingresemos el password para el usuario root de mysql
Ahora procedemos a configurar Apache usaremos como directorio de trabajo /var/www/wordpress
primero creamos el directorio
root@x19:/# mkdir -p /var/www/wordpress
Luego creamos el archivo /etc/apache2/sites-available/wordpress con el siguiente contenido
Nota: deben cambiar la IP, el dominio y la dirección de correo por la que les corresponda.
NameVirtualHost 69.61.93.19:80 <VirtualHost 69.61.93.19:80> ServerAdmin rmalvarez@gnupanel.org ServerName example.geeklab.com.ar DocumentRoot /var/www/wordpress <Directory /var/www/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> ErrorLog ${APACHE_LOG_DIR}/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
Luego deshabilitamos el sitio configurado por default en apache y habilitamos el sitio para wordpress que hemos agregado recien, pare eso ejecutamos los siguientes comandos
root@x19:/# a2dissite default Site default disabled. To activate the new configuration, you need to run: service apache2 reload root@x19:/# a2ensite wordpress Enabling site wordpress. To activate the new configuration, you need to run: service apache2 reload root@x19:/#
También editamos /etc/hosts y donde esta nuestra IP le agregamos también nuestro dominio
root@x19:/# cat /etc/hosts 127.0.0.1 localhost 69.61.93.19 example.geeklab.com.ar x19 # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters ff02::3 ip6-allhosts root@x19:/#
Y en el archivo /etc/apache2/ports.conf comentamos la linea NameVirtualHost *:80 de modo que quede así
root@x19:/# cat /etc/apache2/ports.conf # If you just change the port or add more ports here, you will likely also # have to change the VirtualHost statement in # /etc/apache2/sites-enabled/000-default # This is also true if you have upgraded from before 2.2.9-3 (i.e. from # Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and # README.Debian.gz #NameVirtualHost *:80 Listen 80 <IfModule mod_ssl.c> # If you add NameVirtualHost *:443 here, you will also have to change # the VirtualHost statement in /etc/apache2/sites-available/default-ssl # to # Server Name Indication for SSL named virtual hosts is currently not # supported by MSIE on Windows XP. Listen 443 </IfModule> <IfModule mod_gnutls.c> Listen 443 </IfModule> root@x19:/#
Luego añadimos el modulo rewrite de apache
root@x19:/# a2enmod rewrite Enabling module rewrite. To activate the new configuration, you need to run: service apache2 restart root@x19:/#
Luego tuneamos PHP para adaptarlo a las necesidades de wordpress
NOTA: Esta no es la configuración óptima, solo colocamos valores sobre estimados para estar seguros que wordpress funcione correctamente para cada instalación en particular se deberá afinar esta configuración.
Editamos /etc/php5/apache2/php.ini y modificamos las siguientes variables de modo que queden con los siguientes valores.
max_execution_time = 900 max_input_time = 900 memory_limit = 512M post_max_size = 64M upload_max_filesize = 64M max_file_uploads = 32 default_socket_timeout = 900
Procedemos a restartear apache
root@x19:/# /etc/init.d/apache2 restart [ ok ] Restarting web server: apache2 ... waiting . root@x19:/#
Ahora nos conectamos a mysql y creamos la base de datos y el usuario de mysql para wordpress,
para eso primero nos conectamos a mysql
root@x19:/# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 42 Server version: 5.5.30-1.1 (Debian) Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql>
Y ahora creamos la base de datos y el usuario con estas sentencias
NOTA: en nuestro ejemplo tanto la base de datos como el usuario son wordpress, reemplazar PASSWORD_DB por el password que deseen asignarle a la base de datos.
mysql> CREATE DATABASE wordpress; Query OK, 1 row affected (0.00 sec) mysql> GRANT ALL ON wordpress.* TO wordpress@localhost IDENTIFIED BY 'PASSWORD_DB'; Query OK, 0 rows affected (0.00 sec) mysql> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec) mysql> \q Bye
Ahora procedemos a descargar wordpress, nos aseguramos de tener instalado wget y despues procedemos a la descarga
root@x19:/# apt-get install wget Reading package lists... Done Building dependency tree Reading state information... Done wget is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@x19:/# root@x19:/# cd /tmp root@x19:/tmp# root@x19:/tmp# wget --content-disposition http://wordpress.org/latest.tar.gz --2013-04-19 01:30:34-- http://wordpress.org/latest.tar.gz Resolving wordpress.org (wordpress.org)... 72.233.56.139, 72.233.56.138 Connecting to wordpress.org (wordpress.org)|72.233.56.139|:80... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [application/x-gzip] Saving to: `wordpress-3.5.1.tar.gz' [ <=> ] 5,012,722 1.03M/s in 4.6s 2013-04-19 01:30:40 (1.05 MB/s) - `wordpress-3.5.1.tar.gz' saved [5012722] root@x19:/tmp#
Lo descomprimimos y nos aseguramos de cambiar los permisos para que no haya conflictos
root@x19:/tmp# tar -C /var/www -xf wordpress-3.5.1.tar.gz root@x19:/tmp# root@x19:/tmp# chown -R www-data:www-data /var/www root@x19:/tmp# find /var/www -type f -exec chmod 0600 {} \; root@x19:/tmp# find /var/www -type d -exec chmod 0700 {} \; root@x19:/tmp#
Ahora nos dirigimos con el navegador a nuestro sitio para usar el instalador de wordpress, en el ejemplo http://example.geeklab.com.ar y seguimos los pasos.
Paso 1
Paso 2
Paso 3, Aquí colocamos los datos de la base de datos.
Paso 4
Paso 5, Aquí colocamos los datos básicos de nuestro blog
Paso 6
Con esto finalizamos la instalación de wordpress en una instalación de Debian Wheezy con lo mínimo para funcionar
NOTA
En caso de querer instalar la versión en español de wordpress pueden descargar el tar.gz en español desde aquí WordPress Español Al día de escribir este articulo el link es el siguiente http://es.wordpress.org/wordpress-3.5.1-es_ES.tar.gz
root@x19:/tmp# wget http://es.wordpress.org/wordpress-3.5.1-es_ES.tar.gz --2013-04-19 02:53:58-- http://es.wordpress.org/wordpress-3.5.1-es_ES.tar.gz Resolving es.wordpress.org (es.wordpress.org)... 72.233.56.138, 72.233.56.139 Connecting to es.wordpress.org (es.wordpress.org)|72.233.56.138|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 6122302 (5.8M) [application/octet-stream] Saving to: `wordpress-3.5.1-es_ES.tar.gz' 100%[=====================================================================================================================================================================================================================================================================================>] 6,122,302 1.09M/s in 5.3s 2013-04-19 02:54:04 (1.09 MB/s) - `wordpress-3.5.1-es_ES.tar.gz' saved [6122302/6122302] root@x19:/tmp#
Y para descomprimirlo es con es siguiente comando
root@x19:/tmp# tar -C /var/www -xf wordpress-3.5.1-es_ES.tar.gz root@x19:/tmp#
Los demás pasos son iguales

About Ricardo Marcelo Alvarez
- Web |
- More Posts(58)
[…] pasos a seguir se detallan en este artículo de […]
Un guion perfecto, senzillo y muy práctico de como configurar el servidor.
Me ha sido de gran ayuda y me has sacado de un apuro…Gracias por tomarte la moléstia de publicarlo.
Saludos !
Gracias por tu comentario.
Saludos.