簡體   English   中英

如何在RHEL 7.2上使用php-fpm?

[英]How do I use php-fpm on RHEL 7.2?

我是配置Apache的新手,並且正在嘗試優化我的Apache服務器。 通讀文檔,我發現我應該使用Event MPM而不是Prefork MPM 到目前為止,一切都非常簡單,因為我只需要在00-mpm.conf中注釋掉Prefork和uncomment Event。 但是,當我重新啟動Apache時,出現以下錯誤-

AH00526: Syntax error on line 31 of /etc/httpd/conf.d/php.conf: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration

挖掘更多信息,我發現mod_php不應與Event一起使用。 所以,我在php.conf注釋掉php_value也注釋掉的LoadModule10 php.conf。

我的網頁無法再加載了,我意識到我應該使用php-fpm 但是,關於此的文檔確實不清楚,我不確定如何使用它。 我試過了-

    [root@ip-xxx-xx-xx-xxx ~]# yum install php-fpm
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos
Resolving Dependencies
--> Running transaction check
---> Package php70w-fpm.x86_64 0:7.0.4-1.w7 will be installed
--> Processing Dependency: php70w-common(x86-64) = 7.0.4-1.w7 for package: php70w-fpm-7.0.4-1.w7.x86_64
--> Running transaction check
---> Package php70w-common.x86_64 0:7.0.4-1.w7 will be installed
--> Processing Conflict: php70w-common-7.0.4-1.w7.x86_64 conflicts php-common < 5.5.0
--> Finished Dependency Resolution
Error: php70w-common conflicts with php-common-5.4.16-36.el7_1.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

我不確定該如何進行,非常感謝您提供有關此問題的幫助。 謝謝!

您將需要刪除當前安裝的php,並且php-common將作為依賴項被卸載。

我可以確認自己剛剛完成此操作,發現當我卸載php時,也刪除了許多相關的軟件包,因此您需要添加各種插件的相關php70w版本(例如php70w-fpm,php70w-mysql,等等)

我還發現roundcube已卸載,但是由於我擁有PHP 7,因此我現在正計划安裝此版本的最新版本。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM