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小节:

评论 (写第一个评论)