설치 가이드 · 12 min read · Dec 19, 2025

Ubuntu 22.04에 Wallabag 설치하는 방법

Wallabag은 나중에 읽기 위한 서비스입니다. 이 서비스는 웹페이지를 저장하여 여유롭게 읽을 수 있게 해줍니다. Pocket, Instapaper 등과 같은 많은 서비스가 있지만, 자신이 소유한 서버에 설치된 서비스를 사용하는 것이 훨씬 좋습니다. 하나, 서비스가 망하지 않으며 링크를 함께 없애지 않기 때문입니다.

이 튜토리얼에서는 Ubuntu 22.04에서 Wallabag을 설치하고 설정하는 방법을 다룰 것입니다. 또한 Wallabag이 실행되기 위해 필요한 Nginx, MySQL, Composer 및 PHP 설정 방법도 다룰 것입니다.

전제 조건

  • Ubuntu 22.04를 실행하는 서버.
  • sudo 권한이 있는 비루트 사용자.
  • wallabag.example.com과 같은 완전한 도메인 이름(FQDN).
  • 모든 것이 업데이트되었는지 확인하십시오. $ sudo apt update $ sudo apt upgrade
  • 시스템에 필요한 몇 가지 패키지. $ sudo apt install wget curl nano software-properties-common dirmngr apt-transport-https gnupg2 ca-certificates lsb-release ubuntu-keyring unzip -y 이러한 패키지 중 일부는 이미 시스템에 설치되어 있을 수 있습니다.

1단계 - 방화벽 구성

첫 번째 단계는 방화벽을 구성하는 것입니다. Ubuntu는 기본적으로 ufw(간단한 방화벽)를 제공합니다.

방화벽이 실행 중인지 확인하십시오.

$ sudo ufw status

다음과 같은 출력을 얻어야 합니다.

Status: inactive

SSH 포트를 허용하여 방화벽이 활성화될 때 현재 연결이 끊어지지 않도록 합니다.

$ sudo ufw allow OpenSSH

HTTP 및 HTTPS 포트도 허용합니다.

$ sudo ufw allow http
$ sudo ufw allow https

방화벽을 활성화합니다.

$ sudo ufw enable
Command may disrupt existing ssh connections. Proceed with operation (y|n)? y
Firewall is active and enabled on system startup

방화벽 상태를 다시 확인하십시오.

$ sudo ufw status

유사한 출력을 볼 수 있어야 합니다.

Status: active

To                         Action      From
--                         ------      ----
OpenSSH                    ALLOW       Anywhere
80/tcp                     ALLOW       Anywhere
443                        ALLOW       Anywhere
OpenSSH (v6)               ALLOW       Anywhere (v6)
80/tcp (v6)                ALLOW       Anywhere (v6)
443 (v6)                   ALLOW       Anywhere (v6)

2단계 - PHP 및 확장 설치

Ubuntu 22.04는 약간 구식인 PHP 8.1.2 버전을 제공합니다. 우리는 Ondrej의 PHP 저장소를 사용하여 최신 PHP 8.1 버전을 설치할 것입니다.

$ sudo add-apt-repository ppa:ondrej/php

다음으로 Wallabag에 필요한 PHP 및 확장을 설치합니다.

$ sudo apt install php8.1-fpm php8.1-mysql php8.1-bcmath php8.1-xml php8.1-zip php8.1-curl php8.1-mbstring php8.1-gd php8.1-tidy php8.1-intl php8.1-cli 

설치를 확인합니다.

$ php --version
PHP 8.1.16 (cli) (built: Feb 14 2023 18:35:37) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.16, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.16, Copyright (c), by Zend Technologies

3단계 - Composer 설치

Composer는 PHP의 의존성 관리 도구로 Wallabag 설치에 필요합니다.

다음 명령을 실행하여 Composer 바이너리를 다운로드합니다. Wallabag은 Composer 2.2 LTS에서만 작동하므로 명령을 수정했습니다.

