Install Drupal 8 in RHEL, CentOS & Fedora

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.95/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

22 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.

  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:

      @melonie,

      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:

      @melonie

      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:

          @melonie

          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 (http://www-us.apache.org/dist/lucene/solr/6.6.0) and 5.6 php (from repo https://centos7.iuscommunity.org/ius-release.rpm).

    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:
    https://doc.owncloud.org/server/8.2/admin_manual/installation/php_55_installation.html

  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):

    dom
    gd
    pdo

    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:

      @Mohammed

      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 *