欢迎光临散文网 会员登陆 & 注册

CentOS搭建WEB环境之 Nginx & PHP

2023-05-12 08:30 作者:魔都码农  | 我要投稿

CentOS搭建WEB环境之 Nginx & PHP

1.升级centos系统软件

2.安装最新nginx

RHEL and derivatives

To set up the yum repository, create the file named /etc/yum.repos.d/nginx.repo with the following contents

By default, the repository for stable nginx packages is used. If you would like to use mainline nginx packages, run the following command:

To install nginx, run the following command:

3.编译安装所需环境软件

安装oniguruma https://pkgs.org/search/?q=oniguruma

安装libzip https://pkgs.org/search/?q=libzip

4.安装php

下载最新版php

查看configure帮助 ./configure --help

5.后台启动php-fpm -D

更新include=NONE/etc/php-fpm.d/*.conf 为 include=/usr/local/etc/php-fpm.d/*.conf

6.配置nginx配置文件

cd /etc/nginx/conf.d

cp default.conf test.conf

vi test.conf

7.安装Wordpress博客测试效果



CentOS搭建WEB环境之 Nginx & PHP的评论 (共 条)

分享到微博请遵守国家法律