CentOS“-bash: a2enmod: command not found”
Solution 1:
a2enmod is a debianism, on CentOS you will need to do this manually. Please refer to the Apache documentation to find out how to do this.
Solution 2:
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