GNU/Linux >> Tutoriales Linux >  >> Ubuntu

Cómo instalar la plataforma de red social Friendica en Ubuntu 20.04

Friendica es una plataforma de redes sociales descentralizada, gratuita y de código abierto que le ayuda a crear y mantener sus propios proyectos de redes sociales. Tiene soporte integrado para ActivityPub, incluidos Mastodon, Hubzilla, OStatus, Pleroma y más. Le permite importar sus sitios web y blogs a su flujo social a través de fuentes RSS/Atom. Proporciona un poderoso panel de administración y de usuario que lo ayuda a administrar su red social desde cualquier dispositivo.

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

Requisitos

  • Un servidor con Ubuntu 20.04.
  • Un nombre de dominio válido apuntado con la IP de su servidor.
  • Se configura una contraseña de root en el servidor.

Cómo empezar

Antes de comenzar, deberá actualizar los paquetes de su sistema a la última versión. Puede actualizarlos usando el siguiente comando:

apt-get update -y

Una vez que su servidor esté actualizado, puede continuar con el siguiente paso.

Instalar servidor LAMP

Friendica se ejecuta en un servidor web, está escrito en PHP y utiliza MySQL como base de datos. Por lo tanto, la pila LAMP debe estar instalada en su sistema. Si no está instalado, puede instalarlo con el siguiente comando:

apt-get install apache2 mariadb-server php libapache2-mod-php php-common php-gmp php-curl php-intl php-mbstring php-xmlrpc php-mysql php-gd php-imagick php-xml php-cli php-zip php-sqlite3 curl git -y

Una vez que todos los paquetes estén instalados, edite el archivo php.ini y realice algunos cambios:

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

Cambie las siguientes líneas:

memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 300
max_input_vars = 1500
date.timezone = Asia/Kolkata

Guarde y cierre el archivo cuando haya terminado.

Crea una base de datos de Friendica

A continuación, deberá crear una base de datos y un usuario para Friendica. Primero, conéctese a MySQL con el siguiente comando:

mysql

Una vez conectado, cree una base de datos y un usuario con el siguiente comando:

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

A continuación, otorga todos los privilegios a la base de datos de Friendica con el siguiente comando:

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

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

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

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

Descargar Friendica

Antes de descargar Friendica, deberá instalar Composer en su sistema. Puede instalarlo con el siguiente comando:

apt-get install composer -y

Una vez instalado, cambie el directorio a Apache web root y descargue la última versión de Friendica desde el repositorio de Git:

cd /var/www/html
git clone https://github.com/friendica/friendica.git

Una vez que se complete la descarga, cambie el directorio a friendica e instale las dependencias de PHP requeridas con el siguiente comando:

cd friendica
composer install --no-dev

A continuación, descarga los complementos de Friendica con el siguiente comando:

git clone https://github.com/friendica/friendica-addons.git

A continuación, establezca la propiedad y el permiso adecuados para el directorio de friendica:

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

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

Configurar Apache para Friendica

A continuación, deberá crear un archivo de configuración de host virtual de Apache para alojar Friendica. Puedes crearlo con el siguiente comando:

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

Agregue las siguientes líneas:

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


     <Directory /var/www/html/friendica/>
        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, luego habilite el host virtual de Apache y el módulo de reescritura con el siguiente comando:

a2ensite friendica.conf
a2enmod rewrite

A continuación, vuelva a cargar el servicio de Apache para aplicar los cambios:

systemctl restart apache2

Puede verificar el estado del servicio Apache con el siguiente comando:

systemctl status apache2

Deberías obtener el siguiente resultado:

? apache2.service - The Apache HTTP Server
     Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2021-02-07 09:20:58 UTC; 6s ago
       Docs: https://httpd.apache.org/docs/2.4/
    Process: 33243 ExecStart=/usr/sbin/apachectl start (code=exited, status=0/SUCCESS)
   Main PID: 33259 (apache2)
      Tasks: 6 (limit: 2353)
     Memory: 15.1M
     CGroup: /system.slice/apache2.service
             ??33259 /usr/sbin/apache2 -k start
             ??33260 /usr/sbin/apache2 -k start
             ??33261 /usr/sbin/apache2 -k start
             ??33262 /usr/sbin/apache2 -k start
             ??33263 /usr/sbin/apache2 -k start
             ??33264 /usr/sbin/apache2 -k start

Feb 07 09:20:58 ubuntu2004 systemd[1]: Starting The Apache HTTP Server...

Acceder al Panel de Friendica

Ahora, abra su navegador web y acceda a la interfaz web de Friendica usando la URL http://friendica.example.com . Será redirigido a la página de comprobación del sistema:

Asegúrese de que todas las dependencias de PHP estén instaladas y luego haga clic en Siguiente botón. Debería ver la siguiente página:

Proporcione su nombre de dominio, ruta de instalación y haga clic en Enviar botón. Debería ver la siguiente página:

Proporcione el nombre de su base de datos, el nombre de usuario de la base de datos, la contraseña y haga clic en Enviar . Debería ver la página de configuración del sitio:

Proporcione el correo electrónico del administrador, el idioma, la zona horaria y haga clic en Enviar botón. Una vez que se haya completado la instalación, debería ver la siguiente página:

Ahora, haga clic en registro botón de página y finaliza el proceso de registro para acceder a Friendica.

Asegure Friendica con Let's Encrypt SSL

Siempre es una buena idea proteger su sitio web con Let's Encrypt SSL. Deberá instalar el cliente Certbot para instalar y administrar SSL. Puede instalarlo con el siguiente comando:

apt-get install python3-certbot-apache -y

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

certbot --apache -d friendica.example.com

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

Escriba 2 y presione Entrar para instalar Let's Encrypt SSL para su sitio web:

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

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

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

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

Ahora, puede acceder a su sitio web de forma segura utilizando la URL https://friendica.example.com.

Conclusión

¡Felicidades! Ha instalado y configurado con éxito la plataforma de red social Friendica en el servidor Ubuntu 20.04. Ahora puede administrar su comunidad de redes sociales desde la ubicación central.


Ubuntu
  1. Cómo instalar la red social Elgg en Ubuntu 18.04 LTS

  2. Cómo instalar Plone CMS en Ubuntu 18.04

  3. Cómo instalar Logstash en Ubuntu 18.04

  4. Cómo instalar la plataforma de comercio electrónico Bagisto en Ubuntu 20.04

  5. Cómo instalar R en Ubuntu 18.04

Cómo instalar Usermin en Ubuntu 20.04

Cómo instalar Podman en Ubuntu 20.04

Cómo instalar OpenCV en Ubuntu 20.04

Cómo instalar Sysdig en Ubuntu 20.04

Cómo instalar una red social de código abierto en Ubuntu 16.04

Cómo instalar la red social Elgg en Ubuntu 20.04