环境说明

系统版本    CentOS 6.9 x86_64

软件版本    yum安装nginx 1.10.2

yum安装php 7.2.6(当前的最新版本)

yum安装mysql 5.5.60

drupal-8.5.3(当前的最新版本)

Drupal是使用PHP语言编写的开源内容管理框架(CMF),它由内容管理系统(CMS)和PHP开发框架(Framework)共同构成。连续多年荣获全球最佳CMS大奖,是基于PHP语言最著名的WEB应用程序。截止2011年底,共有13,802位WEB专家参加了Drupal的开发工作;228个国家使用181种语言的729,791位网站设计工作者使用Drupal。著名案例包括:联合国、美国白宫、美国商务部、纽约时报、华纳、迪斯尼、联邦快递、索尼、美国哈佛大学、Ubuntu等。(来自百度百科)

官网网站:https://www.drupal.org/

中国官网:http://drupalchina.cn/

1、添加启用php第三方的remi源

1.1 安装remi源

remi源需要先安装epel源,再安装remi源

yum install -y epel-release

rpm -ivh https://mirrors.tuna.tsinghua.edu.cn/remi/enterprise/remi-release-6.rpm

1.2 启用所需要的remi源中php版本源

vim /etc/yum.repo.d/remi.repo

vim /etc/yum.repos.d/remi-php72.repo

2、安装nginx和php

yum install nginx -y        #安装nginx

yum install php-fpm php-cli -y    #安装php-fpm和php-cli,php-cli是php的相关命令

3、配置nginx支持php

grep -Ev '^$|#' /etc/nginx/nginx.conf.default >/etc/nginx/nginx.conf

vim /etc/nginx/nginx.conf

worker_processes 1;

events {

worker_connections 1024;

}

http {

include mime.types;

default_type application/octet-stream;

sendfile on;

keepalive_timeout 65;

server {

listen 80;

server_name localhost;

index index.php index.html index.htm;

location / {

root html;

}

location ~ \.php$ {

root html;

fastcgi_pass 127.0.0.1:9000;

fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

include fastcgi_params;

}

}

}

检验

[root@localhost ~]# cd /usr/share/nginx/html/

[root@localhost html]# ls

404.html 50x.html index.html nginx-logo.png poweredby.png

[root@localhost html]# rm -rf *

[root@localhost html]# vim index.php

<?php

phpinfo();

?>

启动nginx和php

[root@localhost html]# nginx

[root@localhost html]# /etc/init.d/php-fpm start

Starting php-fpm: [ OK ]

修改php用户

vim /etc/php-fpm.d/www.conf

24 user = nginx

25 ; RPM: Keep a group allowed to write in log dir.

26 group = nginx

/etc/init.d/php-fpm restart        #重新启动php

4、安装配置mysql

yum install mysql-server -y    #安装mysql

/etc/init.d/mysqld start        #启动数据库

mysql    #登录进入数据库创库授权

mysql> create database drupal;

Query OK, 1 row affected (0.00 sec)

mysql> grant all on drupal.* to drupal@'localhost' identified by '123456';

Query OK, 0 rows affected (0.00 sec)

5、安装drupal

[root@localhost ~]# cd /usr/share/nginx/html/

[root@localhost html]# wget -c http://ftp.drupal.org/files/projects/drupal-8.5.3.tar.gz

[root@localhost html]# tar xf drupal-8.5.3.tar.gz

[root@localhost html]# mv drupal-8.5.3/* .

[root@localhost html]# chown -R nginx.nginx .        #修改用户和用户组

Web界面安装

解决错误

yum install php-dom php-gd php-pdo php-xml -y

解决警告

yum install php-opcache -y

重启php

/etc/init.d/php-fpm restart

数据库类型没有mysql

yum install php-mysql -y

重启php

/etc/init.d/php-fpm restart

输入数据库信息进行下一步

等待安装完成,输入站点信息设置网站,完成安装

6、配置nginx_rewrite规则

Drupal默认在网站中已经配置好了伪静态,如果不进行nginx的配置,点击其他页面会出现404

vim /etc/nginx/nginx.conf

location / {

try_files $uri $uri/ /index.php;

}

重启nginx

7、网站进一步优化

点击进入官网的解决方案

为网站设置域名,重启nginx

server_name www.drupal.com

本地添加host解析

[root@localhost html]# vim sites/default/settings.php

加在最后

$settings['trusted_host_patterns'] = [

'^www\.test\.com$',

];

刷新,错误已解决

yum install php-pecl-uploadprogress -y        #安装上传进度条模块

/etc/init.d/php-fpm restart    #重启php

至此,Drupal8.5.3安装完成

博主原创文章,转载请务必注明出处

