GNU/Linux >> Tutoriales Linux >  >> Ubuntu

Cómo instalar Joomla con Apache2 y Lets Encrypt en Ubuntu 20.04

Joomla es un sistema de gestión de contenido de código abierto que se utiliza para publicar aplicaciones y sitios web en línea. Está escrito en PHP y utiliza MySQL/MariaDB como back-end de base de datos. Es un marco de aplicación web simple, fácil de usar y construido sobre un modelo, vista y controlador listo para dispositivos móviles. Joomla viene con un montón de características y diseños que lo convierten en una buena opción para crear sitios profesionales.

En este tutorial, le mostraremos cómo instalar Joomla CMS con Apache y protegerlo con Let's Encrypt SSL en Ubuntu 20.04.

Requisitos

  • Un servidor con Ubuntu 20.04 con 2 GB de RAM.
  • Un nombre de dominio válido apuntado con su servidor.
  • Se ha configurado una contraseña raíz en su servidor.

Instalar servidor LAMP

Primero, deberá instalar el servidor web Apache, MariaDB, PHP y otras extensiones de PHP en su sistema. Puede instalarlos usando el siguiente comando:

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

Una vez que todos los paquetes estén instalados, edite el archivo php.ini y modifique algunas configuraciones.

nano /etc/php/7.4/apache2/php.ini

Cambie los siguientes valores:

memory_limit = 512M
upload_max_filesize = 256M
post_max_size = 256M
output_buffering = Off
max_execution_time = 300
date.timezone = Asia/Kolkata

Guarde y cierre el archivo una vez que haya terminado.

Crear una base de datos

Primero, asegure la instalación de MariaDB y configure la contraseña raíz de MariaDB con el siguiente comando:

mysql_secure_installation

Responda todas las preguntas como se muestra a continuación:

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

A continuación, inicie sesión en el shell de MariaDB con el siguiente comando:

mysql -u root -p

Proporcione su contraseña raíz de MariaDB cuando se le solicite, luego cree una base de datos y un usuario para Joomla con el siguiente comando:

MariaDB [(none)]> CREATE DATABASE joomladb CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
MariaDB [(none)]> GRANT ALL ON joomladb.* TO 'joomla'@'localhost' IDENTIFIED BY 'password';

A continuación, elimine los privilegios y salga del shell de MariaDB con el siguiente comando:

MariaDB [(none)]> FLUSH PRIVILEGES;
MariaDB [(none)]> EXIT;

Descargar e Instalar Joomla

Primero, descargue la última versión de Joomla desde su sitio web oficial con el siguiente comando:

wget https://downloads.joomla.org/cms/joomla3/3-9-18/Joomla_3-9-18-Stable-Full_Package.zip

Una vez completada la descarga, descomprima el archivo descargado en el directorio raíz web de Apache con el siguiente comando:

unzip Joomla_3-9-18-Stable-Full_Package.zip -d /var/www/html/joomla

A continuación, cambie la propiedad del directorio joomla a www-data con el siguiente comando:

chown -R www-data:www-data /var/www/html/joomla

Una vez que haya terminado, puede continuar con el siguiente paso.

Configurar Apache para Joomla

A continuación, cree un nuevo archivo de configuración de host virtual de Apache para servir a Joomla.

nano /etc/apache2/sites-available/joomla.conf

Agrega el siguiente contenido:

<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>

Guarde y cierre el archivo, luego habilite el host virtual Apache y reinicie el servicio Apache usando el siguiente comando:

a2ensite joomla
systemctl restart apache2

Una vez que haya terminado, puede continuar con el siguiente paso.

Asegure Joomla con Let's Encrypt SSL

Primero, deberá instalar el cliente Certbot para instalar y administrar Let's Encrypt SSL. Puede instalarlo con el siguiente comando:

apt-get install certbot python3-certbot-apache -y

Una vez que Certbot esté instalado, ejecute el siguiente comando para descargar e instalar Let's Encrypt SSL para su sitio web:

certbot --apache -d joomla.linuxbuz.com

Se le pedirá que proporcione su dirección de correo electrónico y acepte el término del servicio como se muestra a continuación:

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

A continuación, seleccione si desea redirigir o no el tráfico HTTP a HTTPS como se muestra a continuación:

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

Tipo 2 y pulsa Intro para finalizar la instalación como se muestra a continuació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.

En este punto, su sitio web Joomla está protegido con Let's Encrypt SSL. Ahora puede continuar con el siguiente paso.

Acceder a Joomla CMS

Ahora, abra su navegador web y escriba la URL https://joomla.linuxbuz.com. Será redirigido al asistente de instalación basado en web de Joomla:

Proporcione su nombre de sitio, correo electrónico de administrador, contraseña y haga clic en Siguiente botón. Debería ver el asistente de configuración de la base de datos:

Proporcione el nombre de su base de datos de Joomla, el nombre de usuario de la base de datos, la contraseña y haga clic en Siguiente botón. Debería ver la página de finalización de Joomla:

Seleccione la opción deseada y haga clic en Instalar botón. Debería ver la siguiente página:

Revise todas las configuraciones y haga clic en el botón Instalar. Una vez que se haya instalado Joomla, debería ver la siguiente pantalla:

Ahora, elimine el directorio de instalación y haga clic en Administrador botón. Debería ver la página de inicio de sesión de Joomla:

Proporcione su nombre de usuario y contraseña de Joomla y haga clic en Iniciar sesión en botón. Debería ver el panel de control de Joomla en la siguiente página:

También puede acceder a su sitio web de Joomla visitando la URL https://joomla.linuxbuz.com. Debería ver su sitio web Joomla en la siguiente página:

Conclusión

¡Felicidades! ha instalado y asegurado con éxito Joomla con Let's Encrypt en Ubuntu 20.04. Ahora puede crear fácilmente su tienda de comercio electrónico, sitio web personal, sitio social o blog. Siéntase libre de preguntarme si tiene alguna pregunta.


Ubuntu
  1. Cómo instalar Nextcloud con Nginx y Lets Encrypt SSL en Ubuntu 20.04 LTS

  2. Cómo instalar Magento 2 con Nginx y Lets Encrypt SSL en Ubuntu 20.04 LTS

  3. Cómo instalar Shopware con NGINX y Lets encrypt en Ubuntu 18.04 LTS

  4. Cómo instalar Grav CMS con Nginx y Lets Encrypt en Ubuntu 18.04 LTS

  5. Cómo instalar Automad CMS con Apache y Lets encrypt en Debian 10

Cómo instalar ProjectSend con Apache y Lets Encrypt SSL en Ubuntu 20.04

Cómo instalar Moodle con Nginx y Lets Encrypt SSL en Ubuntu 20.04

Cómo instalar MediaWiki con Nginx y Lets Encrypt SSL en Ubuntu 20.04

Cómo instalar Gitea con Nginx y Lets Encrypt SSL gratis en Ubuntu 20.04

Cómo instalar SonarQube con Lets Encrypt en Ubuntu 20.04

Cómo instalar Joomla con LAMP en Ubuntu 20.04