99热精品国产一区二区在线观看-久久精品一二区-久久久久日本精品一区二区三区,99国产精品永久免费视频,久久激情网站,国产婷婷一区二区三区久久

跳轉到主要內容

Linux

關于Selinux導致PHP加速失敗

故障描述

  某項目中PHP 5.3.3安裝eAccelerator 和 Zend Guard Loader加速后無法使用。

故障分析

  無

處理過程

  1、排查所有PHP配置文件,一切正常。
  2、經過仔細分析懷疑Selinux。將Selinux參數設置為disable重啟后正常。
vi /etc/selinux/config
SELINUX=disabled

建議/總結

  無

Linux文件系統安全比較

故障描述

  無

故障分析

  無

處理過程

文件系統安全性對比

  從自動修復損壞的文件系統來看,ext2、ext3 都能自動修復損壞的文件系統,也都是在開機時進行。ext2 和 ext3 文件系統在默認的情況下是“每間隔 21 次掛載文件系統或每 180 天,就要自動檢測一次。通過實踐來看 ext2 和 ext3 在自動檢測上是存在風險,有時文件系統開機后就進入單用戶模式,并且把整個系統“扔”進 lost+found 目錄,如果要恢復系統,就得用 fsck 來進行修復;當然 fsck 也同樣存在風險;所以對 ext2 和 ext3 文件系統的使用,對新手來說的確需要心里準備;畢竟修復已經損壞的 ext2 和 ext3 文件系統是有困難的;另外 ext2 和 ext3 文件系統對于意外關機和斷電,也可能導致文件系統損壞,所以我們在使用過程中,必須是合法關機;比如執行 poweroff 指令來關掉機器。

  從文件系統的反刪除來看,ext2 支持反刪除,對于一般使用者來說應該是安全的,但對于保密單位來說可能意味著不安全。從反刪除角度來說明文件系統的安全性,也是有兩方面。如果用戶的工作是從事比較機密的,用 ext3 比較好,因為 ext3 一旦刪除文件,是不可恢復的,因為反刪除能恢復相應的絕秘資料的泄秘,所以 ext3 可能更適合從事機密工作的用戶。

新型的 Ext4 文件系統

  Ext4 是 Linux 內核版本 2.6.28 的重要部分。它是 Linux 文件系統的一次革命。在很多方面,Ext4 相對于 Ext3 的進步要遠超過 Ext3 相對于 Ext2 的進步。Ext3 相對于 Ext2 的改進主要在于日志方面,但是 Ext4 相對于 Ext3 的的改進是更深層次的,是文件系統數據結構方面的優化。一個高效的、優秀的、可靠的和極具特點的文件系統就此誕生。目前,該文件系統并未在所有的 Linux 發行套件中完全普及使用,還處于初期的測試階段。

建議/總結

  無

XAMPP PDO Mysql server連接配置

故障描述

  xampp安裝drupal 7.1時,提示出下錯誤:
* Warning: PDO::__construct(): [2002] Invalid argument (trying to connect via unix://) in DatabaseConnection->__construct() (line 286 of /opt/lampp/htdocs/drupal/drupal7/includes/database/database.inc).
*

In order for Drupal to work, and to continue with the installation process, you must resolve all issues reported below. For more help with configuring your database server, see the installation handbook. If you are unsure what any of this means you should probably contact your hosting provider.

Failed to connect to your MySQL database server. MySQL reports the following message: SQLSTATE[HY000] [2002] Invalid argument.
o Are you sure you have the correct username and password?
o Are you sure that you have typed the correct database hostname?
o Are you sure that the database server is running?
For more help, see the installation handbook. If you are unsure what these terms mean you should probably contact your hosting provider.

故障分析

  無

處理過程

  修改php.ini
找到pdo_mysql.default_socket=
修改成如下即可。
pdo_mysql.default_socket=/opt/lampp/var/mysql/mysql.sock

建議/總結

  無

xampp無法安裝擴展

故障描述

  Centos安裝了xampp運行環境,因CMS需求。需安裝uploadprogress擴展。在安裝過程中運行phpize時提示:
  grep: /opt/lampp/include/php/main/php.h: No such file or directory
  grep: /opt/lampp/include/php/Zend/zend_modules.h: No such file or directory
  grep: /opt/lampp/include/php/Zend/zend_extensions.h: No such file or directory
  并且無法Make

故障分析

  從phpize的信息來看提示缺少文件。原因是Xampp默認只提供運行環境,不提供開發環境。需要安裝xampp的開發套件。

處理過程

  1、從www.apachefriends.org下載xampp-linux-devel*.gz的開發套件。并用tar zcvf xampp-linux-devel*.gz -C /opt/解壓到/opt目錄下,
  2、進入uploadprogress目錄,運行/opt/lamp/bin/phpize提示正常。
  3、運行./configure --with-php-config=/opt/lampp/bin/php-config
  4、運行make和make install安裝成功。
   5、編輯php.ini加入extension="uploadprogress.so",重啟lampp進程即可。

建議/總結

  在xampp環境下。需安裝套件才可編譯安裝。