sudo yum install -y https://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum install -y yum-utils
sudo yum-config-manager --enable remi-php81
安装PHP8
sudo yum install -y php-cgi
安装PHP支持组件
sudo yum install -y php-fpm php-mbstring php-mysql php-pdo php-gd php-xml php-curl
开机启动PHP
systemctl start php-fpm
sudo systemctl enable php-fpm.service
二、安装Nginx1.26
1、设置并安装Nginx
sudo yum install -y http://nginx.org/packages/rhel/7/x86_64/RPMS/nginx-1.26.0-1.el7.ngx.x86_64.rpm
2、开机启动Nginx
sudo systemctl start nginx
sudo systemctl enable nginx.service
安装composer
wget -O setup.php https://install.phpcomposer.com/installer
下载composer.phar:
php setup.php
mv composer.phar /usr/local/bin/composer
chmod +x /usr/local/bin/composer
使用腾讯源:
composer config -g repos.packagist composer https://mirrors.tencent.com/composer/