官方需求鏈接
# yum update
# yum install httpd
# systemctl start httpd# systemctl enable httpd
在浏覽器中輸入網址後可以看到測試頁面. Testing…….
# yum install mariadb-server mariadb
# systemctl start mariadb# systemctl enable mariadb
# /usr/bin/mysql_secure_installation
【以上參考:CentOS 7 install LAMP】
drupal 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
# yum install php55w php55w-opcache php55w-gd php55w-mbstring php55w-mysqlnd php55w-pdo php55w-opcache php55w-xml
上述為drupal必須安裝的包:
# 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
##重啟apache# systemctl restart httpd
## 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;
【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
## 查看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
http://xxxxxx/Linuxjc/1134299.html TechArticle