1.drupal 8.x 需求
官方需求链接 2.部署LAMP(Linux+Apache+Mysql+PHP)更新系统安装包(CentOS)[Option]# yum update 安装Apache# yum install httpd apache设置默认启动[Option]# systemctl start httpd # systemctl enable httpd apache浏览器访问在浏览器中输入网址后可以看到测试页面. Testing……. 安装MariaDB# yum install mariadb-server mariadb 设置MariaDB自动运行# systemctl start mariadb # systemctl enable mariadb 初始化MariaDB# /usr/bin/mysql_secure_installation 【以上参考:CentOS 7 install LAMP】 安装PHPdrupal 8.x要求php在5.5.9以上,默认的centOS 7 安装5.4,5.5的版本放在webtatic上【referrence】 安装扩展包# rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm # rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm 安装php相关包# yum install php55w php55w-opcache php55w-gd php55w-mbstring php55w-mysqlnd php55w-pdo php55w-opcache php55w-xml 上述为drupal必须安装的包:
测试php安装# php -v PHP 5.5.35 (cli) (built: May 1 2016 11:44:25) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies 测试apache##重启apache # systemctl restart httpd 3.下载安装drupal 8.x下载## 1.wget下载 # wget https://ftp.drupal.org/files/projects/drupal-8.1.1.tar.gz ## 2.解压缩到apache # tar xvfz drupal-8.1.1.tar.gz -C /var/www/html ### 3.重命名 # cd /var/www/html # mv drupal-8.1.1 drupal ## 4.修改权限 # chown -R apache:apache /var/www/html/drupal/ ## 5.复制配置文件 # cd /var/www/html/drupal/sites/default # cp -p default.settings.php settings.php 新建数据库# 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; 打开浏览器http://your.ip/drupal
【Referrence】 1.http://www.linuxtechi.com/how-to-install-drupal-8-on-centos-7 2.https://www.linode.com/docs/websites/cms/install-and-configure-drupal-8 常见FAQ:clean URL配置:## 查看apache是否有rewrite_module # apachectl -M |grep rewrite >rewrite_module (shared) ## 配置 /etc/httpd/conf/httpd.conf # vim /etc/httpd/conf/httpd.conf ## 在最后添加: LoadModule rewrite_module modules/mod_rewrite.so ## 修改AllowOverride <Directory "/var/www/html/drupal"> AllowOverride All Require all granted </Directory> ##保存退出 重启apache服务: systemctl restart httpd (责任编辑:IT) |