$ php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
$ php composer-setup.php --2.2
$ php -r "unlink('composer-setup.php');"

바이너리를 /usr/local/bin 디렉토리로 이동하여 Composer를 설치합니다.

$ sudo mv composer.phar /usr/local/bin/composer

버전을 확인하여 설치를 검증합니다.

$ composer --version
Composer version 2.2.21 2023-02-15 13:07:40

4단계 - MySQL 설치

Ubuntu 22.04는 최신 버전의 MySQL을 제공합니다. 단일 명령으로 설치할 수 있습니다.

$ sudo apt install mysql-server

MySQL 버전을 확인합니다.

$ mysql --version
mysql  Ver 8.0.32-0ubuntu0.22.04.2 for Linux on x86_64 ((Ubuntu))

이 단계는 MySQL 8.0.28 이상 버전에 필요합니다. MySQL 셸에 들어갑니다.

$ sudo mysql

루트 사용자에 대한 비밀번호를 설정하는 다음 명령을 실행합니다. 숫자, 대문자, 소문자 및 특수 문자가 혼합되어 있는지 확인하십시오.

mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY 'YourPassword12!';

셸을 종료합니다.

mysql> exit

MySQL 보안 설치 스크립트를 실행합니다.

$ sudo mysql_secure_installation

먼저 루트 비밀번호를 입력하라는 메시지가 표시됩니다. 입력하십시오. 다음으로 비밀번호 유효성 검사 구성 요소를 설치할 것인지 묻는 메시지가 표시됩니다. 이는 MySQL에서 사용되는 비밀번호의 강도를 확인합니다. 설치하려면 Y를 누르십시오. 다음으로 비밀번호 유효성 검사 정책의 수준을 설정하라는 메시지가 표시됩니다. 가장 강력한 2를 선택하십시오.

Securing the MySQL server deployment.

Enter password for user root:

VALIDATE PASSWORD COMPONENT can be used to test passwords
and improve security. It checks the strength of password
and allows the users to set only those passwords which are
secure enough. Would you like to setup VALIDATE PASSWORD component?

Press y|Y for Yes, any other key for No: Y

There are three levels of password validation policy:

LOW    Length >= 8
MEDIUM Length >= 8, numeric, mixed case, and special characters
STRONG Length >= 8, numeric, mixed case, special characters and dictionary                  file

Please enter 0 = LOW, 1 = MEDIUM and 2 = STRONG: 2
Using existing password for root.

Estimated strength of the password: 100

다음으로 루트 비밀번호를 변경할 것인지 묻는 N을 입력하여 거부합니다. 또한 익명 사용자를 제거하고 원격 루트 로그인을 금지하며 테스트 데이터베이스를 제거하고 권한 테이블을 새로 고치려면 Y를 입력합니다.

Change the password for root ? ((Press y|Y for Yes, any other key for No) : N

 ... skipping.
By default, a MySQL installation has an anonymous user,
allowing anyone to log into MySQL without having to have
a user account created for them. This is intended only for
testing, and to make the installation go a bit smoother.
You should remove them before moving into a production
environment.

Remove anonymous users? (Press y|Y for Yes, any other key for No) : Y
Success.


Normally, root should only be allowed to connect from
'localhost'. This ensures that someone cannot guess at
the root password from the network.

Disallow root login remotely? (Press y|Y for Yes, any other key for No) : Y
Success.

By default, MySQL comes with a database named 'test' that
anyone can access. This is also intended only for testing,
and should be removed before moving into a production
environment.


Remove test database and access to it? (Press y|Y for Yes, any other key for No) : Y
 - Dropping test database...
Success.

 - Removing privileges on test database...
Success.

Reloading the privilege tables will ensure that all changes
made so far will take effect immediately.

Reload privilege tables now? (Press y|Y for Yes, any other key for No) : Y
Success.

All done!

5단계 - MySQL 구성

MySQL 셸에 로그인합니다. 프롬프트가 표시되면 루트 비밀번호를 입력합니다.

$ sudo mysql -u root -p

샘플 데이터베이스를 생성합니다.

mysql> CREATE DATABASE wallabag;

SQL 사용자 계정을 생성합니다.

mysql> CREATE USER 'wallabaguser'@'localhost' IDENTIFIED BY 'Your_password2';

사용자에게 데이터베이스에 대한 모든 권한을 부여합니다.

mysql> GRANT ALL PRIVILEGES ON wallabag.* TO 'wallabaguser'@'localhost';

사용자 권한을 플러시합니다.

mysql> FLUSH PRIVILEGES;

셸을 종료합니다.

mysql> exit

6단계 - Nginx 설치

Ubuntu 22.04는 이전 버전의 Nginx를 제공합니다. 최신 버전을 설치하려면 공식 Nginx 저장소를 다운로드해야 합니다.

Nginx의 서명 키를 가져옵니다.

$ curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor \
| sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null

Nginx의 안정적인 버전에 대한 저장소를 추가합니다.

$ echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg arch=amd64] \
http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" \
| sudo tee /etc/apt/sources.list.d/nginx.list

