安装Nginx
sudo yum install nginx
注册启动
sudo systemctl enable nginx
启动Nginx
sudo systemctl start nginx.service
查找php版本
sudo yum search php
安装php8.2
sudo yum install php8.2
验证php
php -v
php-fpm -v
启动php-fpm
sudo systemctl enable php-fpm.service
sudo systemctl start php-fpm.service
安装扩展
sudo yum install php php-devel php-pear php-pgsql postgresql-devel -y
sudo yum install php-mysqlnd
重启
sudo systemctl restart php-fpm
sudo systemctl restart nginx.service
默认的配置文件路径
#nginx
/etc/nginx
#php-fpm
/etc/php-fpm.d
#php
/etc/php.d