Enterprise Infrastructure Intelligence ● Certified engineers online · Fast response guaranteed
리눅스/OS

Rocky Linux 9 Nginx + PHP-FPM 설치 완전 가이드

CentOS 대안으로 주목받는 Rocky Linux 9에서 Nginx와 PHP-FPM을 설치하고 운영 환경을 구성하는 방법을 단계별로 정리합니다.

2026.07.06  ·  41회  · 

Rocky Linux 9 선택 이유

CentOS 8이 2021년 말 지원 종료되면서 많은 서버 관리자들이 Rocky Linux로 이전하고 있습니다. RHEL 1:1 호환성을 유지하면서 무료로 사용할 수 있는 엔터프라이즈급 배포판입니다.

1단계 — 시스템 업데이트

dnf update -y
dnf install -y epel-release

2단계 — Nginx 설치

dnf install -y nginx
systemctl enable --now nginx
firewall-cmd --permanent --add-service=http
firewall-cmd --permanent --add-service=https
firewall-cmd --reload

3단계 — PHP 8.2 + PHP-FPM 설치

dnf install -y https://rpms.remirepo.net/enterprise/remi-release-9.rpm
dnf module enable -y php:remi-8.2
dnf install -y php php-fpm php-mysqlnd php-mbstring php-xml php-gd

4단계 — Nginx + PHP-FPM 연동

server {
    listen 80;
    server_name example.com;
    root /var/www/html;
    index index.php index.html;

    location ~ \.php$ {
        fastcgi_pass unix:/run/php-fpm/www.sock;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
}
systemctl enable --now php-fpm
systemctl restart nginx
WIKIDATA WORKSTATION
AI·렌더링에 최적화된
전문가용 워크스테이션
NVIDIA RTX GPU · 최대 192GB 메모리 · ECC 지원