首页 > 系统相关 >Amazon linux安装NGINX + PHP

Amazon linux安装NGINX + PHP

时间:2024-10-19 18:19:15浏览次数:14  
标签:php nginx fpm sudo NGINX Amazon systemctl yum PHP

安装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


标签:php,nginx,fpm,sudo,NGINX,Amazon,systemctl,yum,PHP
From: https://blog.51cto.com/rhino/12303154

相关文章

  • nginx平滑升级
    目录1.安装下载高级版本 2.创建/app/目录并传输3.解压压缩包 4.安装gcc等依赖工具5.查看nginx的具体信息5.进入到/app/nginx-1.24.0这个目录下进行编译安装 6.然后使用make进行编译安装为二级制7.修改命令8.最后进行nginx-t检查语法 1.安装下载高级版本 ......