国外设计欣赏网站 - DOOOOR.com

 找回密码
 注册

QQ登录

只需一步,快速开始

扫一扫,微信登陆

搜索

[Drupal模块] Drupal 7.X模块介绍:Drush(Drupal Shell)网站日常维护/升级/备份

[复制链接]
发表于 4-8-2012 15:09 | 显示全部楼层 |阅读模式

Drush(Drupal Shell)是一个能为你节省大量时间的好东西(俗话说make your life easier)。它可以自动完成网站维护,升级,备份等方面的许多日常重复性操作。想象一下,如果我们要安装一个模块,需要几个操作?

  1. 访问Drupal.org模块页面,下载压缩包。
  2. 将压缩包解压到sites/all/modules目录下。
  3. 访问Drupal管理界面,启用此模块。

而如果我们有了利器Drush,这一切将只是下面两条命令:

drush dl 模块名
drush en 模块名

怎样,是不是很方便呢?再看:

drush up 一条命令即可搜索所有已安装的模块的可用的新版本并进行升级!是不是很强大?如果没有Drush,我们要针对每个模块重复上面1-3的步骤,半天的时间很快就过去了,生命中能有多少宝贵的时间呢!

这还不是全部。当你在本地和服务器上都安装上drush,一条命令就可以将服务器上的某个drupal网站“复制”到本地的某个drupal网站,包括了数据库以及全部的文件。再一条命令又可以反过来操作,将本地的网站完全复制到生产服务器上!对不管是网站管理员还是开发人员来说,便捷性是不言而喻的。而且复制过程中还可以具体指定是否排除某部分信息,比如我们不希望本地的用户目录同步到生产服务器上以免新注册的用户被“删除”,或者我们不希望同步缓存相关的表内容(因为这些内容很多是临时性的),这一切drush都为我们考虑好了。

怎样,心动了么?且慢!我不喜欢命令行的工具!我记不住那么多的命令!相信我,一旦你用上了drush,你再也离不开它了。下一节我们将开始drush之旅!


以上选自:Drupal 7 朗歌私坊菜,谢谢! # ]" ]: H! c5 f- ?+ E5 x

---------------------------------------------------------------------------------------------------------------


Drush

Misc

Install - Windows

There is a convenient Drush installer for Windows available on www.drush.org. This is drush5, since drush4 does not work with Windows.

Install - Unix/OSX

The easiest way to install the latest release of Drush on Unix/Linux systems is via our custom PEAR channel. (See below for Windows-specific instructions)

pear channel-discover pear.drush.org
pear install drush/drush

Tip: Use sudo to overcome permission problems. If the channel-discover fails, try running the following sequence of commands:

pear upgrade --force Console_Getopt
pear upgrade --force pear
pear upgrade-all

To get alternate drush versions, replace that last line with one of the below that matches your fancy.

pear install drush/drush-4.6.0
pear install drush/drush-5.0.0

  • If you are using Debian or Ubuntu, you can alternatively use the Debian packages uploaded in your distribution. You may need to use the backports to get the latest version, if you are running a LTS or "stable" release.
  • For advice on using Drush with your ISP, see the hosting section of the Resources pageon drush.org.

Install - manual

Folks are welcome to just download (or git clone) and then configure their system manually. See README.txt.

History

Drush was originally developed by Arto for Drupal 4.7. In May 2007, it was partly rewritten and redesigned for Drupal 5 by frando. The module is now maintained by Moshe Weitzman,Owen Bartongreg.1.andersonjonhattan, and Mark Sonnabaum.

Downloads


|2011-2026-版权声明|平台(网站)公约|DOOOOR 设计网 ( 吉ICP备2022003869号 )

GMT+8, 4-18-2025 00:24 , Processed in 0.690507 second(s), 607 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表