Instalación Prestashop · 7 min read · Nov 25, 2025

Cómo instalar PrestaShop con Apache y Let's Encrypt SSL en CentOS 8

PrestaShop es un carrito de compras de código abierto escrito en PHP utilizado para crear y gestionar tu negocio en línea. Proporciona una interfaz simple y fácil de usar que te ayuda a lanzar tu tienda en línea en un tiempo mínimo. Ofrece muchas características, incluyendo una interfaz amigable, múltiples pasarelas de pago (PayPal, Google Checkout), diseño responsivo para móviles, soporte gratuito, multilingüe, analítica, informes y más.

En esta publicación, te mostraremos cómo instalar PrestaShop con Apache y un certificado SSL gratuito de Let’s Encrypt en CentOS 8.

Prerrequisitos

  • Un servidor que ejecute CentOS 8.
  • Un nombre de dominio válido apuntado a la IP de tu servidor.
  • Una contraseña de root configurada en tu servidor.

Instalar el servidor LAMP

Antes de comenzar, el servidor LAMP debe estar instalado en tu servidor. Si no está instalado, puedes instalarlo con otras extensiones de PHP usando el siguiente comando:

dnf install httpd mariadb-server php php-cli php-bcmath php-mysqli php-gd php-pdo php-xmlrpc php-intl php-posix php-json php-curl php-zip unzip -y

Después de instalar todos los paquetes requeridos, edita el archivo php.ini y cambia algunas configuraciones predeterminadas:

nano /etc/php.ini

Cambia las siguientes líneas:

max_input_vars = 3000
post_max_size = 64M
upload_max_filesize = 64M
max_execution_time = 600
memory_limit = 256M
date.timezone = Asia/Kolkata

Guarda y cierra el archivo, luego inicia el servicio de Apache y MariaDB y habilítalos para que se inicien al reiniciar el sistema:

systemctl start httpd  
systemctl start mariadb  
systemctl enable httpd  
systemctl enable mariadb

En este punto, el servidor LAMP está instalado en tu servidor.

Crear una base de datos para PrestaShop

PrestaShop utiliza una base de datos MySQL/MariaDB para almacenar sus datos. Así que necesitarás crear una base de datos y un usuario para PrestaShop.

Primero, inicia sesión en MariaDB con el siguiente comando:

mysql

Una vez que hayas iniciado sesión, crea una base de datos y un usuario con el siguiente comando:

MariaDB [(none)]> CREATE DATABASE prestashopdb;  
MariaDB [(none)]> CREATE USER 'prestashopuser'@'localhost' IDENTIFIED BY 'securepassword';

A continuación, otorga todos los privilegios a prestashopdb con el siguiente comando:

MariaDB [(none)]> GRANT ALL PRIVILEGES ON prestashopdb. * TO 'prestashopuser'@'localhost';

Luego, actualiza los privilegios y sal de MariaDB con el siguiente comando:

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

Una vez que hayas terminado, puedes proceder al siguiente paso.

Instalar PrestaShop

A continuación, necesitarás descargar la última versión de PrestaShop desde su página oficial de descargas. Puedes descargarla con el siguiente comando:

wget https://download.prestashop.com/download/releases/prestashop_1.7.7.3.zip

Una vez que la descarga esté completa, descomprime el archivo descargado en el directorio raíz de Apache usando el siguiente comando:

unzip prestashop_1.7.7.3.zip -d /var/www/html/prestashop

A continuación, establece la propiedad adecuada en el directorio prestashop usando el siguiente comando:

chown -R apache:apache /var/www/html/prestashop

Una vez que hayas terminado, puedes proceder al siguiente paso.

Configurar Apache para PrestaShop

A continuación, necesitarás crear un archivo de configuración de host virtual de Apache para PrestaShop. Puedes crearlo con el siguiente comando:

nano /etc/httpd/conf.d/prestashop.conf

Agrega las siguientes líneas:


    ServerAdmin [email protected]
    ServerName prestashop.example.com
    DocumentRoot /var/www/html/prestashop

    
        Options +FollowSymlinks
        AllowOverride All
        Require all granted
    

    ErrorLog /var/log/httpd/prestashop-error_log
    CustomLog /var/log/httpd/prestashop-access_log common

Guarda y cierra el archivo cuando hayas terminado. A continuación, reinicia el servicio de Apache para aplicar los cambios:

systemctl restart httpd

A continuación, verifica el estado del servicio de Apache usando el siguiente comando:

systemctl status httpd

Deberías obtener la siguiente salida:

