Cómo instalar Concrete5 CMS con Apache y Let’s Encrypt SSL gratis en Ubuntu 20.04

Elige lengua

Concrete5 es un sistema de gestión de contenido de código abierto que se utiliza para publicar contenido en Internet. Está escrito en PHP y utiliza MariaDB como base de datos. Proporciona un generador fácil de usar que lo ayuda a crear páginas y contenido a través del navegador web. Es flexible, seguro, listo para dispositivos móviles y se basa en la arquitectura Model-View-Controller. Ofrece un amplio conjunto de características que incluyen, editor de contenido WYSIWYG, administrador de medios, arrastrar y soltar contenido, edición en contexto y muchas más.

En esta publicación, le mostraremos cómo instalar Concrete5 CMS con Apache y Let’s Encrypt SSL en el servidor Ubuntu 20.04.

Requisitos

  • Un servidor con Ubuntu 20.04.
  • Un nombre de dominio válido apuntó a la IP del servidor.
  • Una contraseña de root está configurada en su servidor.

Empezando

Primero, deberá actualizar el índice del paquete APT a la última versión. Puedes actualizarlo con el siguiente comando:

apt-get update -y

Una vez que se actualiza el índice APT, puede continuar con el siguiente paso.

Instalar Apache, MariaDB y PHP

A continuación, deberá instalar el servidor web Apache, el servidor de base de datos MariaDB, PHP y otras extensiones de PHP en su servidor. Puede instalarlos todos usando el siguiente comando:

apt-get install apache2 mariadb-server php libapache2-mod-php libapache2-mod-php php-common php-mbstring php-xmlrpc php-soap php-gd php-xml php-intl php-mysql php-cli php-ldap php-zip php-curl -y

Una vez que todos los paquetes estén instalados, edite el archivo php.ini y configure los valores deseados:

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

Cambia las siguientes líneas:

file_uploads = On
allow_url_fopen = On
memory_limit = 256M
upload_max_filesize = 64M
date.timezone = Asia/Kolkata

Guarde y cierre el archivo cuando haya terminado, luego reinicie el servicio Apache para aplicar los cambios:

systemctl restart apache2

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

Crear una base de datos de Concrete5

A continuación, deberá crear una base de datos y un usuario para Concrete5. Primero, inicie sesión en MariaDB con el siguiente comando:

mysql

Una vez que inicie sesión, cree una base de datos y un usuario con el siguiente comando:

MariaDB [(none)]> CREATE DATABASE concrete5;
MariaDB [(none)]> CREATE USER 'concrete5user'@'localhost' IDENTIFIED BY 'password';

A continuación, otorgue todos los privilegios a la base de datos Concrete5 con el siguiente comando:

MariaDB [(none)]> GRANT ALL ON concrete5.* TO 'concrete5user'@'localhost' IDENTIFIED BY 'password' WITH GRANT OPTION;

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

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

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

Descargar Concrete5 CMS

Primero, vaya al sitio web de Concrete5 CMS, copie la URL de la última versión de Concrete5 y descárguela con el siguiente comando:

wget --trust-server-names https://www.concrete5.org/download_file/-/view/115589/ -O concrete5.zip

Una vez que se complete la descarga, extraiga el archivo descargado con el siguiente comando:

unzip concrete5.zip

A continuación, mueva el directorio extraído al directorio raíz web de Apache con el siguiente comando:

mv concrete5-* /var/www/html/concrete5

A continuación, establezca el permiso y la propiedad adecuados para el directorio concrete5 con el siguiente comando:

chown -R www-data:www-data /var/www/html/concrete5/
chmod -R 755 /var/www/html/concrete5/

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

Configurar Apache para Concrete5 CMS

A continuación, deberá crear un archivo de configuración de host virtual de Apache para Concrete5 CMS. Puedes crearlo con el siguiente comando:Publicidad

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

Agregue las siguientes líneas:

<VirtualHost *:80>
     ServerAdmin [email protected]
     DocumentRoot /var/www/html/concrete5/
     ServerName concrete5.example.com

     <Directory /var/www/html/concrete5/>
        Options +FollowSymlinks
        AllowOverride All
        Require all granted
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

