问题原文
原帖链接 · liangzhitao · CC BY-SA 3.0
when I configured pnp4nagios,the following questions happened.
PHP GD extension→ PHP GD extension not available
PHP zlib extension→ PHP zlib extension not available
PHP socket extension→ PHP socket extension not available
Apache Rewrite Module→ Apache mod_rewrite is not enabled
google told me perhaps my php was broken during the installation. Also,I got this pageenabling-mod-rewrite-on-ubuntu
But,my server is CentOS,I carried out the command "a2enmod rewrite",the result is "-bash: a2enmod: command not found"……
What can I do?Thanks.
社区高分解答
原帖链接 · sridhar pandurangiah · CC BY-SA 3.0
PHP zlib and sockets are part of php-common. Install php-gd and php-common
yum install php php-gd php-common
to enable sockets find the PHP configuration directory and run the following commands in the terminal
./configure --enable-sockets
make && make install
Apache rewrite module allows URL rewriting. It's enabled by Default in Centos 7. Check if it's already enabled in your version. The following command outputs a list of Apache modules that are currently enabled:
httpd -M
If it is not already enabled, you will need to enable it by modifying the configuration file
sudo nano /etc/httpd/conf.modules.d/00-base.conf
and include the following line
LoadModule rewrite_module modules/mod_rewrite.so
Save the file and restart the Apache server
sudo systemctl restart httpd
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
