centos7下安装php-fpm的方法:1、打开终端;2、执行【yum install】命令安装php;3、执行【systemctl start php-fpm】命令启动php-fpm。
php入门到就业线上直播课:进入学习
Apipost = Postman + Swagger + Mock + Jmeter 超好用的API调试工具:点击使用
centos7下安装配置php-fpm
(推荐教程:php教程)
安装php:
sudo yum install php php-fpm php-mysql php-mbstring php-mcrypt php-sockets php-curl php-common php-xml php-soap
登录后复制
启动php-fpm:
sudo systemctl start php-fpm
登录后复制
设置自动启动:
sudo systemctl enable php-fpm
登录后复制
查看启动是否成功:
ps aux | grep php-fpm
登录后复制
配置nginx通过fast-cgi方式支持php:
vi /etc/nginx/conf.d/default.conf # 去掉文件里已经有的类似这一段的注释,可以根据自己的需要修改, 如果配置文件里没有也可以自己加上。location ~ \.php$ {root html;fastcgi_pass 127.0.0.1:9000;fastcgi_indexindex.php;fastcgi_paramSCRIPT_FILENAME/scripts$fastcgi_script_name;includefastcgi_params;}
登录后复制
以上就是centos7下如何安装php-fpm的详细内容,更多请关注php中文网其它相关文章!