首页 > Web开发 > 详细

使用CentOS8来部署php7.4

时间:2020-12-20 10:48:59      阅读:42      评论:0      收藏:0      [点我收藏+]

使用CentOS8来部署php7.4

#安装REMI源
dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm

#查看PHP启用情况并启用相应版本
dnf module list php
dnf module enable php:remi-7.4

#安装项目需要用到的
yum install nginx php php-fpm php-mysqlnd php-pecl-redis php-pecl-xxtea

#关闭SELinux
setenforce 0
vim /etc/sysconfig/selinux

 

nginx配置文件

server {
  listen 81 default_server;
  listen [::]:81 default_server;
  server_name _;
  root /var/www/php;
  index index.php index.html index.htm;
  location ~ \.(php|phar)(/.*)?$ {
    fastcgi_split_path_info ^(.+\.(?:php|phar))(/.*)$;
    fastcgi_intercept_errors on;
    fastcgi_index index.php;
    include fastcgi_params;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    fastcgi_param PATH_INFO $fastcgi_path_info;
    fastcgi_pass php-fpm;
  }
}

 

使用CentOS8来部署php7.4

原文:https://www.cnblogs.com/xiangxisheng/p/14162505.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!