GNU/Linux >> Tutoriales Linux >  >> Ubuntu

Cómo instalar el software del foro ElkArte en Ubuntu 20.04

ElkArte es un potente software de creación de foros comunitarios gratuito, de código abierto y basado en Simple Machines Forum. Está escrito en PHP y le permite crear un foro comunitario que responda completamente a dispositivos móviles e inalámbricos. Está diseñado para proporcionar todas las funciones que necesita para un foro comunitario completo desde el primer momento.

ElkArte es la opción correcta para usted si está buscando una plataforma de foro simple y directa que sea fácil de personalizar.

En este tutorial, le mostraremos cómo instalar ElkArte con Let's Encrypt SSL en Ubuntu 20.04.

Requisitos

  • Un servidor con Ubuntu 20.04.
  • Un nombre de dominio válido apuntado con su servidor.
  • Se ha configurado una contraseña raíz en su servidor.

Instalar Apache, PHP y MariaDB

ElkArte se ejecuta en el servidor web, basado en PHP y utiliza MariaDB como base de datos. Por lo tanto, deberá instalar Apache, MariaDB, PHP y otras extensiones de PHP en su servidor. Puede instalar todos los paquetes con el siguiente 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 vez que todos los paquetes estén instalados, abra el archivo php.ini y modifique algunas configuraciones útiles:

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

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

systemctl restart apache2

Configurar base de datos MariaDB

Primero, asegure la instalación de MariaDB y configure la contraseña raíz de MariaDB con el siguiente comando:

mysql_secure_installation

Responda todas las preguntas como se muestra a continuación:

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

A continuación, inicie sesión en el shell de MariaDB con el siguiente comando:

mysql -u root -p

Después de iniciar sesión, cree una base de datos y un usuario para ElkArte:

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

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

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

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

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

Una vez que la base de datos esté configurada, puede continuar con el siguiente paso.

Descargar ElkArte

Primero, descargue la última versión de ElkArte desde el repositorio de Git usando el siguiente comando:

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

Una vez que se complete la descarga, descomprima el archivo descargado en el directorio raíz web de Apache usando el siguiente comando:

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

A continuación, otorgue los permisos adecuados al directorio elkarte usando el siguiente comando:

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

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

Configurar Apache para ElkArte

A continuación, cree un nuevo archivo de configuración de host virtual de Apache para ElkArte.

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

Agregue las siguientes líneas:

<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>

Guarde y cierre el archivo cuando haya terminado. Luego, habilite el host virtual de Apache y el módulo de reescritura con el siguiente comando:

a2ensite elkarte.conf
a2enmod rewrite

Finalmente, reinicie el servicio Apache para implementar los cambios.

systemctl restart apache2

Asegure ElkArte con Let's Encrypt SSL

Primero, instale Certbot Let's Encrypt Client para administrar el SSL de su sitio web:

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

Una vez que Certbot esté instalado, ejecute el siguiente comando para descargar e instalar Let's Encrypt SSL para su sitio web:

certbot --apache -d elk.linuxbuz.com

Se le pedirá que proporcione su dirección de 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 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

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

Tipo 2 y pulsa Intro para finalizar la instalación como se muestra a continuación.

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.

En este punto, su ElkArte está protegido con Let's Encrypt SSL.

Acceso a la Interfaz Web de ElkArte

Ahora, abra su navegador web y escriba la URL https://elk.linuxbuz.com. Será redirigido a la página de bienvenida de ElkArte:

Haga clic en Continuar botón. Debería ver la página de configuración del servidor de la base de datos:

Proporcione los detalles de su base de datos y haga clic en Continuar botón. Debería ver la página de configuración del foro:

Proporcione la URL de su foro, el nombre del foro y haga clic en Continuar botón. Debería ver la siguiente página:

Haga clic en Continuar botón. Debería ver la página de creación de cuenta de administrador:

Proporcione su nombre de usuario, contraseña y correo electrónico de administrador y haga clic en Continuar botón. Una vez finalizada la instalación, debería ver la siguiente página:

Haz clic en tu foro recién instalado . Deberías ver el tablero de ElkArte en la siguiente página:

Conclusión

¡Felicidades! ha instalado con éxito ElkArte con Apache y Let's Encrypt SSL en Ubuntu 20.04. Ahora puede organizar fácilmente su propio foro comunitario con ElkArte. Siéntase libre de preguntarme si tiene alguna pregunta.


Ubuntu
  1. Cómo instalar MariaDB 10.4 en Ubuntu 18.04

  2. Cómo instalar MariaDB en Ubuntu 18.04

  3. Cómo instalar ProcessWire CMS en Ubuntu 18.04 LTS

  4. Cómo instalar Panel SEO en Ubuntu 18.04 LTS

  5. Cómo instalar EPESI CRM en Ubuntu 18.04 LTS

Cómo instalar el foro de la comunidad de Elkarte en Ubuntu 15.04

Cómo instalar MariaDB en Ubuntu 16.04

Cómo instalar LAMP Stack en Ubuntu 18.04 LTS

Cómo instalar CachetHQ en Ubuntu 18.04 LTS

Cómo instalar Elkarte en Ubuntu 18.04 LTS

Cómo instalar el software de contabilidad Akaunting en Ubuntu 20.04