久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      安裝了nginx怎么安裝php

      安裝了nginx再安裝php的方法:首先通過“yum install php php-fpm”安裝PHP和PHP-FPM;然后啟動(dòng)php-fpm;接著將PHP與mysql模塊關(guān)聯(lián)起來;最后配置nginx與php一起工作即可。

      安裝了nginx怎么安裝php

      本文操作環(huán)境:centOS6.8系統(tǒng)、PHP7.1版,DELL G3電腦

      安裝了nginx怎么安裝php?

      安裝PHP和PHP-FPM

      yum install php php-fpm

      啟動(dòng)php-fpm

      systemctl start php-fpm

      將PHP與mysql模塊關(guān)聯(lián)起來

      此處是mariadb數(shù)據(jù)庫(kù)

      安裝

      yum install mariadh mariadb-server

      關(guān)聯(lián)

      yum install php-gd php-mysql php-mbstring php-xml php-mcrypt  php-imap php-odbc php-pear php -xmlrpc

      配置nginx與php一起工作

      打開nginx主配置文件。

      vim /etc/nginx/nginx.conf

      在http模塊中添加配置:

           location / {           root   /usr/share/nginx/html;              index  index.html index.htm index.php;           }   location ~ .php$ {              root           html;              fastcgi_pass   127.0.0.1:9000;              fastcgi_index  index.php;              fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;              include        fastcgi_params;          }

      改動(dòng)nginx默認(rèn)的fastcgiparams配置文件: vim /etc/nginx/fastcgi_params 在文件的最后增加兩行:

      fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;   fastcgi_param PATH_INFO                $fastcgi_script_name;

      然后重啟一下服務(wù):

      service nginx restart service php-fpm restart

      運(yùn)行

      在網(wǎng)站根目錄創(chuàng)建一個(gè)index.php文件

      文件內(nèi)容如下:

      <?php     phpinfo();     ?>

      提示nginx中yum安裝的默認(rèn)網(wǎng)站根目錄在/usr/share/nginx/html

      故此在此文件夾下新建文件

      正常情況下就可以運(yùn)行并訪問php文件了。

      推薦學(xué)習(xí):《PHP視頻教程》

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)