GNU/Linux >> Linux Esercitazione >  >> Debian

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

SuiteCTM è una soluzione open source di Customer Relationship Management scritta in PHP. È un'applicazione CRM completa e altamente estensibile che funziona su qualsiasi sistema operativo. È diventato popolare quando SugarCRM ha deciso di interrompere lo sviluppo della sua edizione comunitaria. Viene utilizzato per creare strategie, azioni e decisioni aziendali. È una soluzione CRM alternativa per altri CRM commerciali come SugarCRM, Salesforce e Microsoft.

In questo post, ti mostreremo come installare SuiteCRM con Apache e Let's Encrypt SSL su Debian 11.

Prerequisiti

  • Un server che esegue Debian 11.
  • Un nome di dominio valido puntato all'IP del tuo server.
  • Sul server è configurata una password di root.

Installa Apache, MariaDB e PHP

SuiteCRM è un'applicazione basata su PHP e utilizza MariaDB come database back-end. Quindi dovrai installare il server Apache, il server del database MariaDB, PHP e altre estensioni PHP necessarie sul tuo server. Puoi installarli tutti usando il seguente comando:

apt-get install apache2 mariadb-server mariadb-client php php-common php-zip php-mysql php-gd php-curl php-imap php-mbstring php-xml php-json libapache2-mod-php unzip libpcre3 -y

Una volta installati tutti i pacchetti, modifica il file php.ini e cambia alcune impostazioni predefinite:

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

Modifica le seguenti impostazioni:

memory_limit = 256M
post_max_size = 64M
upload_max_filesize = 64M

Salva e chiudi il file, quindi riavvia il servizio Apache per applicare le modifiche:

systemctl restart apache2

Crea un database MariaDB per SuiteCRM

Innanzitutto, dovrai proteggere l'installazione di MariaDB e impostare una password di root. Puoi farlo eseguendo il seguente script:

mysql_secure_installation

Rispondi a tutte le domande come mostrato di seguito:

Enter current password for root: Press 
Set root password? [Y/n] y
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

Una volta terminato, accedi alla shell di MariaDB con il seguente comando:

mysql -u root -p

Una volta connesso a MariaDB, crea un database e un utente per SuiteCRM usando il seguente comando:

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

Successivamente, concedi tutti i privilegi al database di SuiteCRM con il seguente comando:

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

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

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

Dopo aver creato il database e l'utente MariaDB, puoi procedere al passaggio successivo.

Installa SuiteCRM

Innanzitutto, scarica l'ultima versione di SuiteCRM utilizzando il comando wget:

wget https://suitecrm.com/files/147/SuiteCRM-7.12/578/SuiteCRM-7.12.1.zip

Quindi, decomprimi il file scaricato con il seguente comando:

unzip SuiteCRM-7.12.1.zip

Quindi, sposta la directory estratta nella directory radice predefinita di Apache:

mv SuiteCRM-7.12.1 /var/www/html/suitecrm

Quindi, modifica la proprietà e l'autorizzazione della directory SuiteCRM:

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

Una volta terminato, puoi procedere al passaggio successivo.

Configura Apache per SuiteCRM

Successivamente, dovrai configurare Apache per ospitare SuiteCRM su Internet. Per fare ciò, crea un file di configurazione dell'host virtuale Apache con il seguente comando:

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

Aggiungi le seguenti righe:

<VirtualHost *:80>

 DocumentRoot /var/www/html/suitecrm
 ServerName suitecrm.example.com

 <Directory /var/www/html/suitecrm>
    Options FollowSymLinks
    AllowOverride All
 </Directory>

 ErrorLog /var/log/apache2/suitecrm-error.log
 CustomLog /var/log/apache2/suitecrm-access.log common

</VirtualHost>

Salvare e chiudere il file quindi attivare il file di configurazione dell'host virtuale SuiteCRM con il seguente comando:

a2ensite suitecrm.conf