시스템 저장소를 업데이트합니다.

$ sudo apt update

Nginx를 설치합니다.

$ sudo apt install nginx

설치를 확인합니다.

$ nginx -v
nginx version: nginx/1.22.1

Nginx 서버를 시작합니다.

$ sudo systemctl start nginx

7단계 - SSL 설치

SSL 인증서를 생성하기 위해 Certbot을 설치해야 합니다. Ubuntu의 저장소를 사용하여 Certbot을 설치하거나 Snapd 도구를 사용하여 최신 버전을 가져올 수 있습니다. 우리는 Snapd 버전을 사용할 것입니다.

Ubuntu 22.04는 기본적으로 Snapd가 설치되어 있습니다. 다음 명령을 실행하여 Snapd 버전이 최신인지 확인하십시오.

$ sudo snap install core && sudo snap refresh core

Certbot을 설치합니다.

$ sudo snap install --classic certbot

다음 명령을 사용하여 Certbot 명령이 /usr/bin 디렉토리에서 실행될 수 있도록 심볼릭 링크를 생성합니다.

$ sudo ln -s /snap/bin/certbot /usr/bin/certbot

다음 명령을 실행하여 SSL 인증서를 생성합니다.

$ sudo certbot certonly --nginx --agree-tos --no-eff-email --staple-ocsp --preferred-challenges http -m [email protected] -d wallabag.example.com

위 명령은 서버의 /etc/letsencrypt/live/wallabag.example.com 디렉토리에 인증서를 다운로드합니다.

Diffie-Hellman 그룹 인증서를 생성합니다.

$ sudo openssl dhparam -dsaparam -out /etc/ssl/certs/dhparam.pem 4096

Certbot 갱신 스케줄러 서비스를 확인합니다.

$ sudo systemctl list-timers

nap.certbot.renew.service가 실행될 서비스 중 하나로 표시됩니다.

NEXT                        LEFT          LAST                        PASSED        UNIT                      ACTIVATES
.....
Sun 2023-02-26 06:32:00 UTC 9h left       Sat 2023-02-25 18:04:05 UTC 2h 59min ago  snap.certbot.renew.timer  snap.certbot.renew.service
Sun 2023-02-26 06:43:20 UTC 9h left       Sat 2023-02-25 10:49:23 UTC 10h ago       apt-daily-upgrade.timer   apt-daily-upgrade.service
Sun 2023-02-26 09:00:06 UTC 11h left      Sat 2023-02-25 20:58:06 UTC 5min ago      apt-daily.timer           apt-daily.service

SSL 갱신이 잘 작동하는지 확인하기 위해 프로세스를 드라이 런합니다.

$ sudo certbot renew --dry-run

오류가 없으면 모든 설정이 완료된 것입니다. 인증서는 자동으로 갱신됩니다.

8단계 - Wallabag 설치

/var/www/wallabag/html 디렉토리를 생성합니다.

