프레임워크 설치 · 2 min read · Sep 23, 2025

우분투 22.04에 Symfony PHP 프레임워크 설치하는 방법

Symfony는 웹 애플리케이션에 사용되는 가장 인기 있는 PHP 프레임워크 중 하나입니다. 독립적인 구성 요소로 유명하며, 이는 다른 PHP 프로젝트에 쉽게 통합될 수 있습니다. Symfony는 오픈 소스 소프트웨어로 출시되며, 모든 크기의 PHP 애플리케이션을 구축하는 데 적합합니다.

이 튜토리얼에서는 우분투 22.04에 Symfony PHP 프레임워크를 설치하는 방법을 보여줍니다.

전제 조건

  • 우분투 22.04를 실행하는 서버.
  • 유효한 도메인 이름이 서버 IP를 가리키고 있습니다.
  • 서버에 루트 비밀번호가 설정되어 있습니다.

PHP 설치

Symfony는 PHP 프레임워크이므로 PHP가 서버에 설치되어 있어야 합니다. 설치되지 않은 경우, 다음 명령어를 사용하여 다른 종속성과 함께 설치할 수 있습니다.

apt install php php-json php-ctype php-curl php-mbstring php-xml php-zip php-tokenizer php-tokenizer libpcre3 git zip unzip

PHP 및 기타 PHP 구성 요소가 설치되면 다음 단계로 진행할 수 있습니다.

우분투 22.04에 Symfony 설치

Symfony를 설치하는 가장 간단하고 쉬운 방법은 자동 설치 스크립트를 사용하는 것입니다.

다음 명령어를 사용하여 Symfony 설치 스크립트를 다운로드하고 실행할 수 있습니다.

wget https://get.symfony.com/cli/installer -O - | bash

Symfony가 설치되면 다음과 같은 출력이 표시됩니다.

2022-12-21 10:59:24 (11.6 MB/s) - written to stdout [6100/6100]

Symfony CLI installer

Environment check
  [*] cURL is installed
  [*] Tar is installed
  [*] Git is installed
  [*] Your architecture (amd64) is supported

Download
  Downloading https://github.com/symfony-cli/symfony-cli/releases/latest/download/symfony-cli_linux_amd64.tar.gz...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 5232k  100 5232k    0     0  2309k      0  0:00:02  0:00:02 --:--:-- 7400k
  Uncompress binary...
  Installing the binary into your home directory...
  The binary was saved to: /root/.symfony5/bin/symfony

The Symfony CLI was installed successfully!

Use it as a local file:
  /root/.symfony5/bin/symfony

Or add the following line to your shell configuration file:
  export PATH="$HOME/.symfony5/bin:$PATH"

Or install it globally on your system:
  mv /root/.symfony5/bin/symfony /usr/local/bin/symfony

Then start a new shell and run 'symfony'

다음으로, 시스템에서 Symfony 시스템 경로를 정의해야 합니다. 다음 명령어로 할 수 있습니다:

export PATH="$HOME/.symfony5/bin:$PATH"  
source ~/.bashrc

Symfony 프로젝트 생성

이 시점에서 Symfony가 서버에 설치되었습니다. 이제 Symfony를 사용하기 위해 새 Symfony 프로젝트를 생성해야 합니다.

symfony new project --full

다음과 같은 출력이 표시됩니다.

* Setting up the project under Git version control
  (running git init /root/project)

                                                                                                                         
 [OK] Your project is now ready in /root/project                                                                                                                                        

다음으로, 프로젝트로 이동하고 다음 명령어를 사용하여 웹 서버를 실행합니다.

cd project  
symfony server:start

다음과 같은 출력이 표시되어야 합니다.

                                                                                                                         
 [OK] Web server listening                                                                                               
      The Web server is using PHP CLI 8.1.2                                                                             
      http://127.0.0.1:8000                                                                                              
                                                                                                                         
[Web Server ] Dec 21 11:01:36 |DEBUG  | PHP    Reloading PHP versions 
[Web Server ] Dec 21 11:01:36 |DEBUG  | PHP    Using PHP version 8.1.2 (from default version in $PATH) 
[Application] Dec 21 11:01:15 |INFO   | DEPREC User Deprecated: The "Monolog\Logger" class is considered final. It may change without further notice as of its next major version. You should not extend it from "Symfony\Bridge\Monolog\Logger". 
[Web Server ] Dec 21 11:01:36 |INFO   | PHP    listening path="/usr/bin/php8.1" php="8.1.2" port=44005
[PHP        ] [Wed Dec 21 11:01:36 2022] PHP 8.1.2-1ubuntu2.9 Development Server (http://127.0.0.1:44005) started

Symfony 접근

이 시점에서 Symfony 서버가 시작되었고 포트 8000에서 수신 대기하고 있습니다. 이제 http://your-server-ip:8000 URL을 사용하여 접근할 수 있습니다. 다음 화면에서 Symfony 기본 페이지를 볼 수 있어야 합니다.

PHP Symfony 프레임워크

결론

축하합니다! 우분투 22.04에 Symfony PHP 프레임워크를 성공적으로 설치했습니다. 이제 Symfony 프레임워크를 사용하여 PHP 기반 웹 애플리케이션을 구축할 수 있습니다. 질문이 있으면 언제든지 문의해 주세요.

Share: X/Twitter LinkedIn

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

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