GNU/Linux >> Linux Esercitazione >  >> Debian

Come installare Joomla con Apache e Lets Encrypt SSL su Debian 10

Joomla è un sistema di gestione dei contenuti gratuito e open source utilizzato per creare, modificare e gestire il contenuto di un sito web. È semplice e facile da usare, quindi non è necessaria alcuna conoscenza di HTML o CSS per creare il sito web. È scritto in PHP e utilizza MySQL come database. Offre un'ampia gamma di funzionalità che lo rendono un sistema di gestione dei contenuti flessibile fin da subito. Viene fornito con centinaia di estensioni gratuite che ti consentono di personalizzare ed estendere la funzionalità.

In questo tutorial, ti mostrerò come installare Joomla CMS con Apache e Let's Encrypt su Debian 10.

Prerequisiti

  • Un server che esegue Debian 10.
  • Un nome di dominio valido puntato all'IP del tuo server.
  • Una password di root è configurata sul server.

Per iniziare

Innanzitutto, aggiorna i pacchetti di sistema alla versione aggiornata eseguendo il comando seguente:

apt-get update -y

Una volta aggiornati tutti i pacchetti, puoi procedere al passaggio successivo.

Installa il server LAMP

Successivamente, dovrai installare il server Web Apache, il database MariaDB, PHP e altre estensioni PHP sul tuo sistema. Puoi installarli tutti con il seguente comando:

apt-get install apache2 mariadb-server php openssl php-imagick php-common php-curl php-gd php-imap php-intl php-json php-ldap php-mbstring php-mysql php-pgsql php-smbclient php-ssh2 php-sqlite3 php-xml php-zip -y

Una volta installati tutti i pacchetti, puoi procedere al passaggio successivo.

Crea un database per Joomla

Joomla utilizza MySQL o MariaDB per archiviare il suo contenuto. Quindi dovrai creare un database e un utente per Joomla.

Innanzitutto, connettiti a MariaDB con il seguente comando:

mysql

Una volta connesso, crea un database e un utente con il seguente comando:

MariaDB [(none)]> CREATE DATABASE joomladb;
MariaDB [(none)]> GRANT ALL ON joomladb.* TO 'joomlauser'@'localhost' IDENTIFIED BY 'password';

Quindi, svuota i privilegi ed esci da MariaDB con il seguente comando:

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

Una volta terminato, puoi procedere al passaggio successivo.

Installa Joomla

Quindi, scarica l'ultima versione di Joomla con il seguente comando:

wget https://downloads.joomla.org/cms/joomla3/3-9-25/Joomla_3-9-25-Stable-Full_Package.tar.bz2

Una volta completato il download, crea una directory per Joomla all'interno della web root di Apache:

mkdir /var/www/html/joomla

Quindi, esegui il seguente comando per estrarre il file scaricato nella directory di Joomla:

bunzip2 Joomla_3-9-25-Stable-Full_Package.tar.bz2
tar -xvf Joomla_3-9-25-Stable-Full_Package.tar -C /var/www/html/joomla/

Quindi, imposta l'autorizzazione e la proprietà appropriate per la directory Joomla con il seguente comando:

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

Una volta terminato, puoi procedere al passaggio successivo.

Configura server Web Apache

Successivamente, dovrai creare un file di configurazione dell'host virtuale Apache per ospitare Joomla.

Puoi crearlo con il seguente comando:

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

Aggiungi le seguenti righe:

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

Salva e chiudi il file, quindi abilita l'host virtuale Apache con il seguente comando:

a2ensite joomla

Quindi, riavvia il servizio Apache per applicare le modifiche:

systemctl restart apache2

Successivamente, verifica lo stato dell'Apache con il seguente comando:

systemctl status apache2

Dovresti ottenere il seguente output:

? apache2.service - The Apache HTTP Server
   Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
   Active: active (running) since Mon 2021-03-22 09:26:20 UTC; 4s ago
     Docs: https://httpd.apache.org/docs/2.4/
  Process: 14495 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
 Main PID: 14499 (apache2)
    Tasks: 6 (limit: 4701)
   Memory: 18.8M
   CGroup: /system.slice/apache2.service
           ??14499 /usr/sbin/apache2 -k start
           ??14500 /usr/sbin/apache2 -k start
           ??14501 /usr/sbin/apache2 -k start
           ??14502 /usr/sbin/apache2 -k start
           ??14503 /usr/sbin/apache2 -k start
           ??14504 /usr/sbin/apache2 -k start

Mar 22 09:26:20 debian10 systemd[1]: Starting The Apache HTTP Server...

Accedi a Joomla

Ora apri il tuo browser web e accedi all'interfaccia web di Joomla utilizzando l'URL http://joomla.example.com . Verrai reindirizzato alla seguente pagina:

Ora, fornisci il nome del tuo sito, l'indirizzo e-mail, il nome utente dell'amministratore, la password e fai clic su Avanti pulsante. Dovresti vedere la seguente pagina:

Fornisci il nome del database, il nome utente del database, la password e fai clic su Avanti pulsante. Dovresti vedere la seguente pagina:

Ora, conferma tutte le impostazioni e fai clic su Installa pulsante per avviare l'installazione. Una volta completata l'installazione, dovresti vedere la seguente pagina:

Fai clic su Rimuovi installazione cartella . Dovresti vedere la seguente pagina:

Ora, fai clic su Amministratore pulsante, dovresti vedere la pagina di accesso di Joomla:

Fornisci le tue credenziali di amministratore e fai clic su Accedi pulsante, dovresti vedere il pannello di controllo di Joomla nell'immagine seguente:

Proteggi Joomla con Let's Encrypt SSL

È sempre una buona idea proteggere il tuo sito Web con Let's Encrypt SSL. Sarà necessario installare il client Certbot per installare e gestire SSL. Puoi installarlo con il seguente comando:

apt-get install python3-certbot-apache -y

Una volta installato Certbot, esegui il comando seguente per proteggere il tuo sito Web con Let's Encrypt SSL:

certbot --apache -d joomla.example.com

Ti verrà chiesto di fornire la tua email e di accettare i termini del servizio come mostrato di seguito:

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 joomla.example.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

Quindi, seleziona se reindirizzare o meno il traffico HTTP su HTTPS come mostrato di seguito:

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

Digita 2 e premi Invio per installare Let's Encrypt SSL per il tuo sito web:

Enabled Apache rewrite module
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.example.com

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

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/joomla.example.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/joomla.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

Conclusione

Congratulazioni! hai installato correttamente Joomla CMS sul server Debian 10. Ora puoi creare facilmente il tuo sito Web utilizzando Joomla. Sentiti libero di chiedermi se hai domande.


Debian
  1. Come installare Tiki Wiki con Apache e Lets crittografa SSL su Debian 10

  2. Come installare Automatad CMS con Apache e Lets crittografare su Debian 10

  3. Come installare ElkArte Forum con Apache e Lets Encrypt su Debian 10

  4. Come installare WonderCMS con Apache e Lets Encrypt SSL su CentOS 8

  5. Come installare OpenCart con Nginx e Lets Encrypt su Debian 10

Come installare SuiteCRM con Apache e Lets Encrypt SSL gratuito su Debian 11

Come installare InvoicePlane con Apache e Free Lets Encrypt SSL Certificate su Debian 11

Come installare Lighttpd con PHP, MariaDB e Lets Encrypt SSL su Debian 10

Come installare Wekan Kanban con Nginx e Lets Encrypt SSL su Debian 10

Come installare WordPress con Apache e Let's Encrypt SSL su Debian 11

Come installare Joomla con Nginx e Let's Encrypt SSL su Debian 11