Install drupal 8 on CentOS 7.x

Source: Internet
Author: User
Tags drupal percona server

Install drupal 8 on CentOS 7.x

1. drupal 8.x requirements

TypeRequirementDatabase1.MySQL 5.5.3/MariaDB 5.5.20/Percona Server 5.5.8 or higher with PDO and an InnoDB-compatible primary storage engine,

2. PostgreSQL 9.1.2 or higher with PDO,

3. SQLite 3.6.8 or higherPHPPHP 5.5.9 or higher

Official requirement Link

2. Deploy LAMP (Linux + Apache + Mysql + PHP)

Update the system installation package (CentOS) [Option]

# yum update

Install Apache

# yum install httpd

Set apache to start [Option] by default

# systemctl start httpd# systemctl enable httpd

Apache browser access

Enter the URL in the browser and you will see the test page. Testing .......

Install MariaDB

# yum install mariadb-server mariadb

Set MariaDB to run automatically

# systemctl start mariadb# systemctl enable mariadb

Initialize MariaDB

# /usr/bin/mysql_secure_installation

[Reference: CentOS 7 install LAMP]

Install PHP

Drupal 8. x requires php to be 5.5.9 or above. The default centOS 7 is 5.4, And the 5.5 version is placed on webtatic [referrence]

Install extension package

# rpm -Uvh rpm -Uvh

Install php packages

# yum install php55w php55w-opcache php55w-gd php55w-mbstring php55w-mysqlnd php55w-pdo php55w-opcache php55w-xml

The above is a required package for drupal:

TypeDescriptionPhp55w required, version 5.35php55w-cli required php55w-common required php55w-gd required, drupal 8 required php55w-mbstring required, drupal 8 required, unicode Character php55w-mysqlnd required, drupal 8 required, link mariadbphp55w-opcache required, cache php55w-pdo required, drupal 8 required, database php55w-xml requiredTest php installation

# php -vPHP 5.5.35 (cli) (built: May  1 2016 11:44:25)Copyright (c) 1997-2015 The PHP GroupZend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies

Test apache

# Restart apache # systemctl restart httpd

3. Download and install drupal 8.x


#1. wget downloads # wget 2. decompress to apache # tar xvfz drupal-8.1.1.tar.gz-C/var/www/html ### 3. rename # cd/var/www/html # mv drupal-8.1.1 drupal #4. modify permissions # chown-R apache: apache/var/www/html/drupal/#5. copy the configuration file # cd/var/www/html/drupal/sites/default # cp-p default. settings. php settings. php

Create Database

# mysql -u root -p>create database drupal_db;>CREATE USER db_user@localhost IDENTIFIED BY 'Durpal@123#';>GRANT ALL PRIVILEGES ON drupal_db.* TO db_user@localhost;>FLUSH PRIVILEGES;>exit;

Open browser http://your.ip/drupal

[Referrence] 1. 2.


Clean URL Configuration:

# Check whether apache has a rewrite_module # apachectl-M | grep rewrite> rewrite_module (shared) # Configure/etc/httpd/conf/httpd. conf # vim/etc/httpd/conf/httpd. conf ## Add at the end: loadModule rewrite_module modules/ # modify AllowOverride <Directory "/var/www/html/drupal"> AllowOverride All Require all granted </Directory> # Save and exit

Restart the apache service:

systemctl restart httpd

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.