Guarde y cierre el archivo, luego habilite el host virtual de Apache y el módulo de reescritura con el siguiente comando:

a2ensite concrete5.conf
a2enmod rewrite

A continuación, reinicie el servicio de Apache para aplicar los cambios:

systemctl restart apache2

También puede verificar el estado del servicio Apache usando el siguiente comando:

systemctl status apache2

Deberías obtener el siguiente resultado:

? apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2021-05-15 15:00:03 UTC; 4s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 15566 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
   Main PID: 15585 (apache2)
      Tasks: 6 (limit: 2353)
     Memory: 13.5M
     CGroup: /system.slice/apache2.service
             ??15585 /usr/sbin/apache2 -k start
             ??15586 /usr/sbin/apache2 -k start
             ??15587 /usr/sbin/apache2 -k start
             ??15588 /usr/sbin/apache2 -k start
             ??15589 /usr/sbin/apache2 -k start
             ??15590 /usr/sbin/apache2 -k start

May 15 15:00:03 ubuntu2004 systemd[1]: Starting The Apache HTTP Server...

En este punto, el servidor web Apache está configurado para alojar Concrete5 CMS. Ahora puede continuar con el siguiente paso.

Acceda a la interfaz web de Concrete5 CMS

Ahora, abra su navegador web y acceda a la interfaz web de Concrete5 CMS usando la URL http://concreto5.ejemplo.com. Será redirigido a la siguiente página:

Elige lengua

Seleccione su idioma y haga clic en el Flecha botón. Deberías ver la siguiente página:

Chequeo del sistema

Asegúrese de que todas las bibliotecas requeridas estén instaladas, luego haga clic en el Continuar a la instalación botón, debería ver la siguiente página:

Nombre del sitio web y detalles de inicio de sesión

Aquí, proporcione el nombre de usuario del administrador, la contraseña, el nombre de usuario de la base de datos, la contraseña y el nombre de la base de datos, luego haga clic en el Instalar Concreto5 botón para iniciar la instalación. Una vez completada la instalación, debería ver la siguiente página:

Recursos concretos 5

Anuncio publicitario

Instalación completa

Ahora, haga clic en el Edite su sitio botón, debería ver el tablero de Concrete5 en la siguiente página:

Primeros pasos con Concrete 5

Asegure Concrete5 con Let’s Encrypt SSL

A continuación, se recomienda proteger su sitio web con Let’s Encrypt SSL. Primero, instale el cliente Certbot usando el siguiente comando:

apt-get install python3-certbot-apache -y

Una vez instalado, ejecute el siguiente comando para proteger su sitio web con Let’s Encrypt SSL:

certbot --apache -d concrete5.example.com

Se le pedirá que proporcione su 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 standalone, Installer None
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
Plugins selected: Authenticator apache, Installer apache
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for concrete5.example.com
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/concrete5-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/concrete5-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/concrete5-le-ssl.conf

A continuación, seleccione si desea o no redirigir 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

Escriba 2 y presione Entrar para instalar Let’s Encrypt SSL para su sitio web:

Enabled Apache rewrite module
Redirecting vhost in /etc/apache2/sites-enabled/concrete5.conf to ssl vhost in /etc/apache2/sites-available/concrete5-le-ssl.conf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://concrete5.example.com

You should test your configuration at:
https://www.ssllabs.com/ssltest/analyze.html?d=concrete5.example.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/concrete5.example.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/concrete5.example.com/privkey.pem
   Your cert will expire on 2020-10-23. 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"
 - 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

Ahora, puede acceder a Concrete 5 de forma segura usando la URL https://concreto5.ejemplo.com.

Conclusión

En la guía anterior, aprendió cómo instalar Concrete5 CMS con Apache y Let’s Encrypt SSL en Ubuntu 20.04. Ahora puede publicar su contenido en Internet fácilmente utilizando el CMS de Concrete5. No dude en preguntarme si tiene alguna pregunta.

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *