#1 安装php8
sudo apt update
sudo apt upgrade
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php8.0-fpm
php-fpm8.0 -v
sudo apt install php8.0-common php8.0-mysql php8.0-xml php8.0-curl php8.0-gd php8.0-imagick php8.0-cli php8.0-dev php8.0-imap php8.0-mbstring php8.0-opcache php8.0-soap php8.0-zip -y
sudo vim /etc/php/8.0/fpm/php.ini
sudo php-fpm8.0 -t
sudo service php8.0-fpm restart
sudo service nginx restart
upload_max_filesize = 32M
post_max_size = 48M
memory_limit = 256M
max_execution_time = 600
max_input_vars = 3000
max_input_time = 1000
sudo vim /etc/php/8.0/fpm/pool.d/www.conf
sudo php-fpm8.0 -t
sudo service php8.0-fpm restart
sudo service nginx restart
user = username
group = username
listen.owner = username
listen.group = username
sudo vim /etc/nginx/sites-available/your.conf
sudo nginx -t
sudo service nginx restart
#2 切换php版本
sudo update-alternatives --config php
sudo update-alternatives --config phpize
sudo update-alternatives --config php-config
php -v
#3 安装Laravel8
curl -s https://laravel.build/gdj | bash
cd gdj
./vendor/bin/sail up
sudo apt install docker-compose