CentOS搭建WEB環(huán)境之 Nginx & PHP
2023-05-12 08:30 作者:魔都碼農(nóng) | 我要投稿
CentOS搭建WEB環(huán)境之 Nginx & PHP

1.升級centos系統(tǒng)軟件
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.編譯安裝所需環(huán)境軟件
安裝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博客測試效果
標(biāo)簽: