1. repository 최신데이타 받기
1 2 3 |
sudo add-apt-repository ppa:ondrej/php |
2.설치전 업데이트
1 2 3 |
sudo apt update |
3.php7.4 설치
1 2 3 |
sudo apt install php7.4 |
4.php7.4 util 설치
1 2 3 |
sudo apt install php7.4-common php7.4-mysql php7.4-xml php7.4-xmlrpc php7.4-curl php7.4-gd php7.4-imagick php7.4-cli php7.4-dev php7.4-imap php7.4-mbstring php7.4-opcache php7.4-soap php7.4-zip php7.4-intl -y |
5.apache2 restart
1 2 3 |
systemctl restart apache2 |
6.버전 확인
1 2 3 4 5 6 7 |
# php -v PHP 7.4.30 (cli) (built: Sep 18 2022 10:23:58) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies with Zend OPcache v7.4.30, Copyright (c), by Zend Technologies |