systemctl restart php71-php-fpm #启动php
netstat -tunlp|grep 9000#查看php启动状态
vim /etc/opt/remi/php71/php-fpm.d/www.conf
user = nginx #修改用户为nginx
group = nginx #修改组为nginx
3、nginx配置
yum install nginx#安装nginx
vim /etc/nginx/conf.d/test.conf server { listen 80; #listen [::]:80; server_name 39.105.1.170; client_max_body_size 50m; location / { charset utf-8; root /var/www; index index.html index.htm; } location ~ \.php$ { root /var/www; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name; include fastcgi_params; } }nginx -s reload #启动nginx
在/var/www新建两个文件,一个html文件,一个php文件
test.html的内容为: <h1>Hello World</h1> test.php的内容为: <?php phpinfo(); ?>浏览器访问:39.105.1.170/test.html 和 39.105.1.170/test.php
以上就是如何通过yum安装指定版本的PHP的详细内容!
查看更多关于如何通过yum安装指定版本的PHP的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://www.haodehen.cn/did54710
如何通过yum安装指定版本的PHP
阅读:43次