Install Apache/PHP 7.2.9 on Fedora 28/27, CentOS/RHEL 7.5/6.10 - Comment Page: 7

This guide shows howto install Apache HTTP Server (httpd) with PHP 7.2.9 and following modules on Fedora 28/27/26, CentOS 7.5/6.10 and Red Hat (RHEL) 7.5/6.10 systems. OPcache (php-opcache) - The Zend OPcache provides faster PHP execution through opcode caching and optimization. APCu (php-pecl-apcu) - APCu userland caching CLI (php-cli) - Command-line interface for PHP PEAR (php-pear) - PHP Extension and Application Repository framework PDO (php-pdo) - A database access abstraction module for PHP applications MySQL (php-mysqlnd) - A module for PHP applications that use MySQL databases PostgreSQL (php-pgsql) - A PostgreSQL database module for PHP MongoDB...

268 comments on “Install Apache/PHP 7.2.9 on Fedora 28/27, CentOS/RHEL 7.5/6.10 - Comment Page: 7

1 5 6 7 8 9
    1. fedora 20 requires systemctl restart firewalld.service # instead of iptables.service Thanks for your hel[

      Reply
      • Hi Paul,

        Excellent note. I updated guide.

        Reply
    2. Hi,
      I have the same problem with .htaccess (redirection doesn’t work)!!!
      Can you say me how to do your solution with AllowOrride?
      I have AllowOverride in my httaccess file, but I have allways the problem.

      Thanks

      Reply
    3. I am Under Centos 6.5

      Thanks for all tutorials on this website.
      They are really good for me (and maybe for the others!).

      Reply

    4. yum install httpd httpd-devel mysql mysql-server mysql-devel php php-mysql php-common php-gd php-mbstring php-mcrypt php-devel php-xml -y; service mysqld start && mysql_secure_installation && service mysqld restart && service httpd start && chkconfig httpd on && chkconfig mysqld on &&iptables -I INPUT -p tcp -m tcp --dport 80 -j ACCEPT && /etc/init.d/iptables save

      A one liner.. Takes a couple mins and Bang..

      Reply
    5. Thanks for the documentation!

      Unluckily the php-gd package won’t install:
      Error: Package: php-gd-5.5.15-1.el6.remi.x86_64 (remi-php55)
      Requires: libgd.so.3()(64bit)

      But the library seems to be there:
      yum --enablerepo=remi install gd-devel
      results in:
      Package gd-devel-2.0.35-11.el6.x86_64 already installed and latest version

      (Note: I installed not all of the php packages as they are not needed on my system.)

      Reply
      • Hi Jan,

        You are welcome! And sorry for the late reply.

        gd-last package (which provides libgd.so.3) should be installed as php-gd-5.5.15 dependency. Did you already get php-gd installed?

        Reply
    6. [[email protected] etc]# service httpd start
      Redirecting to /bin/systemctl start httpd.service
      Job for httpd.service failed. See ‘systemctl status httpd.service’ and ‘journalctl -xn’ for details.

      thanx in advance those solved the error!!!

      Reply
    7. Please resolve my issue as quick as possible it’s too urgent!!!!!!!!!!

      Reply
    8. Hi HILESH KALAL,

      Did you get this solved? Looks like some sort of syntax error on your config files. Normally these cases is good to check error logs to see more information about real error or alternatively run httpd configtest after configuration file changes.

      Reply
    9. Hi, I have RHEL 6.0 in my Oracle virtual Box. can u pls route me to the 6.0 repository…

      Reply
    10. I am running into the same problem. Did anybody figure out how to solve this yet? Thank you.

      Reply
    11. Looks as though epel 7 for centos is out of beta. IS it now best to change rpm links?

      Reply
    12. Hi JR…

      I follow your Tutorials for HTTPD on Fedora 21….. everything is OK…
      I tested on local installation say 10.32.15.134 server.. using elinks…. Service HTTPD runs Okay…

      But when I tested on other computer say Windows 7 with Firefox 35…. the http://10.32.15.134 don’t appear…. Firefox said “The server at 10.32.15.134 is taking too long to respond.”

      I wonder why… I follow firewall rules as this tutorial described… but still can not connect to web server via network….

      Is it something I miss or else?

      Thank You very much…

      Reply
      • Hi C. Masagi,

        Actually Fedora 21 is changed a little bit firewalld configuration. It’s possible that you have not public zone enabled anymore example on workstation installation.

        You can list your active zones using following command:

        
        firewall-cmd --get-active-zones
        

        If you have FedoraWorkstation active for your ‘public’ network interface, then run following command:

        
        firewall-cmd --permanent --zone=FedoraWorkstation --add-service=http
        

        Then restart firewalld using following command:

        
        systemctl restart firewalld.service
        

        And try again.

        I will update this guide too to be better compatible with Fedora 21.

        Reply
        • Thank you JR…
          Now everything runs smoothly…

          I use Fedora 21 Server, so I choose –zone=FedoraServer … and add the service…

          Thanks! Problem Solved! :-)

          Reply
          • Excellent! You’re welcome! :)

            Reply
    13. Hello, I want to congratulate him for his work.
      I found it very good.
      And I wonder if you have any tutorial on how to read the rules configured in the pre iptable? I ask because I want to share the internet with centOS 7, and I fear to remove any rules that I should not move.
      I want to share the internet with LAN users who have a proxy, one domain running on BIND, Apache server and A, and the Zimbra email.
      If you can give me the help I am grateful.

      Reply
    14. Thanks for this guide! Just a question: if the system already contains old installations of PHP, MySQL or whatever, should they be removed first? Or do they get updated? You could add this information to your guide.

      Reply
      • Hi Robert,

        They get updated. “yum install” command updates your packages if some are already installed and update is available.

        Always good practice is keep backups and use test server(s) to test everything before updating production server(s).

        Reply
    15. I have centOS 6 and just want to install APCu. I have tried
      yum –enablerepo=remi,remi-php56 install php-pecl-apcu
      And get No package php-perl-apcu available.
      I then tried wget /tar cmd and have a apcu-4.0.7 folder but not sure how then to proceed.

      Reply
1 5 6 7 8 9

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Close