Ubuntu安装Php
Ubuntu安装Php7.4
- 系统:Ubuntu 20.4
Add PHP PPA Repository
sudo apt-get update
sudo apt -y install software-properties-common
sudo add-apt-repository ppa:ondrej/php # 添加第三方源
sudo apt-get update
Install PHP 7.4
sudo apt-get install php7.4 php7.4-fpm php7.4-mysql php7.4-gd php7.4-mbstring
# sudo apt-get install php7.4-xxx
# sudo apt-get install -y php7.4-cli php7.4-common php7.4-curl php7.4-mbstring php7.4-mysql php7.4-xml
# sudo apt-get install -y php7.4-{bcmath,bz2,intl,gd,mbstring,mysql,zip,common}
sudo service php7.4-fpm start
php -v
- PHP configurations related to Apache is stored in /etc/php/7.4/apache2/php.ini
- PHP FPM configuration file is /etc/php/7.4/fpm/pool.d/www.conf
本文由 络壳 原创或整理,转载请注明出处