Joomla es un sistema de gestión de contenidos de código abierto bien consolidado para publicar sitios y aplicaciones web. Escrito en PHP y respaldado por MySQL o MariaDB, está construido sobre un marco modelo-vista-controlador preparado para móvil y presume de ser accesible sin quedarse corto. Entre su conjunto de funciones y el enorme volumen de plantillas y extensiones disponibles, aguanta bien como base para sitios profesionales.
Esta guía recorre la instalación de Joomla en Ubuntu 20.04 bajo Apache y después coloca delante un certificado gratuito de Let's Encrypt.
Qué necesitarás
- Un servidor Ubuntu 20.04 con al menos 2 GB de RAM.
- Un nombre de dominio cuyo DNS ya apunte a tu servidor.
- Acceso root configurado en la máquina.
Paso 1: construir el stack LAMP
Joomla necesita Apache, MariaDB, PHP y un puñado de extensiones de PHP. Instálalos juntos:
apt-get install apache2 mariadb-server php7.4 libapache2-mod-php7.4 php7.4-cli php7.4-mysql php7.4-json php7.4-opcache php7.4-mbstring php7.4-intl php7.4-xml php7.4-gd php7.4-zip php7.4-curl php7.4-xmlrpc unzip -y
Antes de seguir, conviene ajustar algunos valores por defecto de PHP. Abre el archivo de configuración:
nano /etc/php/7.4/apache2/php.ini
Define estos valores:
memory_limit = 512M upload_max_filesize = 256M post_max_size = 256M output_buffering = Off max_execution_time = 300 date.timezone = Asia/Kolkata
Guarda el archivo y sal del editor.
Paso 2: preparar la base de datos
Ejecuta el script de endurecimiento para bloquear MariaDB y asignar una contraseña de root:
mysql_secure_installation
Responde a cada pregunta siguiendo estas líneas:
Enter current password for root (enter for none): Set root password? [Y/n] Y New password: Re-enter new password: Remove anonymous users? [Y/n] Y Disallow root login remotely? [Y/n] Y Remove test database and access to it? [Y/n] Y Reload privilege tables now? [Y/n] Y
Después entra en la shell de MariaDB:
mysql -u root -p
Crea el esquema de Joomla y una cuenta dedicada:
MariaDB [(none)]> CREATE DATABASE joomladb CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
MariaDB [(none)]> GRANT ALL ON joomladb.* TO 'joomla'@'localhost' IDENTIFIED BY 'password';
Aplica los cambios y sal de la shell:
MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;
Paso 3: descargar y descomprimir Joomla
Descarga la versión actual desde el sitio oficial de Joomla:
wget https://downloads.joomla.org/cms/joomla3/3-9-18/Joomla_3-9-18-Stable-Full_Package.zip
Descomprímela en un directorio dedicado bajo el raíz de documentos de Apache:
unzip Joomla_3-9-18-Stable-Full_Package.zip -d /var/www/html/joomla
Cede la propiedad al usuario del servidor web para que Joomla pueda escribir donde necesite:
chown -R www-data:www-data /var/www/html/joomla
Paso 4: añadir un host virtual de Apache
Crea un nuevo archivo de vhost para el sitio:
nano /etc/apache2/sites-available/joomla.conf
Rellénalo así:
<VirtualHost *:80> ServerName joomla.linuxbuz.com DirectoryIndex index.html index.php DocumentRoot /var/www/html/joomla ErrorLog ${APACHE_LOG_DIR}/joomla-error.log CustomLog ${APACHE_LOG_DIR}/joomla-access.log combined <Directory /var/www/html/joomla> Options FollowSymLinks AllowOverride All Require all granted </Directory> </VirtualHost> Guarda, después habilita el sitio y reinicia Apache:
a2ensite joomla
systemctl restart apache2
Paso 5: cifrarlo con Let's Encrypt
Certbot se encarga de la emisión y la renovación de los certificados por ti. Instálalo:
apt-get install certbot python3-certbot-apache -y
Solicita un certificado para tu dominio:
certbot --apache -d joomla.linuxbuz.com
Certbot pide una dirección de contacto y las condiciones del servicio, y después aprovisiona el certificado:
Saving debug log to /var/log/letsencrypt/letsencrypt.log Plugins selected: Authenticator apache, Installer apache Enter email address (used for urgent renewal and security notices) (Enter 'c' to cancel): [email protected] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Please read the Terms of Service at https://letsencrypt.org/documents/LE-SA-v1.2-November-15-2017.pdf. You must agree in order to register with the ACME server at https://acme-v02.api.letsencrypt.org/directory - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (A)gree/(C)ancel: A - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Would you be willing to share your email address with the Electronic Frontier Foundation, a founding partner of the Let's Encrypt project and the non-profit organization that develops Certbot? We'd like to send you email about our work encrypting the web, EFF news, campaigns, and ways to support digital freedom. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (Y)es/(N)o: Y Obtaining a new certificate Performing the following challenges: http-01 challenge for joomla.linuxbuz.com Enabled Apache rewrite module Waiting for verification... Cleaning up challenges Created an SSL vhost at /etc/apache2/sites-available/joomla-le-ssl.conf Enabled Apache socache_shmcb module Enabled Apache ssl module Deploying Certificate to VirtualHost /etc/apache2/sites-available/joomla-le-ssl.conf Enabling available site: /etc/apache2/sites-available/joomla-le-ssl.conf
Después Certbot ofrece forzar HTTPS:
Please choose whether or not to redirect HTTP traffic to HTTPS, removing HTTP access. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 1: No redirect - Make no further changes to the webserver configuration. 2: Redirect - Make all requests redirect to secure HTTPS access. Choose this for new sites, or if you're confident your site works on HTTPS. You can undo this change by editing your web server's configuration. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Select the appropriate number [1-2] then [enter] (press 'c' to cancel): 2
Escribe 2 y pulsa Enter para completar la configuración:
Redirecting vhost in /etc/apache2/sites-enabled/joomla.conf to ssl vhost in /etc/apache2/sites-available/joomla-le-ssl.conf - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Congratulations! You have successfully enabled https://joomla.linuxbuz.com You should test your configuration at: https://www.ssllabs.com/ssltest/analyze.html?d=joomla.linuxbuz.com - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - IMPORTANT NOTES: - Congratulations! Your certificate and chain have been saved at: /etc/letsencrypt/live/joomla.linuxbuz.com/fullchain.pem Your key file has been saved at: /etc/letsencrypt/live/joomla.linuxbuz.com/privkey.pem Your cert will expire on 2020-08-19. To obtain a new or tweaked version of this certificate in the future, simply run certbot again with the "certonly" option. To non-interactively renew *all* of your certificates, run "certbot renew" - Your account credentials have been saved in your Certbot configuration directory at /etc/letsencrypt. You should make a secure backup of this folder now. This configuration directory will also contain certificates and private keys obtained by Certbot so making regular backups of this folder is ideal. - If you like Certbot, please consider supporting our work by: Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate Donating to EFF: https://eff.org/donate-le - We were unable to subscribe you the EFF mailing list because your e-mail address appears to be invalid. You can try again later by visiting https://act.eff.org.
Tu sitio ya se sirve por HTTPS.
Paso 6: ejecutar el asistente de Joomla
Apunta tu navegador a https://joomla.linuxbuz.com y aparecerá el instalador web de Joomla:

Introduce el nombre de tu sitio, el correo y la contraseña del administrador y continúa al paso de la base de datos:

Proporciona el nombre de la base de datos, el usuario y la contraseña que creaste antes y pasa a la página de resumen:

Elige tus opciones preferidas y pulsa Install. Joomla muestra un resumen de la configuración:

Confirma los detalles e instala. Al terminar llegas aquí:

Borra el directorio de instalación como se indica y pulsa Administrator para llegar a la pantalla de acceso:

Inicia sesión con las credenciales que definiste:

Y el frontend está en línea en la misma dirección:

Conclusión
Joomla ya está instalado y protegido con Let's Encrypt en Ubuntu 20.04. A partir de aquí puedes darle forma de tienda, blog, sitio comunitario o simple sitio corporativo. Si algo se te atascó por el camino, grita.