설치 가이드 · 4 min read · Nov 07, 2025
Nginx를 사용하여 Ubuntu 18.04 LTS에 Phorum 설치하는 방법
Phorum은 PHP 및 MySQL 기반의 오픈 소스 포럼 소프트웨어입니다. 이 가이드에서는 Nginx를 웹 서버로, MySQL을 데이터베이스로 사용하여 Ubuntu 18.04 LTS 운영 체제에서 Phorum 설치 프로세스를 단계별로 안내합니다. 또한 HTTPS를 위해 acme.sh 및 Let’s Encrypt를 사용할 것입니다.
요구 사항
Phorum을 실행하기 위한 요구 사항은 다음과 같습니다:
- Nginx
- PHP 버전 5.2 이상
- MySQL 버전 5.0 이상
전제 조건
- Ubuntu 18.04 LTS 운영 체제.
sudo권한이 있는 비루트 사용자.
초기 단계
Ubuntu 버전을 확인하세요:
lsb_release -ds
# Ubuntu 18.04.1 LTS시간대를 설정하세요:
sudo dpkg-reconfigure tzdata운영 체제 패키지(소프트웨어)를 업데이트하세요. 이는 운영 체제의 기본 소프트웨어 패키지에 대한 최신 업데이트 및 보안 수정을 보장하기 때문에 중요한 첫 번째 단계입니다:
sudo apt update && sudo apt upgrade -yUbuntu 운영 체제의 기본 관리를 위해 필요한 몇 가지 필수 패키지를 설치하세요:
sudo apt install -y curl wget vim git unzip socat bash-completion apt-transport-https build-essential1단계 - PHP 설치
PHP와 필요한 PHP 확장을 설치하세요:
sudo apt install -y php7.2 php7.2-cli php7.2-fpm php7.2-common php7.2-mysql모듈로 컴파일된 PHP를 보여주려면 다음을 실행할 수 있습니다:
php -m
ctype
curl
exif
fileinfo
. . .
. . .PHP 버전을 확인하세요:
php --version
# PHP 7.2.10-0ubuntu0.18.04.1 (cli) (built: Sep 13 2018 13:45:02) ( NTS )
# Copyright (c) 1997-2018 The PHP Group
# Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
# with Zend OPcache v7.2.10-0ubuntu0.18.04.1, Copyright (c) 1999-2018, by Zend Technologies
PHP-FPM 서비스는 Ubuntu 18.04 시스템에서 자동으로 시작되고 재부팅 시 활성화되므로 수동으로 시작하고 활성화할 필요가 없습니다. 이제 데이터베이스 설치 및 설정이라는 다음 단계로 넘어갈 수 있습니다.
2단계 - MySQL 설치 및 데이터베이스 생성
MySQL 데이터베이스 서버를 설치하세요:
sudo apt install -y mysql-serverMySQL 버전을 확인하세요:
mysql --version
# mysql Ver 14.14 Distrib 5.7.25, for Linux (x86_64) using EditLine wrapperMySQL 보안을 개선하고 MySQL root 사용자에 대한 비밀번호를 설정하기 위해 mysql_secure_installation 스크립트를 실행하세요:
sudo mysql_secure_installation각 질문에 답하세요:
```Would you like to setup VALIDATE PASSWORD plugin? N
New password: your_secure_password
Re-enter new password: your_secure_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```루트 사용자로 MySQL 셸에 연결하세요:
sudo mysql -u root -p
# Enter password
Cachet를 위한 빈 MySQL 데이터베이스와 사용자를 생성하고 자격 증명을 기억하세요:
mysql> CREATE DATABASE dbname;
mysql> GRANT ALL ON dbname.* TO 'username' IDENTIFIED BY 'password';
mysql> FLUSH PRIVILEGES;MySQL에서 종료하세요:
mysql> exitdbname, username 및 password를 자신의 이름으로 바꾸세요.
3단계 - acme.sh 클라이언트 설치 및 Let’s Encrypt 인증서 받기 ( 선택 사항)
HTTPS로 포럼을 보호하는 것은 필수는 아니지만 사이트 트래픽을 보호하는 좋은 방법입니다. Let’s Encrypt에서 TLS 인증서를 받기 위해 acme.sh 클라이언트를 사용할 것입니다. Acme.sh는 종속성이 없는 순수 UNIX 셸 소프트웨어로, Let’s Encrypt에서 TLS 인증서를 받기 위해 사용됩니다.
acme.sh를 다운로드하고 설치하세요:
sudo su - root
git clone https://github.com/Neilpang/acme.sh.git
cd acme.sh
./acme.sh --install --accountemail [email protected]
source ~/.bashrc
cd ~acme.sh 버전을 확인하세요:
acme.sh --version
# v2.8.0도메인/호스트 이름에 대한 RSA 및 ECC/ECDSA 인증서를 받으세요:
# RSA 2048
acme.sh --issue --standalone -d example.com --keylength 2048
# ECDSA
acme.sh --issue --standalone -d example.com --keylength ec-256테스트를 위한 가짜 인증서를 원하시면 위 명령에 --staging 플래그를 추가할 수 있습니다.
위 명령을 실행한 후, 인증서와 키는 다음에 위치하게 됩니다:
- RSA:
/home/username/example.com디렉토리. - ECC/ECDSA:
/home/username/example.com_ecc디렉토리.
발급된 인증서를 나열하려면 다음을 실행하세요:
acme.sh --list인증서를 저장할 디렉토리를 생성하세요. /etc/letsencrypt 디렉토리를 사용할 것입니다.
mkdir -p /etc/letsecnrypt/example.com
sudo mkdir -p /etc/letsencrypt/example.com_ecc인증서를 /etc/letsencrypt 디렉토리에 설치/복사하세요.
# RSA
acme.sh --install-cert -d example.com --cert-file /etc/letsencrypt/example.com/cert.pem --key-file /etc/letsencrypt/example.com/private.key --fullchain-file /etc/letsencrypt/example.com/fullchain.pem --reloadcmd "sudo systemctl reload nginx.service"
# ECC/ECDSA
acme.sh --install-cert -d example.com --ecc --cert-file /etc/letsencrypt/example.com_ecc/cert.pem --key-file /etc/letsencrypt/example.com_ecc/private.key --fullchain-file /etc/letsencrypt/example.com_ecc/fullchain.pem --reloadcmd "sudo systemctl reload nginx.service"모든 인증서는 60일마다 자동으로 갱신됩니다.
인증서를 받은 후 루트 사용자에서 로그아웃하고 일반 sudo 사용자로 돌아가세요:
exit4단계 - NGINX 설치 및 구성
NGINX를 설치하세요:
sudo apt install -y nginxNGINX 버전을 확인하세요:
sudo nginx -v
# nginx version: nginx/1.14.0 (Ubuntu)Phorum을 위한 NGINX를 구성하세요. sudo vim /etc/nginx/sites-available/phorum.conf를 실행하고 다음 구성을 추가하세요.
server {
listen 80;
listen 443 ssl;
server_name example.com;
root /var/www/phorum;
ssl_certificate /etc/letsencrypt/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/example.com/private.key;
ssl_certificate /etc/letsencrypt/example.com_ecc/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/example.com_ecc/private.key;
index index.php index.html;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
}
}
phorum.conf 구성을 활성화하려면 파일을 sites-enabled 디렉토리에 링크하세요:
sudo ln -s /etc/nginx/sites-available/phorum.conf /etc/nginx/sites-enabled구문 오류에 대한 NGINX 구성을 확인하세요:
sudo nginx -tNGINX 서비스를 다시 로드하세요:
sudo systemctl reload nginx.service4단계 - Phorum 설치
Phorum을 위한 문서 루트 디렉토리를 생성하세요:
sudo mkdir -p /var/www/phorum/var/www/phorum 디렉토리의 소유권을 [jour_user] :로 변경하세요:
sudo chown -R [your_user]:[your_user] /var/www/phorum문서 루트 디렉토리로 이동하세요:
cd /var/www/phorum공식 웹사이트에서 최신 안정적인 Phorum 배포판을 다운로드하세요:
wget https://www.phorum.org/downloads/phorum-5.2.23.tar.gz다운로드한 아카이브를 압축 해제하고 파일을 문서 루트로 이동하세요:
tar xvzf phorum-5.2.23.tar.gz
rm phorum-5.2.23.tar.gz
mv Core-phorum_5_2_23/* . && mv Core-phorum_5_2_23/.* .
rmdir Core-phorum_5_2_23데이터베이스 접근을 구성하세요:
cp include/db/config.php.sample include/db/config.phpinclude/db/config.php 파일을 편집하여 데이터베이스 설정을 구성하세요:
vim include/db/config.php/var/www/phorum 디렉토리의 소유권을 www-data:로 변경하세요:
sudo chown -R www-data:www-data /var/www/phorum설치를 마치려면 웹 기반 설치 프로그램을 실행하세요. 웹 브라우저에서 http://forum.example.com/admin.php를 방문하세요.
새 게시물을 받은 편지함에서 받기
스팸은 없습니다. 언제든지 구독 해지 가능합니다.