发布网友 发布时间:2022-02-26 21:27
共3个回答
热心网友 时间:2022-02-26 22:56
Linux下如果要搭建nginx和php环境,需要安装三个软件包:
nginx,php,php-fpm
比如说如果是centos的话:
yum install nginx php php-fpm可能软件包名有差别,这个查查就知道了。
然后配置nginx,修改nginx.conf,如果用sock就这样写,如果是端口就些端口:
location ~ \.php$ {然后启动服务,以centos7为例:
systemctl start nginx
热心网友 时间:2022-02-27 00:14
这就要取决于你的是什么版本的操作系统?
我就说一般的ubuntu吧 它是debian的衍生版本,也适用于debian和其衍生版本。
nginx
~ $ sudo aptitude install nginx (不是root用户登陆就要在前面加sudo)
2. php
~ $ sudo aptitude install php5(现在php是5的版本,记得要加上哦)
~ $ sudo aptitude install php-fpm (此乃php的守护进程)
热心网友 时间:2022-02-27 01:49
很简单呢