IT/👨‍💻Computer Science

특정 PHP 버전 설치하기

지식모아이령 2023. 3. 21. 12:51

 

PHP7.4 와 같은 특정 버전의 PHP를 설치하려면 어떻게 해야 할까요?

리눅스 서버 세팅하면서 고민했던 거에대해서 정리해봤습니다.

 

sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update

설치 후

#Install PHP 8 Extensions
sudo apt install php7.4 php7.4-fpm php7.4-mysql php-common php7.4-cli php7.4-common php7.4-opcache php7.4-readline php7.4-mbstring php7.4-xml php7.4-gd php7.4-curl

#Check PHP 8 loaded modules
php -m

#Check php-fpm status
systemctl status php*-fpm.service

 

참고 자료

How to Install PHP on Any Server (Linux, macOS, Windows)

 

How to Install PHP on Any Server (Linux, macOS, Windows)

Don't guess your way through this one. Here, we walk you through how to install PHP on any server with clear step-by-step instructions.

kinsta.com

How to Install PHP 8 on Ubuntu 22.04

 

How to Install PHP 8 on Ubuntu 22.04

I am a Linux enthusiast, I love to read Every Linux blog on the internet. I hold masters degree in computer science and am passionate about learning and teaching.

linuxhint.com