소셜 네트워크 · 7 min read · Dec 21, 2025

우분투 20.04에 Friendica 소셜 네트워크 플랫폼 설치하는 방법

Friendica는 무료, 오픈 소스 및 분산형 소셜 네트워킹 플랫폼으로, 여러분이 자신의 소셜 네트워킹 프로젝트를 구축하고 유지하는 데 도움을 줍니다. Mastodon, Hubzilla, OStatus, Pleroma 등을 포함한 ActivityPub에 대한 기본 지원이 내장되어 있습니다. RSS/Atom 피드를 통해 웹사이트와 블로그를 소셜 스트림으로 가져올 수 있습니다. 모든 장치에서 소셜 네트워크를 관리하는 데 도움이 되는 강력한 사용자 및 관리자 대시보드를 제공합니다.

이 튜토리얼에서는 우분투 20.04에서 Apache 및 Let’s Encrypt SSL을 사용하여 Friendica를 설치하는 방법을 보여드리겠습니다.

전제 조건

  • 우분투 20.04를 실행하는 서버.
  • 서버 IP를 가리키는 유효한 도메인 이름.
  • 서버에 구성된 루트 비밀번호.

시작하기

시작하기 전에 시스템 패키지를 최신 버전으로 업데이트해야 합니다. 다음 명령어를 사용하여 업데이트할 수 있습니다:

apt-get update -y

서버가 업데이트되면 다음 단계로 진행할 수 있습니다.

LAMP 서버 설치

Friendica는 PHP로 작성된 웹 서버에서 실행되며 MySQL을 데이터베이스 백엔드로 사용합니다. 따라서 LAMP 스택이 시스템에 설치되어 있어야 합니다. 설치되지 않은 경우 다음 명령어로 설치할 수 있습니다:

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

모든 패키지가 설치되면 php.ini 파일을 편집하고 몇 가지 변경을 해야 합니다:

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

다음 줄을 변경합니다:

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

작업이 완료되면 파일을 저장하고 닫습니다.

Friendica 데이터베이스 생성

다음으로, Friendica를 위한 데이터베이스와 사용자를 생성해야 합니다. 먼저, 다음 명령어로 MySQL에 연결합니다:

mysql

연결되면 다음 명령어로 데이터베이스와 사용자를 생성합니다:

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

다음으로, 다음 명령어로 Friendica 데이터베이스에 모든 권한을 부여합니다:

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

다음으로, 권한을 플러시하고 다음 명령어로 MySQL에서 종료합니다:

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

작업이 완료되면 다음 단계로 진행할 수 있습니다.

Friendica 다운로드

Friendica를 다운로드하기 전에 시스템에 Composer를 설치해야 합니다. 다음 명령어로 설치할 수 있습니다:

apt-get install composer -y

설치가 완료되면 Apache 웹 루트로 디렉토리를 변경하고 Git 리포지토리에서 Friendica의 최신 버전을 다운로드합니다:

cd /var/www/html

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

다운로드가 완료되면 friendica 디렉토리로 변경하고 다음 명령어로 필요한 PHP 종속성을 설치합니다:

cd friendica

composer install --no-dev

다음으로, 다음 명령어로 Friendica 애드온을 다운로드합니다:

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

다음으로, friendica 디렉토리에 적절한 소유권과 권한을 설정합니다:

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

작업이 완료되면 다음 단계로 진행할 수 있습니다.

Friendica를 위한 Apache 구성

다음으로, Friendica를 호스팅하기 위한 Apache 가상 호스트 구성 파일을 생성해야 합니다. 다음 명령어로 생성할 수 있습니다:

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

다음 줄을 추가합니다:


     ServerAdmin [email protected]
     DocumentRoot /var/www/html/friendica
     ServerName friendica.example.com


     
        Options +FollowSymlinks
        AllowOverride All
        Require all granted
     

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

파일을 저장하고 닫은 후, 다음 명령어로 Apache 가상 호스트와 재작성 모듈을 활성화합니다:

a2ensite friendica.conf

a2enmod rewrite

다음으로, 변경 사항을 적용하기 위해 Apache 서비스를 다시 로드합니다:

systemctl restart apache2

다음 명령어로 Apache 서비스의 상태를 확인할 수 있습니다:

systemctl status apache2

다음과 같은 출력을 받아야 합니다:

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

Friendica 대시보드 접근

이제 웹 브라우저를 열고 URL http://friendica.example.com를 사용하여 Friendica 웹 인터페이스에 접근합니다. 시스템 검사 페이지로 리디렉션됩니다:

Friendica 시스템 검사

모든 PHP 종속성이 설치되었는지 확인한 후 다음 버튼을 클릭합니다. 다음 페이지가 표시됩니다:

서버 설정

도메인 이름, 설치 경로를 제공하고 제출 버튼을 클릭합니다. 다음 페이지가 표시됩니다:

데이터베이스 연결

데이터베이스 이름, 데이터베이스 사용자 이름, 비밀번호를 제공하고 제출을 클릭합니다. 사이트 설정 페이지가 표시됩니다:

사이트 설정

관리자 이메일, 언어, 시간대를 제공하고 제출 버튼을 클릭합니다. 설치가 완료되면 다음 페이지가 표시됩니다:

설치 완료

이제 등록 페이지 버튼을 클릭하고 등록 프로세스를 완료하여 Friendica에 접근합니다.

Let’s Encrypt SSL로 Friendica 보안 설정

웹사이트를 Let’s Encrypt SSL로 보호하는 것은 항상 좋은 아이디어입니다. SSL을 설치하고 관리하기 위해 Certbot 클라이언트를 설치해야 합니다. 다음 명령어로 설치할 수 있습니다:

apt-get install python3-certbot-apache -y

Certbot이 설치되면 다음 명령어를 실행하여 웹사이트를 Let’s Encrypt SSL로 보호합니다:

certbot --apache -d friendica.example.com

이메일을 제공하고 서비스 약관에 동의하라는 메시지가 표시됩니다:

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

다음으로, HTTP 트래픽을 HTTPS로 리디렉션할지 여부를 선택합니다:

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

2를 입력하고 Enter를 눌러 웹사이트에 Let’s Encrypt SSL을 설치합니다:

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

이제 URL https://friendica.example.com를 사용하여 안전하게 웹사이트에 접근할 수 있습니다.

결론

축하합니다! 우분투 20.04 서버에 Friendica 소셜 네트워크 플랫폼을 성공적으로 설치하고 구성했습니다. 이제 중앙 위치에서 소셜 네트워크 커뮤니티를 관리할 수 있습니다.

Share: X/Twitter LinkedIn

새 게시물을 받은 편지함에서 받기

스팸은 없습니다. 언제든지 구독 해지 가능합니다.