搭建Drupal-8.5.3的更多相关文章

  1. Azure 项目构建 – 部署 Drupal 网站

    通过完整流程详细介绍了如何通过 Azure Web 应用. MySQL DB on Azure 等服务在 Azure 平台上快速搭建 Drupal 服务器,并将其连接到 MySQL 数据库. 此系列的 ...

  2. Drupal 8 环境搭建部署

    运行环境安装 系统:Ubuntu Server 16.04  (ubuntu-16.04.4-server-amd64.iso) Web服务器:Apache / 2.4.18 数据库:Mysql / ...

  3. Joomla软件功能介绍与开源程序大比拼Joomla,wordpress,Drupal哪个好?

    Joomla 软件功能介绍:    Joomla!是一套在国外相当知名的内容管理系统 (Content Management System, CMS),它属于Portal(企业入口网站)类型,顾名思义 ...

  4. Nginx + FastCGI 程序(C/C++) 搭建高性能web service的Demo及部署发布

       FastCGI编程包括四部分:初始化编码.接收请求循环.响应内容.响应结束循环. FCGX_Request request; FCGX_Init(); ); FCGX_InitRequest(& ...

  5. Drupal7_2:安装drupal

    Drupal7_2:安装drupal 分类: Drupal72012-10-30 01:06 1074人阅读 评论(0) 收藏 举报 假设你已经搭建好了所需的必备环境,接下来就参照以下几步,快速安装一 ...

  6. 这些优化 Drupal 网站速度的超简单办法,你忽略了多少?

    “怎么样能让我的 Drupal 网站更快一些?”是我们最常遇到的一个问题.站点速度确实非常重要,因为它会影响你的 SEO排名效果.访客是否停留以及你自己管理网站所需要的时间. 今天我们就来看看那些通过 ...

  7. 在阿里云 CentOS 服务器(ECS)上搭建 nginx + mysql + php-fpm 环境

    阿里云的云服务器(ECS)可以选择多种操作系统,打算用它运行 Drupal或者 WordPress ,你最好选择 Linux 系统,这篇文章的演示是基于阿里云的 CentOS 操作系统的服务器.我们在 ...

  8. Drupal 7.31版本爆严重SQL注入漏洞

    今早有国外安全研究人员在Twitter上曝出了Drupal 7.31版本的最新SQL注入漏洞,并给出了利用测试的EXP代码. 在本地搭建Drupal7.31的环境,经过测试,发现该利用代码可成功执行并 ...

  9. Drupal 实战

    <Drupal 实战> 基本信息 作者: 葛红儒    丛书名: 实战系列 出版社:机械工业出版社 ISBN:9787111429999 上架时间:2013-6-28 出版日期:2013 ...

  10. PHP+lghttpd + postgresql 环境搭建

    PHP+lghttpd + postgresql 环境搭建 Linux 下PHP环境搭建 安装环境:PHP+lghttpd + postgresql 1:yum install lighttpd 红旗 ...

随机推荐

  1. H5单文件压缩插件

    单文件压缩上传 <input type="file" id="file"> 构造函数 function UpFileImg(options){ va ...

  2. HDU 5752

    Sqrt Bo Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total S ...

  3. server reached pm.max_children setting (5), consider raising it

    先查看日志 /data1/server/php-cgi/var/log/php-fpm.log[19-Dec-2012 11:41:13] WARNING: [pool www] server rea ...

  4. confluence6.3安装、破解

    confluence是一个专业的企业知识管理与协同软件,可以用于构建企业wiki.通过它可以实现团队成员之间的协作和知识共享.现在大多数公司都会部署一套confluence,用作内部wiki.现在co ...

  5. WINDOWS2008 KMS 服务器安装及激活

    搭建环境条件: windows server 2008 enterprise 安装光盘kms密钥kms服务安装步骤: 安装第一台windows server 2008 enterprise服务器用km ...

  6. canvas2D 基础知识 浅析

    1.canvas HTML5给出的一个可以展示绘图内容的标签 使用领域: (推荐网站:threejs.org) 1. 游戏   2. 可视化数据  3. Banner广告  4. 多媒体 (1)在 c ...

  7. 关于 cgdb & gdbtui 的输入scanf()问题

    使用cgdb 和 gdbtui 调试程序时, 遇到scanf函数时 it seems to enter into an infinite loop According to the info page ...

  8. 跳石头(NOIP2015) (二分查找)

    原题传送门 好久没更了..昨天去学zkw线段树,被zxyer狠狠地D了一顿.. 来补坑.. 这是一道很奇特的题目. 根据题目可以看出这道题有二分题具有的性质.. 不懂二分性质的可以看我以前的博客 传送 ...

  9. Windows ToolTips简要介绍(转)

    原文转自 https://blog.csdn.net/sesiria/article/details/77450151 Windows 标准控件ToolTips简要介绍 参考文档 MSDN https ...

  10. MTK_GPIO口的定制

    http://blog.csdn.net/zuoyioo7/article/details/77863291如果需要定制GPIO口呢,需要使用mediatek/dct/DrvGen.exe工具,点击O ...