GNU/Linux >> Linux Esercitazione >  >> Ubuntu

Come installare il software ElkArte Forum su Ubuntu 20.04

ElkArte è un potente software per la creazione di forum di comunità gratuito, open source e basato su Simple Machines Forum. È scritto in PHP e consente di creare un forum della comunità completamente reattivo ai dispositivi mobili e wireless. È progettato per fornire immediatamente tutte le funzionalità necessarie per un forum della community completo.

ElkArte è la scelta giusta per te se stai cercando una piattaforma forum semplice e diretta, facile da personalizzare.

In questo tutorial, ti mostreremo come installare ElkArte con Let's Encrypt SSL su Ubuntu 20.04.

Prerequisiti

  • Un server che esegue Ubuntu 20.04.
  • Un nome di dominio valido puntato al tuo server.
  • Sul tuo server è configurata una password di root.

Installa Apache, PHP e MariaDB

ElkArte gira sul webserver, basato su PHP e usa MariaDB come database backend. Quindi dovrai installare le estensioni Apache, MariaDB, PHP e altre estensioni PHP nel tuo server. Puoi installare tutti i pacchetti con il seguente comando:

apt-get install apache2 mariadb-server php7.4 libapache2-mod-php7.4 php7.4-common php7.4-curl php7.4-intl php7.4-mbstring php7.4-xmlrpc php7.4-mysql php7.4-gd php7.4-pgsql php7.4-xml php7.4-cli php7.4-imagick php7.4-bcmath php7.4-gmp php7.4-zip unzip -y

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

nano /etc/php/7.4/apache2/php.ini
Change the following lines:
memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = Asia/Kolkata

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

systemctl restart apache2

Configura il database MariaDB

Per prima cosa, proteggi l'installazione di MariaDB e imposta la password root di MariaDB con il seguente comando:

mysql_secure_installation

Rispondi a tutte le domande come mostrato di seguito:

Enter current password for root (enter for none):
Set root password? [Y/n] Y
New password:
Re-enter new password:
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

Quindi, accedi alla shell MariaDB con il seguente comando:

mysql -u root -p

Dopo il login, crea un database e un utente per ElkArte:

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

Quindi, concedi tutti i privilegi a elkdb con il seguente comando:

MariaDB [(none)]> GRANT ALL ON elkdb.* TO 'elk'@'localhost' WITH GRANT OPTION;

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

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

Una volta configurato il database, puoi procedere al passaggio successivo.

Scarica ElkArte

Per prima cosa, scarica l'ultima versione di ElkArte dal repository Git usando il seguente comando:

wget https://github.com/elkarte/Elkarte/releases/download/v1.1.6/ElkArte_v1-1-6_install.zip

Una volta completato il download, decomprimere il file scaricato nella directory principale Web di Apache utilizzando il seguente comando:

unzip ElkArte_v1-1-6_install.zip -d /var/www/html/elkarte

Quindi, dai i permessi appropriati alla directory elkarte usando il seguente comando:

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

Una volta terminato, puoi procedere al passaggio successivo.

Configura Apache per ElkArte

Quindi, crea un nuovo file di configurazione dell'host virtuale Apache per ElkArte.

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

Aggiungi le seguenti righe:

<VirtualHost *:80>
     ServerAdmin [email protected]
     ServerName elk.linuxbuz.com
     DocumentRoot /var/www/html/elkarte

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

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

Salva e chiudi il file quando hai finito. Quindi, abilita l'host virtuale Apache e riscrivi il modulo con il seguente comando:

a2ensite elkarte.conf
a2enmod rewrite

Infine, riavvia il servizio Apache per implementare le modifiche.

systemctl restart apache2

Proteggi ElkArte con Let's Encrypt SSL

Innanzitutto, installa il client Let's Encrypt di Certbot per gestire l'SSL per il tuo sito web:

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

Una volta installato Certbot, esegui il seguente comando per scaricare e installare Let's Encrypt SSL per il tuo sito web:

certbot --apache -d elk.linuxbuz.com

Ti verrà chiesto di fornire il tuo indirizzo email 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 elk.linuxbuz.com
Enabled Apache rewrite module
Waiting for verification...
Cleaning up challenges
Created an SSL vhost at /etc/apache2/sites-available/elk-le-ssl.conf
Enabled Apache socache_shmcb module
Enabled Apache ssl module
Deploying Certificate to VirtualHost /etc/apache2/sites-available/elk-le-ssl.conf
Enabling available site: /etc/apache2/sites-available/elk-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 completare l'installazione come mostrato di seguito.

Redirecting vhost in /etc/apache2/sites-enabled/elk.conf to ssl vhost in /etc/apache2/sites-available/elk-le-ssl.conf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://elk.linuxbuz.com

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

IMPORTANT NOTES:
 - Congratulations! Your certificate and chain have been saved at:
   /etc/letsencrypt/live/elk.linuxbuz.com/fullchain.pem
   Your key file has been saved at:
   /etc/letsencrypt/live/elk.linuxbuz.com/privkey.pem
   Your cert will expire on 2020-08-19. 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"
 - Your account credentials have been saved in your Certbot
   configuration directory at /etc/letsencrypt. You should make a
   secure backup of this folder now. This configuration directory will
   also contain certificates and private keys obtained by Certbot so
   making regular backups of this folder is ideal.
 - 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

 - We were unable to subscribe you the EFF mailing list because your
   e-mail address appears to be invalid. You can try again later by
   visiting https://act.eff.org.

A questo punto, il tuo ElkArte è protetto con Let's Encrypt SSL.

Accedi all'interfaccia web di ElkArte

Ora apri il tuo browser web e digita l'URL https://elk.linuxbuz.com. Verrai reindirizzato alla pagina di benvenuto di ElkArte:

Fai clic su Continua pulsante. Dovresti vedere la pagina delle impostazioni del server di database:

Fornisci i dettagli del tuo database e fai clic su Continua pulsante. Dovresti vedere la pagina delle impostazioni del forum:

Fornisci l'URL del forum, il nome del forum e fai clic su Continua pulsante. Dovresti vedere la seguente pagina:

Fai clic su Continua pulsante. Dovresti vedere la pagina di creazione dell'account amministratore:

Fornisci il tuo nome utente amministratore, password, e-mail e fai clic su Continua pulsante. Una volta terminata l'installazione, dovresti vedere la seguente pagina:

Fai clic su il tuo forum appena installato . Dovresti vedere la dashboard di ElkArte nella pagina seguente:

Conclusione

Congratulazioni! hai installato con successo ElkArte con Apache e Let's Encrypt SSL su Ubuntu 20.04. Ora puoi ospitare facilmente il tuo forum della community con ElkArte. Sentiti libero di chiedermi se hai domande.


Ubuntu
  1. Come installare MariaDB 10.4 su Ubuntu 18.04

  2. Come installare MariaDB su Ubuntu 18.04

  3. Come installare ProcessWire CMS su Ubuntu 18.04 LTS

  4. Come installare SEO Panel su Ubuntu 18.04 LTS

  5. Come installare EPESI CRM su Ubuntu 18.04 LTS

Come installare il forum della community di Elkarte su Ubuntu 15.04

Come installare MariaDB su Ubuntu 16.04

Come installare lo stack LAMP su Ubuntu 18.04 LTS

Come installare CachetHQ su Ubuntu 18.04 LTS

Come installare Elkarte su Ubuntu 18.04 LTS

Come installare il software di contabilità Akaunting su Ubuntu 20.04