$ sudo mkdir /var/www/html/wallabag -p

Wallabag의 최신 버전을 다운로드합니다.

$ wget https://wllbg.org/latest-v2-package

아카이브를 추출합니다.

$ tar xzf latest-v2-package

추출된 디렉토리에서 이전에 생성한 디렉토리로 파일을 이동합니다. Wallabag의 최신 버전은 GitHub 릴리스 페이지에서 확인할 수 있습니다. 이 튜토리얼을 작성할 당시 최신 버전은 2.5.4입니다.

$ sudo mv wallabag-2.5.4/* /var/www/html/wallabag

자산 디렉토리를 생성합니다.

$ sudo mkdir /var/www/html/wallabag/data/assets

/var/www/html/wallabag 디렉토리의 권한을 현재 로그인한 사용자로 변경합니다.

$ sudo chown -R $USER:$USER /var/www/html/wallabag

디렉토리로 이동합니다.

$ cd /var/www/html/wallabag

예제 파일을 복사하여 parameters.yml 파일을 생성합니다.

$ cp app/config/parameters.yml.dist app/config/parameters.yml

Wallabag 구성을 시작하기 전에 비밀 키를 생성합니다. 나중에 사용할 키를 기록해 두십시오.

$ openssl rand -base64 32
QLV/GpZwDobQbyQZQ15FkM1Hvt+ZFJZXw8GW9F4KR3o=

편집을 위해 매개변수 파일을 엽니다.

$ nano app/config/parameters.yml

다음 섹션을 찾아 데이터베이스 자격 증명을 입력합니다. MySQL의 데이터베이스 포트는 3306입니다.

..........  
    database_driver: pdo_mysql  
    database_host: 127.0.0.1  
    database_port: 3306  
    database_name: wallabag  
    database_user: wallabaguser  
    database_password: Your_password2  

서버 설명 및 도메인 이름을 입력합니다.

    domain_name: https://wallabag.example.com  
    server_name: "Howtoforge Wallabag"  

SMTP 세부정보를 입력합니다. 이 경우 Amazon SES 서비스를 사용하고 있습니다.

    mailer_transport:  smtp  
    mailer_user:       YOUR_AES_USERNAME  
    mailer_password:   YOUR_AES_PASSWORD  
    mailer_host:       email-smtp.us-west-2.amazonaws.com  
    mailer_port:       587  
    mailer_encryption: tls  

이전에 생성한 비밀 키를 입력합니다. 이중 인증을 유지하려면 다음 설정이 적용되어 있는지 확인하십시오. 사용자 등록을 끄려면 fouser_registration의 값을 false로 설정하십시오. fouser_confirmation 변수는 true로 설정되어 있으며, 이는 모든 사용자 등록이 이메일을 통해 확인되어야 함을 의미합니다. from_email 변수의 값을 원하는 이메일 ID로 변경하십시오.

    # A secret key that's used to generate certain security-related tokens  
    secret: QLV/GpZwDobQbyQZQ15FkM1Hvt+ZFJZXw8GW9F4KR3o=  

    # two factor stuff  
    twofactor_auth: true  
    twofactor_sender: [email protected]  

    # fosuser stuff  
    fosuser_registration: true  
    fosuser_confirmation: true  
.....  
    from_email: [email protected]  
.....  

Redis, RabbitMQ 및 Sentry 설정과 관련된 더 많은 항목이 있습니다. 필요한 패키지를 설치한 후 필요에 따라 구성할 수 있습니다.

파일을 저장하려면 Ctrl + X를 누르고 프롬프트가 표시되면 Y를 입력합니다.

Composer를 사용하여 Wallabag에 필요한 종속성을 다운로드하고 설치합니다.

$ SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist

Wallabag 명령줄 도구를 사용하여 설치를 완료합니다.

$ php bin/console wallabag:install --env=prod

데이터베이스 및 스키마를 재설정할 것인지 묻는 메시지가 표시됩니다. 두 번 모두 no라고 응답합니다. 다음으로 관리자 계정을 생성할 것인지 묻는 메시지가 표시됩니다. 진행하려면 yes를 입력하고 계정의 사용자 이름, 비밀번호 및 이메일 ID를 입력합니다.

wallabag installer
==================

Step 1 of 4: Checking system requirements.
------------------------------------------

 ------------------------ -------- ---------------- 
  Checked                  Status   Recommendation  
 ------------------------ -------- ---------------- 
  PDO Driver (pdo_mysql)   OK!                      
  Database connection      OK!                      
  Database version         OK!                      
  curl_exec                OK!                      
  curl_multi_init          OK!                      
 ------------------------ -------- ---------------- 

 [OK] Success! Your system can run wallabag properly.                                                                    
                                                                                                                         

Step 2 of 4: Setting up database.
---------------------------------

 It appears that your database already exists. Would you like to reset it? (yes/no) [no]:
 > no

 Seems like your database contains schema. Do you want to reset it? (yes/no) [no]:
 > no

 Clearing the cache...

 Database successfully setup.

Step 3 of 4: Administration setup.
----------------------------------

 Would you like to create a new admin user (recommended)? (yes/no) [yes]:
 > yes

 Username [wallabag]:
 > navjot

 Password [wallabag]:
 > 

 Email [[email protected]]:
 > [email protected]

 Administration successfully setup.

Step 4 of 4: Config setup.
--------------------------

 Config successfully setup.
                                                                                                 
 [OK] wallabag has been successfully installed.                                                                         
                                                                                                                      
 [OK] You can now configure your web server, see https://doc.wallabag.org

디렉토리 권한을 Nginx로 다시 변경합니다.

$ sudo chown -R nginx:nginx /var/www/html/wallabag

9단계 - Nginx 및 PHP 구성

PHP-FPM 구성

/etc/php/8.1/fpm/pool.d/www.conf 파일을 엽니다.

$ sudo nano /etc/php/8.1/fpm/pool.d/www.conf

PHP 프로세스의 Unix 사용자/그룹을 nginx로 설정해야 합니다. 파일에서 user=www-datagroup=www-data 줄을 찾아 nginx로 변경합니다.

...
; Unix user/group of processes
; Note: The user is mandatory. If the group is not set, the default user's group
;       will be used.
; RPM: apache user chosen to provide access to the same directories as httpd
user = nginx
; RPM: Keep a group allowed to write in log dir.
group = nginx
...

파일에서 listen.owner = www-datalisten.group = www-data 줄을 찾아 nginx로 변경합니다.

; Set permissions for unix socket, if one is used. In Linux, read/write
; permissions must be set in order to allow connections from a web server. Many
; BSD-derived systems allow connections regardless of permissions. The owner
; and group can be specified either by name or by their numeric IDs.
; Default Values: user and group are set as the running user
;                 mode is set to 0660
listen.owner = nginx
listen.group = nginx

파일을 저장하려면 Ctrl + X를 누르고 프롬프트가 표시되면 Y를 입력합니다.

PHP-FPM 및 PHP-CLI의 실행 시간을 60초로 늘립니다.

$ sudo sed -i 's/max_execution_time = 30/max_execution_time = 60/' /etc/php/8.1/fpm/php.ini
$ sudo sed -i 's/max_execution_time = 30/max_execution_time = 60/' /etc/php/8.1/cli/php.ini

PHP-FPM의 메모리 제한을 128MB에서 256MB로 늘립니다.

$ sudo sed -i 's/memory_limit = 128M/memory_limit = 256M/' /etc/php/8.1/fpm/php.ini

PHP-FPM 서비스를 재시작합니다.

$ sudo systemctl restart php8.1-fpm

PHP 세션 디렉토리의 그룹을 Nginx로 변경합니다.

$ sudo chgrp -R nginx /var/lib/php/sessions

Nginx 구성

/etc/nginx/conf.d/wallabag.conf 파일을 생성하고 열어 편집합니다.

$ sudo nano /etc/nginx/conf.d/wallabag.conf

다음 코드를 붙여넣습니다.

server {
    listen       443 ssl http2;
    listen       [::]:443 ssl http2;
    server_name  wallabag.example.com;

    access_log  /var/log/nginx/wallabag.access.log;
    error_log   /var/log/nginx/wallabag.error.log;

    # SSL
    ssl_certificate      /etc/letsencrypt/live/wallabag.example.com/fullchain.pem;
    ssl_certificate_key  /etc/letsencrypt/live/wallabag.example.com/privkey.pem;
    ssl_trusted_certificate /etc/letsencrypt/live/wallabag.example.com/chain.pem;
    ssl_session_timeout  5m;
    ssl_session_cache shared:MozSSL:10m;
    ssl_session_tickets off;
    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_prefer_server_ciphers on;
    ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
    ssl_ecdh_curve X25519:prime256v1:secp384r1:secp521r1;
    ssl_stapling on;
    ssl_stapling_verify on;
    ssl_dhparam /etc/ssl/certs/dhparam.pem;
    resolver 8.8.8.8;

    root /var/www/html/wallabag/web;

    location / {
        try_files $uri /app.php$is_args$args;
    }

    # Pass PHP Scripts To FastCGI Server
    location ~ ^/app\.php(/|$) {
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        fastcgi_pass unix:/run/php/php8.1-fpm.sock; # Depends On The PHP Version
        fastcgi_param SCRIPT_FILENAME  $realpath_root$fastcgi_script_name;
        fastcgi_param DOCUMENT_ROOT $realpath_root;
        include fastcgi_params;
        internal;
    }

    location ~ \.php$ {
        return 404;
    }
}

# enforce HTTPS
server {
    listen       80;
    listen       [::]:80;
    server_name  wallabag.example.com;
    return 301   https://$host$request_uri;
}

Nginx 구성에서 사용할 루트 디렉토리가 /var/www/html/wallabag/public/임을 주의하십시오.

작업이 끝나면 Ctrl + X를 눌러 파일을 저장하고 프롬프트가 표시되면 Y를 입력합니다.

/etc/nginx/nginx.conf 파일을 열어 편집합니다.

$ sudo nano /etc/nginx/nginx.conf

include /etc/nginx/conf.d/*.conf; 줄 앞에 다음 줄을 추가합니다.

server_names_hash_bucket_size  64;

파일을 저장하려면 Ctrl + X를 누르고 프롬프트가 표시되면 Y를 입력합니다.

Nginx 구성 파일 구문을 확인합니다.

$ sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Nginx 서비스를 재시작합니다.

$ sudo systemctl restart nginx

10단계 - Wallabag에 접근하기

브라우저에서 https://wallabag.example.com URL을 열면 다음 로그인 화면이 표시됩니다.

Wallabag 로그인 화면

설치 중에 생성한 자격 증명을 입력하고 LOG IN 버튼을 눌러 진행합니다. Wallabag 대시보드가 표시됩니다.

Wallabag 대시보드

Wallabag은 링크를 추가할 수 있는 모든 브라우저, 모바일 또는 전자책 리더용 다양한 앱을 제공합니다. 그리고 다른 것이 마음에 들지 않으면, 북마클릿을 사용할 수도 있으며, 이에 대한 세부정보는 대시보드 오른쪽 상단의 사용자 아이콘을 클릭하여 How to 섹션에서 확인할 수 있습니다.

Wallabag 사용자 드롭다운 메뉴

브라우저 확장, 모바일 앱 및 Wallabag 북마클릿에 대한 링크가 제공됩니다.

Wallabag Howto 페이지

그게 전부입니다. Wallabag을 사용하여 나중에 읽기 위해 기사를 저장할 수 있습니다.

결론

이로써 Ubuntu 22.04 서버에 Wallabag을 설치하는 튜토리얼이 종료됩니다. 질문이 있으면 아래 댓글에 남겨주세요.

Share: X/Twitter LinkedIn

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

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