{"id":1833,"date":"2017-02-25T10:27:12","date_gmt":"2017-02-25T02:27:12","guid":{"rendered":"http:\/\/cn.hostease.com\/xueyuan\/?p=1833"},"modified":"2025-01-07T15:59:51","modified_gmt":"2025-01-07T07:59:51","slug":"centos-7-x-%e5%ae%89%e8%a3%85drupal-8","status":"publish","type":"post","link":"https:\/\/cn.hostease.com\/xueyuan\/jishu\/centos-7-x-%e5%ae%89%e8%a3%85drupal-8\/","title":{"rendered":"CentOS 7.x \u5b89\u88c5drupal 8"},"content":{"rendered":"<h2><strong><b>1.drupal 8.x \u9700\u6c42<\/b><\/strong><\/h2>\n<table>\n<tbody>\n<tr>\n<td width=\"75\"><strong><b>\u7c7b\u578b<\/b><\/strong><\/td>\n<td width=\"870\"><strong><b>\u9700\u6c42<\/b><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"75\">Database<\/td>\n<td width=\"870\">1.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,<\/p>\n<p>3.SQLite 3.6.8 or higher<\/td>\n<\/tr>\n<tr>\n<td width=\"75\">PHP<\/td>\n<td width=\"870\">PHP 5.5.9 or higher<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2><strong><b>2.\u90e8\u7f72LAMP\uff08Linux+Apache+Mysql+PHP\uff09<\/b><\/strong><\/h2>\n<h4><strong><b>\u66f4\u65b0\u7cfb\u7edf\u5b89\u88c5\u5305\uff08CentOS\uff09[Option]<\/b><\/strong><\/h4>\n<p># yum update<\/p>\n<h4><strong><b>\u5b89\u88c5Apache<\/b><\/strong><\/h4>\n<p># yum install httpd<\/p>\n<h4><strong><b>apache\u8bbe\u7f6e\u9ed8\u8ba4\u542f\u52a8[Option]<\/b><\/strong><\/h4>\n<p># systemctl start httpd# systemctl enable httpd<\/p>\n<h4><strong><b>apache\u6d4f\u89c8\u5668\u8bbf\u95ee<\/b><\/strong><\/h4>\n<p>\u5728\u6d4f\u89c8\u5668\u4e2d\u8f93\u5165\u7f51\u5740\u540e\u53ef\u4ee5\u770b\u5230\u6d4b\u8bd5\u9875\u9762.\u00a0 Testing\u2026\u2026.<\/p>\n<h4><strong><b>\u5b89\u88c5MariaDB<\/b><\/strong><\/h4>\n<p># yum install mariadb-server mariadb<\/p>\n<h4><strong><b>\u8bbe\u7f6eMariaDB\u81ea\u52a8\u8fd0\u884c<\/b><\/strong><\/h4>\n<p># systemctl start mariadb# systemctl enable mariadb<\/p>\n<h4><strong><b>\u521d\u59cb\u5316MariaDB<\/b><\/strong><\/h4>\n<p># \/usr\/bin\/mysql_secure_installation<\/p>\n<p>\u3010\u4ee5\u4e0a\u53c2\u8003\uff1aCentOS 7 install LAMP\u3011<\/p>\n<h4><strong><b>\u5b89\u88c5PHP<\/b><\/strong><\/h4>\n<p>drupal 8.x\u8981\u6c42php\u57285.5.9\u4ee5\u4e0a\uff0c\u9ed8\u8ba4\u7684centOS 7 \u5b89\u88c55.4\uff0c5.5\u7684\u7248\u672c\u653e\u5728webtatic\u4e0a\u3010<a href=\"https:\/\/webtatic.com\/packages\/php55\/\">referrence<\/a>\u3011<\/p>\n<h4><strong><b>\u5b89\u88c5\u6269\u5c55\u5305<\/b><\/strong><\/h4>\n<p>#rpm -Uvh <u>https:\/\/dl.fedoraproject.org\/pub\/epel\/epel-release-latest-7.noarch.rpm<\/u><\/p>\n<p># rpm -Uvh https:\/\/mirror.webtatic.com\/yum\/el7\/webtatic-release.rpm<\/p>\n<h4><strong><b>\u5b89\u88c5php\u76f8\u5173\u5305<\/b><\/strong><\/h4>\n<p># yum install php55w php55w-opcache php55w-gd php55w-mbstring php55w-mysqlnd php55w-pdo php55w-opcache php55w-xml<\/p>\n<p>\u4e0a\u8ff0\u4e3adrupal\u5fc5\u987b\u5b89\u88c5\u7684\u5305\uff1a<\/p>\n<table>\n<tbody>\n<tr>\n<td width=\"473\"><strong><b>\u7c7b\u578b<\/b><\/strong><\/td>\n<td width=\"473\"><strong><b>\u8bf4\u660e<\/b><\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"473\">php55w<\/td>\n<td width=\"473\">\u5fc5\u987b\uff0c\u7248\u672c5.5.35<\/td>\n<\/tr>\n<tr>\n<td width=\"473\">php55w-cli<\/td>\n<td width=\"473\">\u5fc5\u987b<\/td>\n<\/tr>\n<tr>\n<td width=\"473\">php55w-common<\/td>\n<td width=\"473\">\u5fc5\u987b<\/td>\n<\/tr>\n<tr>\n<td width=\"473\">php55w-gd<\/td>\n<td width=\"473\">\u5fc5\u987b\uff0cdrupal 8\u8981\u6c42<\/td>\n<\/tr>\n<tr>\n<td width=\"473\">php55w-mbstring<\/td>\n<td width=\"473\">\u5fc5\u987b\uff0cdrupal 8\u8981\u6c42\uff0c\u5904\u7406unicode\u5b57\u7b26<\/td>\n<\/tr>\n<tr>\n<td width=\"473\">php55w-mysqlnd<\/td>\n<td width=\"473\">\u5fc5\u987b\uff0cdrupal 8\u8981\u6c42\uff0c\u94fe\u63a5mariadb<\/td>\n<\/tr>\n<tr>\n<td width=\"473\">php55w-opcache<\/td>\n<td width=\"473\">\u5fc5\u987b\uff0c\u7f13\u5b58<\/td>\n<\/tr>\n<tr>\n<td width=\"473\">php55w-pdo<\/td>\n<td width=\"473\">\u5fc5\u987b\uff0cdrupal 8\u8981\u6c42\uff0c\u6570\u636e\u5e93<\/td>\n<\/tr>\n<tr>\n<td width=\"473\">php55w-xml<\/td>\n<td width=\"473\">\u5fc5\u987b<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4><strong><b>\u6d4b\u8bd5php\u5b89\u88c5<\/b><\/strong><\/h4>\n<p># php -v<\/p>\n<p>PHP 5.5.35\u00a0(cli) (built: May \u00a01\u00a02016\u00a011:44:25)<\/p>\n<p>Copyright (c) 1997-2015\u00a0The PHP Group<\/p>\n<p>Zend Engine v2.5.0, Copyright (c) 1998-2015\u00a0Zend Technologies<\/p>\n<p>with\u00a0Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by\u00a0Zend Technologies<\/p>\n<h4><strong><b>\u6d4b\u8bd5apache<\/b><\/strong><\/h4>\n<p>##\u91cd\u542fapache# systemctl restart httpd<\/p>\n<h2><strong><b>3.\u4e0b\u8f7d\u5b89\u88c5drupal 8.x<\/b><\/strong><\/h2>\n<h4><strong><b>\u4e0b\u8f7d<\/b><\/strong><\/h4>\n<p>## 1.wget\u4e0b\u8f7d# wget https:\/\/ftp.drupal.org\/files\/projects\/drupal-8.1.1.tar.gz## 2.\u89e3\u538b\u7f29\u5230apache# tar xvfz drupal-8.1.1.tar.gz -C \/var\/www\/html### 3.\u91cd\u547d\u540d# cd \/var\/www\/html# mv drupal-8.1.1 drupal## 4.\u4fee\u6539\u6743\u9650# chown -R apache:apache \/var\/www\/html\/drupal\/## 5.\u590d\u5236\u914d\u7f6e\u6587\u4ef6# cd \/var\/www\/html\/drupal\/sites\/default# cp -p default.settings.php settings.php<\/p>\n<h4><strong><b>\u65b0\u5efa\u6570\u636e\u5e93<\/b><\/strong><\/h4>\n<p># mysql -u root -p<\/p>\n<p>&gt;create\u00a0database drupal_db;<\/p>\n<p>&gt;CREATE\u00a0USER db_user@localhost IDENTIFIED BY\u00a0&#8216;Durpal@123#&#8217;;<\/p>\n<p>&gt;GRANT ALL PRIVILEGES ON\u00a0drupal_db.* TO\u00a0db_user@localhost;<\/p>\n<p>&gt;FLUSH PRIVILEGES;<\/p>\n<p>&gt;exit;<\/p>\n<h4><strong><b>\u6253\u5f00\u6d4f\u89c8\u5668<\/b><\/strong>https:\/\/your.ip\/drupal<\/h4>\n<p>\u3010Referrence\u3011\u00a0 1.https:\/\/www.linuxtechi.com\/how-to-install-drupal-8-on-centos-7\u00a0 2.https:\/\/www.linode.com\/docs\/websites\/cms\/install-and-configure-drupal-8<\/p>\n<h2><strong><b>\u00a0<\/b><\/strong><\/h2>\n<h2><strong><b>\u5e38\u89c1FAQ\uff1a<\/b><\/strong><\/h2>\n<h4><strong><b>clean URL\u914d\u7f6e\uff1a<\/b><\/strong><\/h4>\n<p>## \u67e5\u770bapache\u662f\u5426\u6709rewrite_module# apachectl -M |grep rewrite<\/p>\n<p>&gt;rewrite_module (shared)## \u914d\u7f6e \/etc\/httpd\/conf\/httpd.conf# vim \/etc\/httpd\/conf\/httpd.conf## \u5728\u6700\u540e\u6dfb\u52a0\uff1a<\/p>\n<p>LoadModule rewrite_module modules\/mod_rewrite.so## \u4fee\u6539AllowOverride<\/p>\n<p>&lt;Directory &#8220;\/var\/www\/html\/drupal&#8221;&gt;<\/p>\n<p>AllowOverride All<\/p>\n<p>Require all granted<\/p>\n<p>&lt;\/Directory&gt;##\u4fdd\u5b58\u9000\u51fa<\/p>\n<p>\u91cd\u542fapache\u670d\u52a1\uff1a<\/p>\n<p>systemctl restart httpd<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1.drupal 8.x \u9700\u6c42 \u7c7b\u578b \u9700\u6c42 Database 1.MySQL 5.5.3\/MariaDB 5. &#8230; <a title=\"CentOS 7.x \u5b89\u88c5drupal 8\" class=\"read-more\" href=\"https:\/\/cn.hostease.com\/xueyuan\/jishu\/centos-7-x-%e5%ae%89%e8%a3%85drupal-8\/\" aria-label=\"\u9605\u8bfb CentOS 7.x \u5b89\u88c5drupal 8\">\u9605\u8bfb\u66f4\u591a<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[49,5],"tags":[495,26],"class_list":["post-1833","post","type-post","status-publish","format-standard","hentry","category-linux","category-jishu","tag-centos7-x","tag-drupal"],"aioseo_notices":[],"jetpack_featured_media_url":"","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts\/1833","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/comments?post=1833"}],"version-history":[{"count":2,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts\/1833\/revisions"}],"predecessor-version":[{"id":9085,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/posts\/1833\/revisions\/9085"}],"wp:attachment":[{"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/media?parent=1833"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/categories?post=1833"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/cn.hostease.com\/xueyuan\/wp-json\/wp\/v2\/tags?post=1833"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}