1.1 Drupal8介绍

1龵龲龯龬龪

PHP7.x

MySQL5.7.x

Apache2.4.x

齼齸齵齳齯齬齪齦齢

https://www.apachefriends.org/download.html

2龵鼾鼼鼹鼶鼲鼱鼰齸齵鼭navicat鼪鼩phpmyadmin

3龵鼣鼟鼝鼜鼚鼘鼕

Drupal鼎鼍鼉鼅鼃鼝鼂/sites/default/files鼜鼚鼁黿黼鼜鼚鼭黹黵黳黰黵鼣鼟(黪黦黢黠CSS鼝JS鼣鼟)鼝黚黗Drupal黓黏黎黍黠鼣鼟鼁鼾鼼黌黊黉755黆黄黎黌黊黉555

4龵settings.php黃黊

default.setting.php黀麾麻黉settings.php黆麹黌黊鼘鼕黉755黆黄黎黌黊黉444

5龵齳齯Drupal8

Drupal8齳齯麳龬龪黃黊麱麯URL黆麫龬麧apache麣麟麞url_rewrite麚麙鼁

6龵黃黊Cron

麞鼭cron

麧鼱鼰>黃黊>麒麎>cron(admin/config/system/cron)麌黏黌黊cron鼁麈麅麄麃cron黠麳麁麁鹽鹹3鹵麳黆鹲鹮鹹鹭3鹵麳黢鹬鹨鹧鹦鹢鹡鹝鹚麳黆鹙鹗鹖cron鹔鹐鼁麧鹍鹊鹆黠鹝鹚黎麟麞cron鹹鹄鹁黠黆鸿鸾鹦鹢鹆鸻鸸鸷黆鸵黹鸳鼉鸯鸬黆鹡鸨鸥鸢鼭鸠鸟cron鹔鹐鼁

鸝鸜cron

麧鼱鼰>黃黊>麒麎>cron(admin/config/system/cron)麌黏黆鸛鸗Run cron every鸕鸔鸑黆鹙鸍黌黉Never(鸆鹄)鼁鸄鸃鹡齸齵黌黊’cron_safe_threshold’鷿鹆黠鷻黉0鷹鸝鸜鼁鸿鸕:

drush –y vset cron_safe_threshold 0

鸄鷴鷲鸝鸜cron黠鷱鷭鹹鷩鷧settings.php鼣鼟:

$conf[‘cron_safe_threshold’] = 0;

鷔鹲黿鹙黌黊admin/config/system/cron黉Never黆麹鷒鼱鼰鷏鷍鷊鸆鼱鼰黓黏鷈鷧黿鷴黌黊鼁

7龵PHP黌黊

黉鷄鷁Drupal鷈鸥鼼鶽鶼黆麫鶻PHP.ini鶼鷴鶸黌黊:

session.cache_limiter = nocache

session.auto_start = 0

expose_php = off

allow_url_fopen = off

magic_quotes_gpc = off

register_globals = off

display_errors = on

8龵Drush齳齯

##1龵齳齯composer

鶼黉鸨鶭麻黠php鶩鶦鷱鼲齳齯鶽鶢黆drush齼鶡鶝鷁鼭黿鷲鷱鷭齳齯鼁
composer黠齳齯鸻鸸麱鸛鼁

curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/bin --filename=composer

vim ~/.bashrc 麹鶕鶑鷴鶎 export PATH=鶊$HOME/.composer/vendor/bin:$PATH鶊鼁

##2龵齳齯drush

# Create and/or navigate to a path for the single Composer Drush install.
mkdir --parents /opt/drush-8.x
cd /opt/drush-8.x
# Initialise a new Composer project that requires Drush.
composer init --require=drush/drush:8.* -n
# Configure the path Composer should use for the Drush vendor binaries.
composer config bin-dir /usr/local/bin
# Install Drush. 
composer install

齳齯鵺黆鸿鸾鹨Unable to load autoload.php…黠鹁鵵黆鵲鵮

vim /usr/local/drush/drush/drush/includes/preflight.inc

鵫鵨$global_vendor_path黆鷩鷧黉

$global_vendor_path = DRUSH_BASE_PATH . '/../vendor/autoload.php';

麄麃麾鵥

drush version

鸿鸾鵡鵠

Drush Version:  8.1.2

鵛齳齯齪鵚鼁

黉鵙鵖龬齳齯drush?鵐黉drush鹹鷴鵎鵊鵇鵅鵂黠drupal鼱鼰鶽鶢黆drupal鴿鹄麟drush鼁

9龵windows鸕齳齯黃黊drupalconsole

鼾鴼鴸鴶鴲麧windows鸕黠齳齯黃黊黆linux鴮鴪鴩鴥鴡

1龵鸕鴝 drupalconsole

鹚鸗黿麣 鸕鴝 drupalconsole 黆鷈麻 drupal

2龵鵨黼鼜鼚鴛鴗齳鴕

鴑鸿齢 D:\system\drupalconsole 黆鸿鴋鴈鵠齢鴆鴩鴅鴁鴀鳽鳼鳻

drupalconsole-home

drupalconsole是啥

The new CLI for Drupal. A tool to generate boilerplate code, interact with and debug Drupal.

以上是官网的简介,总而言之是为drupal8而生的一个命令行工具

这里是官网

3龵黃黊龲龯鷿鹆

php.exe 鴈麧黠鼜鼚鶑鳶龲龯鷿鹆 PATH

鳱鳹黎鷴鳯 drupalconsole 黠齳鴕鼜鼚鶑鳶 windows 黠龲龯鷿鹆 PATH 鳲黆鼭鳬鼪鼩麒麎黠鳨齸齵

鸿鴋齢鴆鴩鴅鴁鴀鳽鳼鳻

system_path

4龵鳤麟 git 黠麾鵥麃鶽鶢鳢鳞鷴鸕 (鴩鴅鴁鴀鳽鳼)

drupalconsole

再插一句,貌似windows不认识非exe的可执行程序,需要安装个git的命令行工具

本书共79小节:

评论 (写第一个评论)