標籤:blank 設定檔 target style title
Php的配置
1.將php中的源碼解壓包中的設定檔複製到php的安裝路徑/etc 下
650) this.width=650;" title="wps1F1C.tmp" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; margin: 0px; padding-right: 0px" border="0" alt="wps1F1C.tmp" src="http://s3.51cto.com/wyfs02/M01/87/6C/wKioL1ffkLrD0aucAAAYlcoM3kc142.jpg" "244" height="76" />
Php.ini 主設定檔
2.配置主設定檔。Php.ini
第一步,改時區
650) this.width=650;" title="wps1F1D.tmp" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; margin: 0px; padding-right: 0px" border="0" alt="wps1F1D.tmp" src="http://s3.51cto.com/wyfs02/M02/87/6F/wKiom1ffkLvQcQS8AAAOl_vRZxo999.jpg" "244" height="32" />
第二步,改mysql socket,指定路徑
650) this.width=650;" title="wps1F1E.tmp" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; margin: 0px; padding-right: 0px" border="0" alt="wps1F1E.tmp" src="http://s3.51cto.com/wyfs02/M00/87/6F/wKiom1ffkLuhNZOrAAANj5SQ9IE484.jpg" "244" height="34" />
650) this.width=650;" title="wps1F1F.tmp" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; margin: 0px; padding-right: 0px" border="0" alt="wps1F1F.tmp" src="http://s3.51cto.com/wyfs02/M00/87/6F/wKiom1ffkLzyHtR5AAAMf_vnqt8947.jpg" "244" height="31" />
第三步,改pdo_mysql
650) this.width=650;" title="wps1F20.tmp" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; margin: 0px; padding-right: 0px" border="0" alt="wps1F20.tmp" src="http://s3.51cto.com/wyfs02/M01/87/6F/wKiom1ffkL3iJNC6AAANguo4ZeM614.jpg" "244" height="30" />
3.配置.conf檔案
650) this.width=650;" title="wps1F21.tmp" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; margin: 0px; padding-right: 0px" border="0" alt="wps1F21.tmp" src="http://s3.51cto.com/wyfs02/M02/87/6F/wKiom1ffkL3jXeiKAAANxgCkwUY397.jpg" "244" height="37" />
注釋去掉
4.將執行指令碼放入到可以/etc/init.d環境中,並給其一個執行許可權
650) this.width=650;" title="wps1F22.tmp" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; margin: 0px; padding-right: 0px" border="0" alt="wps1F22.tmp" src="http://s3.51cto.com/wyfs02/M01/87/6F/wKiom1ffkL7B5OR5AAANM50F4-0077.jpg" "244" height="29" />
開啟/etc/init.d/php-fpm start時出現以下錯誤
650) this.width=650;" title="wps1F23.tmp" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; margin: 0px; padding-right: 0px" border="0" alt="wps1F23.tmp" src="http://s3.51cto.com/wyfs02/M02/87/6F/wKiom1ffkL7zUqD2AAATIm4pN34683.jpg" "244" height="45" />
650) this.width=650;" title="wps1F24.tmp" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; margin: 0px; padding-right: 0px" border="0" alt="wps1F24.tmp" src="http://s3.51cto.com/wyfs02/M00/87/6C/wKioL1ffkL_AcUxcAAAMYyze3nQ533.jpg" "244" height="32" />
出現該問題的原因是因為編譯時間出現錯誤,導致執行的二進位檔案出現錯誤,還在尋找原來錯誤的路徑,解決問題可以找一份配置路徑參數都相同的正確的二進位執行檔案拷貝過了,運行,啟動後是正常如:
650) this.width=650;" title="wps1F25.tmp" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; margin: 0px; padding-right: 0px" border="0" alt="wps1F25.tmp" src="http://s3.51cto.com/wyfs02/M01/87/6F/wKiom1ffkL-TdZbnAAAaxLUtgog132.jpg" "244" height="89" />
5.查看進程以及連接埠,可以看到有關php的進程存在
650) this.width=650;" title="wps1F26.tmp" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; margin: 0px; padding-right: 0px" border="0" alt="wps1F26.tmp" src="http://s3.51cto.com/wyfs02/M02/87/6F/wKiom1ffkMDzyYAOAAATJNk4sWo451.jpg" "244" height="76" />
6.由於80連接埠沒有開啟,這時要需要配置nginx的主設定檔
650) this.width=650;" title="wps1F27.tmp" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; margin: 0px; padding-right: 0px" border="0" alt="wps1F27.tmp" src="http://s3.51cto.com/wyfs02/M00/87/6F/wKiom1ffkMCTGr9WAAAQMSRBeRs946.jpg" "244" height="50" />
由於nginx不能調用動態模組,只能調用外部程式,將php模組注釋取消掉,將include 那裡尾碼改成.conf
在底下最前邊再加index.php,說明索引優先選擇帶Php的
650) this.width=650;" title="wps1F28.tmp" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; margin: 0px; padding-right: 0px" border="0" alt="wps1F28.tmp" src="http://s3.51cto.com/wyfs02/M01/87/6F/wKiom1ffkMHw8NVkAAAS07O2yqE290.jpg" "244" height="69" />
7.編輯儲存檔案後,查看nginx -t 是否有語法錯誤,然後開啟nginx。
8.編輯index.php檔案
650) this.width=650;" title="wps1F29.tmp" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; margin: 0px; padding-right: 0px" border="0" alt="wps1F29.tmp" src="http://s3.51cto.com/wyfs02/M00/87/6C/wKioL1ffkMKCssXtAAAruMA1yns342.jpg" "244" height="131" />
9.取網頁測試一下,可以看到php的資訊,說明成功配置好了
650) this.width=650;" title="wps1F2A.tmp" style="border-top: 0px; border-right: 0px; background-image: none; border-bottom: 0px; padding-top: 0px; padding-left: 0px; border-left: 0px; padding-right: 0px" border="0" alt="wps1F2A.tmp" src="http://s3.51cto.com/wyfs02/M02/87/6F/wKiom1ffkMKR60fgAAAdmnKJMlw079.jpg" "244" height="90" />
php的配置