Install Drupal 8 in RHEL, CentOS & Fedora

Best Affordable Linux and WordPress Services For Your Business
Outsource Your Linux and WordPress Project and Get it Promptly Completed Remotely and Delivered Online.

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Aaron Kili

Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

23 Responses

  1. bish says:

    The instructions for CentOS7 suggest a simple command like ‘yum install php’ will install php-5.6.30. This is simply not possible under regular CentOS7 without deviating from the instructions and also breaking the chain of enterprise updates . And that’s how tomorrow’s meeting will go, I guess.

    • Aaron Kili says:


      You can use PHP 5.5.9 or higher, meaning version 5.6.30 will work. Alternatively, go to the REMI repository configuration wizard to enable it and install different versions of PHP on CentOS 7:

      Thanks for the feed back.

      • bish says:

        You may have missed what I said.

        The instructions for CentOS7 suggest a simple command like ‘yum install php’ will install php-5.6.30. This is simply not possible under regular CentOS7 without deviating from the instructions and also breaking the chain of enterprise updates .

        I know of Remi’s fine work. I’m not asking about that. I’m mentioning that, in case it’s not clear, the instructions give a different result than anticipated. I don’t mean to belabour so much as to firmly state as clearly as I can that the instructions have a flaw in that following them exactly gives a result not predicted by the instructions.

        In short, the instructions are broken.

        We can talk about the added risks of breaking enterprise updates on a very vulnerable package, but that’s a little more ‘next level’ than the bits I worry you may have already overlooked; so we’ll save that.

  2. melonie says:

    Hi, I just started using Linux few months ago, now I’m trying to use scientific Linux 7.3 (which is based on red hat enterprise Linux )to install drupal, i followed your instruction, but when I try to access in the web browser, it says Forbidden . I could not figure it out why ? sorry if this is a stupid question.

    • Ravi Saive says:


      Have you followed installation instructions carefully? I suggest you to follow again carefully without missing any steps, if you still face same issue, try to view logs of httpd.

      • melonie says:

        Thanks for the reply, I redo the whole thing again and I still get the same problem. Then I found out that it is because my SElinux is enabled. I need to disabled it in order to work. Now I can access the server perfectly !

    • Aaron Kili says:


      Try to check the permissions on your drupal installation directory, make sure other users can access it to use the site.

      • melonie says:

        Thanks for the reply, I already use chmod to allow other user to access the sites, I found out it is because my SElinux enabled by default that doesn’t allow me to access the site.

        • Aaron Kili says:


          OKay, well, step 13 actually shades light on SELinux command for enabling access to site. I guess, you system needs additional configurations, try to cross-check.

          Thanks for the feedback.

  3. EagleRock says:

    Thanks to all! I was able to get my first Drupal installation completed with this guide! There were several hiccups with version 5.5 solr and 7.1 php. I resolved by replacing each with version 6.6 solr ( and 5.6 php (from repo

    Your guide was instrumental to my success! Thanks for your time putting this together.

  4. Amrendra kumar says:

    Please use,

    # chcon -R -t httpd_sys_content_rw_t /var/www/html/drupal/

    in place of, if your web install is not opening.

    # chcon -R -t httpd_sys_content_rw_t /var/www/html/drupal/sites/
  5. starbuck says:

    For more recent installations of Drupal, the installer will report PHP to be at a deprecated version (below 5.5.9). I followed this guide and it worked well:

  6. Subash Maharjan says:

    While installing IPTables,

    # iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
    # iptables -A INPUT -p tcp -m tcp --dport 443 -j ACCEPT

    above commands did not work for me, but below command did the trick.

    $ sudo iptables -I INPUT 4 -p tcp -m state --state NEW -m tcp --dport 80 -j ACCEPT
  7. Eric Selje says:

    Excellent walkthrough, thank you! I did have to do a chmod 644 phpinfo.php before it would be accessible from the browser.

  8. saurabh says:

    disable selinux in fedora before you proceed with the installation steps

  9. Mohammed M. Badr says:

    Requirements problem

    Web server Apache/2.2.15 (CentOS)
    OK PHP 5.3.3
    OK PHP register globals Disabled
    Error PHP extensions Disabled

    Drupal requires you to enable the PHP extensions in the following list (see the system requirements page for more information):


    Error Database support Disabled

    Your web server does not appear to support PDO (PHP Data Objects). Ask your hosting provider if they support the native PDO extension. See the system requirements page for more information.

    OK PHP memory limit 128M

    Error File system

    The directory sites/default/files is not writable. An automated attempt to create this directory failed, possibly due to a permissions problem. To proceed with the installation, either create the directory and modify its permissions manually or ensure that the installer has the permissions to create it automatically. For more information, see INSTALL.txt or the online handbook.

    Warning Unicode library Standard PHP

    Operations on Unicode strings are emulated on a best-effort basis. Install the PHP mbstring extension for improved Unicode support.

    OK Settings file The ./sites/default/settings.php file exists.

    Error Settings file The settings file is not writable.

    The Drupal installer requires write permissions to ./sites/default/settings.php during the installation process. If you are unsure how to grant file permissions, consult the online handbook.

    Check the error messages and proceed with the installation.

    • Aaron Kili says:


      Try to update your Apache2 web server and install the required PHP modules as explained in the article. Simply follow the steps described above to do away with the errors.

Got something to say? Join the discussion.

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.