Quindi, ricarica il servizio Apache per applicare le modifiche alla configurazione:

systemctl reload apache2

Per verificare lo stato del servizio Apache, eseguire il comando seguente:

systemctl status apache2

Otterrai il seguente output:

? apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2021-11-19 16:36:48 UTC; 4s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 16290 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
   Main PID: 16296 (apache2)
      Tasks: 6 (limit: 4679)
     Memory: 15.5M
        CPU: 99ms
     CGroup: /system.slice/apache2.service
             ??16296 /usr/sbin/apache2 -k start
             ??16297 /usr/sbin/apache2 -k start
             ??16298 /usr/sbin/apache2 -k start
             ??16299 /usr/sbin/apache2 -k start
             ??16300 /usr/sbin/apache2 -k start
             ??16301 /usr/sbin/apache2 -k start

Nov 19 16:36:48 debian11 systemd[1]: Starting The Apache HTTP Server...

Dopo aver configurato il web server Apache, puoi procedere con l'accesso all'interfaccia web di SuiteCRM.

Accesso all'interfaccia Web di SuiteCRM

Ora apri il tuo browser web e digita l'URL http://suitecrm.example.com per accedere all'interfaccia utente web di SuiteCRM. Dovresti vedere la seguente schermata:

Accetta il contratto di licenza e fai clic su Avanti pulsante. Dovresti vedere la seguente pagina:

Assicurati che tutti i controlli restituiscano OK, quindi fai clic su Avanti pulsante per continuare. Dovresti vedere la pagina di configurazione di SuiteCRM:

Fornisci le informazioni sul database, i dettagli dell'utente amministratore, le specifiche del server SMTP, i dettagli del marchio, le impostazioni di sicurezza del sito e fai clic su Avanti pulsante. Dovresti vedere la seguente pagina:

Fare clic su Avanti pulsante. Dovresti vedere la pagina di accesso di SuiteCRM:

Fornisci il nome utente e la password dell'amministratore e fai clic su ACCEDI pulsante. Dovresti vedere la dashboard di SuiteCRM nella schermata seguente:

SuiteCRM sicuro con Let's Encrypt SSL

Dopo aver configurato Apache, si consiglia di proteggere il proprio sito Web con il certificato Let's Encrypt SSL. Per fare ciò, dovrai installare il client Certbot nel tuo sistema. Certbot è un client facile da usare che recupera un certificato da Let's Encrypt, un'autorità di certificazione aperta lanciata da EFF, Mozilla e altri, e lo distribuisce a un server web. Utilizzando il client Certbot Let's Encrypt puoi facilmente scaricare, installare e rinnovare il certificato SSL per il tuo dominio.

Puoi installare Certbot con il seguente comando:

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

Una volta che il client Certbot è stato installato correttamente, esegui il seguente comando per installare Let's Encrypt SSL per il tuo sito web:

certbot --apache -d suitecrm.example.com

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

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 suitecrm.example.com
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/suitecrm-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/suitecrm-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/suitecrm-le-ssl.conf

Quindi, seleziona se reindirizzare o meno il traffico HTTP a HTTPS o configura Nginx per reindirizzare tutto il traffico per proteggere l'accesso HTTPS come mostrato nel seguente output:

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 avviare il processo. Una volta completata l'installazione, dovresti ottenere il seguente output:

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

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

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

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/suitecrm.example.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/suitecrm.example.com/privkey.pem
   Your cert will expire on 2022-02-21. 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 con successo SuiteCRM con Apache e Let's Encrypt SSL su Debian 11. Ora puoi esplorare SuiteCRM per ulteriori funzionalità. 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 Discourse Forum con Nginx e Free Lets Encrypt SSL su Debian 11

Come installare Etherpad con Nginx e SSL su Debian 11

Come installare Gitea con Nginx e Lets Encrypt SSL gratuito su Ubuntu 20.04

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