④.nginx+php

php安装过程:

第一个历程:移除其他版本php软件

yum remove php-mysql php php-fpm php-common

第二个历程:更新yum源

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

第三个历程:yum安装

yum install -y php71w php71w-cli php71w-common php71w-devel php71w-embedded  php71w-gd php71w-mcrypt php71w-mbstring php71w-pdo php71w-xml php71w-fpm php71w-mysqlnd php71w-opcache  php71w-pecl-memcached php71w-pecl-redis php71w-pecl-mongodb

php配置文件修改

vim /etc/php-fpm.d/www.conf
user = www
group = www

启动 开机自启动

systemctl start  php-fpm
systemctl enable php-fpm

写phpinfo信息

vim /html/phpinfo.php

<?
   phpinfo();
?>

nginx+php server

cat /etc/nginx/conf.d/blog.conf

 server {
        listen       80;
        server_name  localhost;
        #charset koi8-r; #字符集
        access_log  /var/log/nginx/blog_access.log  main;  #登陆日志
        error_log   /var/log/nginx/blog_error.log;
        location / {
            root   /html;
            index  index.html index.htm;
        }
        location ~ \.php$ {
            root           /html;  #站点目录
            fastcgi_pass   127.0.0.1:9000;  #php的文件  通过fasecgi接口传给php解析器
            fastcgi_index  index.php;  #没有指定php文件是 解析index.php文件
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name; #document_root 为站点目录   fastcgi_script_name为请求的uri   通过fastcgi_param赋值给SCRIPT_FILENAME 传给127.0.0.1:9000
            include        fastcgi_params;
        }
    }

④.nginx+php

上一篇:Vue-Codemirror 适用于 Vue 的 Web 代码编辑器


下一篇:FastReport .Net如何将Bands从一份报告复制到另一份报告