centos安装php-fpm
时间: 2023-11-12 21:00:34 浏览: 286
centos安装php环境
好的,以下是在 CentOS 上安装 PHP-FPM 的步骤:
1. 安装 EPEL 和 Remi 源
```
sudo yum install epel-release
sudo yum install http://rpms.remirepo.net/enterprise/remi-release-7.rpm
```
2. 安装 PHP 和 PHP-FPM
```
sudo yum install php php-fpm
```
3. 配置 PHP-FPM
编辑 `/etc/php-fpm.d/www.conf` 文件,修改以下参数:
```
user = nginx
group = nginx
listen = /var/run/php-fpm/php-fpm.sock
listen.owner = nginx
listen.group = nginx
listen.mode = 0660
```
4. 启动 PHP-FPM
```
sudo systemctl start php-fpm
sudo systemctl enable php-fpm
```
阅读全文