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

评论 (写第一个评论)