? httpd.service - El servidor HTTP Apache
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
  Drop-In: /usr/lib/systemd/system/httpd.service.d
           ??php-fpm.conf
   Active: active (running) since Wed 2021-04-07 01:04:19 EDT; 2h 2min ago
     Docs: man:httpd.service(8)
 Main PID: 47841 (httpd)
   Status: "Total requests: 313; Idle/Busy workers 100/0;Requests/sec: 0.0425; Bytes served/sec: 1.2KB/sec"
    Tasks: 278 (limit: 12524)
   Memory: 35.9M
   CGroup: /system.slice/httpd.service
           ??47841 /usr/sbin/httpd -DFOREGROUND
           ??47843 /usr/sbin/httpd -DFOREGROUND
           ??47844 /usr/sbin/httpd -DFOREGROUND
           ??47845 /usr/sbin/httpd -DFOREGROUND
           ??47846 /usr/sbin/httpd -DFOREGROUND
           ??48061 /usr/sbin/httpd -DFOREGROUND

Apr 07 01:04:19 centos8 systemd[1]: Stopped El servidor HTTP Apache.
Apr 07 01:04:19 centos8 systemd[1]: Starting El servidor HTTP Apache...

Una vez que hayas terminado, puedes proceder al siguiente paso.

Configurar el Firewall

A continuación, necesitarás permitir los puertos 80 y 443 a través del firewall. Puedes permitirlos con el siguiente comando:

firewall-cmd --zone=public --permanent --add-service=http  
firewall-cmd --zone=public --permanent --add-service=https

A continuación, recarga el firewall para aplicar los cambios:

firewall-cmd --reload

Una vez que hayas terminado, puedes proceder al siguiente paso.

Acceder a PrestaShop

Ahora, abre tu navegador web y accede a la interfaz web de PrestaShop usando la URL http://prestashop.example.com. Serás redirigido a la siguiente página:

Instalador de Prestashop

Elegir idioma

Selecciona tu idioma y haz clic en el botón Siguiente. Deberías ver la siguiente página:

Acuerdo de licencia

Acepta el acuerdo de licencia y haz clic en el botón Siguiente. Deberías ver la siguiente página:

Detalles de la tienda

Cuenta de administrador

Proporciona el nombre de tu tienda, información del país, información de la cuenta y haz clic en el botón Siguiente. Deberías ver la siguiente página:

Configuración de la base de datos

Proporciona el nombre de tu base de datos, nombre de usuario de la base de datos, contraseña y haz clic en el botón Siguiente. Una vez que la instalación haya terminado, deberías ver la siguiente página:

Instalación de Prestashop finalizada con éxito

Haz clic en el botón Gestiona tu tienda. Deberías ver la siguiente página:

Eliminar instalador

Ahora, elimina la carpeta de instalación con el siguiente comando:

rm -rf /var/www/html/prestashop/install

A continuación, haz clic en la URL de administración de PrestaShop. Deberías ver la siguiente página:

Inicio de sesión de Prestashop admin

Proporciona tu nombre de usuario de administrador, contraseña y haz clic en el botón INICIAR SESIÓN. Deberías ver el panel de control de PrestaShop en la siguiente página:

Panel de control de Prestashop

Asegurar PrestaShop con Let’s Encrypt SSL

A continuación, necesitarás instalar el cliente Certbot para instalar el SSL de Let’s Encrypt para PrestaShop. Puedes instalarlo con el siguiente comando:

dnf install letsencrypt python3-certbot-apache

A continuación, obtén e instala un certificado SSL para tu dominio lets con el siguiente comando:

certbot --apache -d prestashop.example.com

Se te pedirá que proporciones tu dirección de correo electrónico y aceptes los términos del servicio:

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. Do you agree?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
(Y)es/(N)o: Y

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Would you be willing, once your first certificate is successfully issued, 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
Account registered.
Requesting a certificate for prestashop.example.com
Performing the following challenges:
http-01 challenge for prestashop.example.com
Waiting for verification.
Cleaning up challenges
Deploying Certificate to VirtualHost /etc/httpd/conf.d/prestashop.conf
Redirecting all traffic on port 80 to ssl in /etc/httpd/conf.d/prestashop.conf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://prestashop.example.com
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Subscribe to the EFF mailing list (email: [email protected]).


IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/prestashop.example.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/prestashop.example.com/privkey.pem
   Your certificate will expire on 2021-06-09. 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 puedes acceder a tu sitio web de forma segura utilizando la URL https://prestashop.example.com. Si deseas hacer redirecciones por dispositivo, consulta aquí.

Conclusión

¡Felicidades! has instalado con éxito PrestaShop con Apache y Let’s Encrypt SSL en CentOS 8. Ahora puedes agregar tus productos a PrestaShop y comenzar a vender en línea. No dudes en preguntarme si tienes alguna pregunta.

Share: X/Twitter LinkedIn

Recibe nuevas publicaciones en tu bandeja de entrada.

No spam. Cancela la suscripción en cualquier momento.