zoukankan      html  css  js  c++  java
  • drupal drush 在windows下的安装和配置

    一、windows下drupal的安装

      参考官网:https://www.drupal.org/node/594744

      drush下载:https://github.com/drush-ops/drush/releases/download/6.0.0/Drush-6.0-2013-08-28-Installer-v1.0.21.msi

      drush各版本下载地址:https://github.com/drush-ops/drush/releases

    二、drush的使用

      1.安装drupal7 文件夹为drupal75

    drush dl drupal-7  --drupal-project-rename="drupal75" -y 

    2.cd drupal75执行下面的路径

    drush site-install standard --account-name=drupal的帐号 --account-pass=drupal的密码 --db-url=mysql://root:数据库密码@localhost/数据库 -y
    例如:
    drush site-install standard --account-name=admin --account-pass=admin --db-url=mysql://root:@localhost/drupal7 -y

    3.安装模块

    drush dl 模块名字    //安装模块    -y 加上y 是肯定
    drush en 模块名字    //开启模块  -y
    drush dis 模块名字    //卸载模块  -y

    4自动下载补全missing的插件

    drush en [ModuleName] -y    

    5.更新模块:

    $ drush pm-update

    6.清空所有缓存,常用

    drush cache-clear all

    7.devel生成一堆初始化的测试内容

    drush en devel_generate -y
    drush generate-content 100
    上面的内容生成了100个测试的nodes
    drush help (查看命令帮助)
    drush cc (清缓存)
    drush cron (运行cron)

     二、再centos 下drush的安装

    1.参考:https://drupal.org/node/2009426

    http://ninghao.net/blog/1370

    安装以后报错如图:

      

    解决办法:

      编辑:php.ini

      搜索disable_functions  去掉 exec、shell_exec

      重启服务器

    这个有个解决办法:http://cdnimage.com/content/install-drush

    配置 PHP.INI

    通常情况下,PHP被配置为Web服务器和命令行使用单独的 php.ini 文件。

    要查看 Drush 使用哪些 php.ini 文件,请运行:

    drush status

    如果 Drush 使用和Web服务器相同的 php.ini 文件,您可以通过复制您的Web服务器的 php.ini 文件到该文件夹​​的 $HOME/.drush 。然后,你可以编辑这个文件,并更改上述而不影响您的Web服务器的 PHP 环境的设置。

    Drush 需要相当不受限制的 PHP 环境来运行。特别是,您应该确保 safe_mode , open_basedir , disable_functions 和 disable_classes 的值是空的。

    root@debian:~# cp /etc/php5/fpm/php.ini $HOME/.drush 
    root@debian:~# drush status
    The following restricted PHP modes have non-empty values:            [error]
    disable_functions. This configuration is incompatible with drush. 
    Please check your configuration settings in /root/.drush/php.ini or
    in your drush.ini file; see examples/example.drush.ini for details.
     PHP executable        :  /usr/bin/php                              
     PHP configuration     :  /root/.drush/php.ini /root/.drush/php.ini 
     PHP OS                :  Linux                                     
     Drush version         :  6.2.0                                     
     Drush configuration   :                                            
     Drush alias files     :         
    vim ~/.drush/php.ini

    确保 php.ini 下面几项是这样的:

    open_basedir =
    disable_functions =
    disable_classes =

    这样的话, Drush 就在你的 Linux 系统上安装好了,你可以在你的 drupal 站点的根目录上运行 drush 命令。

    例如:

    下载 views 模块:

    drush dl views

    常用模块

    https://www.drupal.org/project/admin_menu
    https://www.drupal.org/project/module_filter
    https://www.drupal.org/project/taxonomy_manager
    https://www.drupal.org/project/libraries
    https://www.drupal.org/project/ctools
    https://www.drupal.org/project/token
    https://www.drupal.org/project/views
    https://www.drupal.org/project/webform
    https://www.drupal.org/project/captcha
    https://www.drupal.org/project/pathauto
    https://www.drupal.org/project/metatag
    https://www.drupal.org/project/wysiwyg
    https://www.drupal.org/project/ckeditor
    https://www.drupal.org/project/imce
    https://www.drupal.org/project/devel
    https://www.drupal.org/project/ds    Display Suite
    https://www.drupal.org/project/jquery_update
    https://www.drupal.org/project/back_to_top
    https://www.drupal.org/project/baidu_analytics
    https://www.drupal.org/project/xmlsitemap
    https://www.drupal.org/project/syntaxhighlighter
    https://www.drupal.org/project/syntaxhighlighter_insert
    https://www.drupal.org/project/mobile_switch
    https://www.drupal.org/project/colorbox
    https://www.drupal.org/project/references
    https://www.drupal.org/project/date
    https://www.drupal.org/project/field_group
    https://www.drupal.org/project/flag
    https://www.drupal.org/project/tagclouds
    https://www.drupal.org/project/insert
    https://www.drupal.org/project/quicktabs
    https://www.drupal.org/project/votingapi
    https://www.drupal.org/project/vote_up_down
    https://www.drupal.org/project/commerce
    https://www.drupal.org/project/question_answer
    https://www.drupal.org/project/invite
    https://www.drupal.org/project/addressfield
    https://www.drupal.org/project/autocomplete_deluxe
    https://www.drupal.org/project/commerce_alipay
    https://www.drupal.org/project/commerce_checkout_redirect
    https://www.drupal.org/project/commerce_userpoints
    https://www.drupal.org/project/rules
    https://www.drupal.org/project/panels
    https://www.drupal.org/project/context
    https://www.drupal.org/project/varnish
    https://www.drupal.org/project/custom_breadcrumbs
    https://www.drupal.org/project/views_bulk_operations
    https://www.drupal.org/project/backup_migrate
    https://www.drupal.org/project/diff
    https://www.drupal.org/project/page_title
    https://www.drupal.org/project/link
    https://www.drupal.org/project/logintoboggan
    https://www.drupal.org/project/breakpoints
    https://www.drupal.org/project/nodequeue
    https://www.drupal.org/project/features
    https://www.drupal.org/project/hierarchical_select
    https://www.drupal.org/project/field_collection
    https://www.drupal.org/project/seo_checklist
    https://www.drupal.org/project/content_access
    https://www.drupal.org/project/profile2
    https://www.drupal.org/project/imagecache_actions
    https://www.drupal.org/project/entityreference
    https://www.drupal.org/project/search_api_solr
    https://www.drupal.org/project/search_api
    https://www.drupal.org/project/l10n_update
    https://www.drupal.org/project/site_map
    https://www.drupal.org/project/geshifilter
    https://www.drupal.org/project/feeds
    https://www.drupal.org/project/adsense
  • 相关阅读:
    SpringMVC拦截器
    SpringMVC异常
    SpringMVC文件上传
    SpringMVC返回值类型
    JVM字节码
    使用Apache JMeter进行测试
    Tomcat优化
    垃圾收集器
    GC常见算法
    VisualVM远程连接Tomcat
  • 原文地址:https://www.cnblogs.com/suihui/p/4355856.html
Copyright © 2011-2022 走看看