Cómo instalar TYPO3 CMS con Let’s Encrypt SSL en Ubuntu 20.04

Instalación de Typo3

TYPO3 es un sistema de gestión de contenido gratuito y de código abierto escrito en PHP. Es un CMS de clase empresarial que combina código fuente abierto con confiabilidad y verdadera escalabilidad. Se ejecuta en un servidor web y admite una gran cantidad de sistemas operativos, incluidos Windows, Linux, macOS, etc. Es un CMS simple, receptivo, listo para dispositivos móviles y seguro, y se puede personalizar y ampliar fácilmente sin escribir ningún código. Es una opción muy popular y excelente para poner en marcha su sitio web rápidamente.

En este tutorial, le mostraremos cómo instalar TYPO3 CMS con el servidor web Apache y Let’s Encrypt SSL en Ubuntu 20.04.

requisitos previos

  • Un servidor con Ubuntu 20.04.
  • Un nombre de dominio válido apuntado con la IP de su servidor.
  • Se configura una contraseña de root en el servidor.

Empezando

Primero, se recomienda actualizar los paquetes de su sistema con la última versión. Puede actualizar todos los paquetes ejecutando el siguiente comando:

apt-get update -y

Una vez que todos los paquetes estén actualizados, puede continuar con el siguiente paso.

Instalar servidor LAMP

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

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

Después de instalar todos los paquetes, edite el archivo php.ini y cambie algunas configuraciones recomendadas:

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

Cambia las siguientes líneas:

memory_limit = 256M
upload_max_filesize = 100M
post_max_size = 100M
max_execution_time = 360
max_input_vars = 1500
date.timezone = Asia/Kolkata

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

systemctl restart apache2

Crear una base de datos para TYPO3

A continuación, deberá crear una base de datos y un usuario para TYPO3. Primero, inicie sesión en el shell de 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 typo3db;
MariaDB [(none)]> CREATE USER ''@'localhost' IDENTIFIED BY 'password';

A continuación, otorgue todos los privilegios a typo3db con el siguiente comando:

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

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

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

En este punto, su base de datos MariaDB está configurada.

Instalar TYPO3 CMS

Primero, deberá descargar la última versión de TYPO3 desde su sitio web oficial. Puedes usar el comando curl para descargarlo:

curl -L -o typo3_src.tgz https://get.typo3.org/10.4.9

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

tar -xvzf typo3_src.tgz

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

mv typo3_src-10.4.9 /var/www/html/typo3

A continuación, otorgue el permiso y el permiso adecuados con el siguiente comando:

chown -R www-data:www-data /var/www/html/typo3
chmod -R 775 /var/www/html/typo3

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

Configurar Apache para TYPO3

A continuación, cree un archivo de configuración de host virtual de Apache para alojar TYPO3 CMS. Puedes crearlo con el siguiente comando:

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

Agregue las siguientes líneas:

<VirtualHost *:80>
     ServerAdmin [email protected]
     DocumentRoot /var/www/html/typo3
     ServerName typo3.example.com
     <Directory /var/www/html/typo3>
        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 archivo de configuración del host virtual y vuelva a escribir el módulo con el siguiente comando:

a2ensite typo3.conf
a2enmod rewrite

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

systemctl restart apache2

En este punto, el servidor web Apache está configurado para servir TYPO3. Ahora puede continuar con el siguiente paso.

Acceder a TYPO3 CMS

Ahora, abra su navegador web y acceda a TYPO3 utilizando la URL http://typo3.example.com. Deberías ver la siguiente página:

Instalación de Typo3Anuncio publicitario

Si está instalando TYPO3 en un servidor nuevo, deberá crear un FIRST_INSTALL dentro del directorio raíz web de TYPO3. Puedes crearlo con el siguiente comando:

touch /var/www/html/typo3/FIRST_INSTALL

A continuación, actualice la página web. Deberías ver la siguiente página:

Descripción general del entorno

Haga clic en el No se detectaron problemas, continuar con la instalación, deberías ver la siguiente página:

Configurar la base de datos

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

Usar base de datos existente

Seleccione el nombre de su base de datos TYPO3 y haga clic en el Continuar botón. Deberías ver la siguiente página:

Crear usuario administrador

A continuación, proporcione su nombre de usuario de administrador, contraseña, nombre del sitio y haga clic en el Continuar botón. Será redirigido a la página de inicio de sesión de TYPO3:

inicio de sesión tipo3

Proporcione su nombre de usuario y contraseña de administrador y haga clic en el Acceso botón. Debería ver el tablero de TYPO3 en la siguiente página:

Panel de administración de Typo3

Asegure TYPO3 con Let’s Encrypt

Se recomienda asegurar su sitio web con Let’s Encrypt Free SSL. Primero, instale el cliente Certbot para instalar y administrar SSL. Puedes instalarlo con 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 typo3.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 typo3.example.com
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/typo3-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/typo3-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/typo3-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

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/typo3.conf to ssl vhost in /etc/apache2/sites-available/typo3-le-ssl.conf

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

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

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/typo3.example.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/typo3.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 al TYPO3 CMS de forma segura utilizando la URL https://typo3.example.com.

Conclusión

¡Felicidades! Ha instalado correctamente TYPO3 CMS y lo ha asegurado con Let’s Encrypt SSL en Ubuntu 20.04. Ahora puede crear su sitio web y blog fácilmente a través del navegador web. 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 *