SlideShare ist ein Scribd-Unternehmen logo
1 von 15
Downloaden Sie, um offline zu lesen
Drush – Das Sackmesser für die
                    Kommandozeile

                                  Florian Latzel




                                                                                           1
ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
whoami

    Florian „fl3a“ Latzel
    Staatl. gepr. Informatiker, LPIC Level 2
    IT-Berater(„ISL Individuelle System Lösungen“)
        Schwerpunkt: Open Source Software
    ●



        Content Management Systeme
    ●



        Analyse, Beratung, Konzeption, Training
    ●



        Web-Entwicklung
    ●




                                                                                           2
ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
ls ­lia drush

   Inhalt
       whatis drush.php
   ●


       man drush.php
   ●


       define('DRUSH_BOOTSTRAP_DRUSH', 0);
   ●

                Drush Optionen
            ●


                Drush Kommandos
            ●



       define('DRUSH_BOOTSTRAP_DRUPAL_ROOT', 1);
   ●


       define('DRUSH_BOOTSTRAP_DRUPAL_SITE', 2);
   ●

            Drupal-Kommandos
        ●


            Paketmanagement und Updates
        ●



       define('DRUSH_BOOTSTRAP_DRUPAL_CONFIGURATION', 3);
   ●

            SQL-Kommandos
        ●



       ~/.drushrc.php
   ●


       ~/.drush
   ●


                                                                                           3
ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
whatis drush.php

    Drupal Shell
        Projektseite: http://drupal.org/project/drush
    ●



        Bevorzugt auf unixoiden Systemen
    ●



        PHP-CLI Skript
    ●



        Kein Drupal-Modul
    ●



        Benötigt keine Drupal-Installation
    ●



        Unabhängig von Drupal-Version(5.x, 6.x, 7.x)
    ●



    Installation von drush
    wget http://ftp.drupal.org/files/projects/drush­HEAD­all­versions.tar.gz



                                                                                           4
ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
man drush.php

   RTFM oder die Drush-Hilfe
   drush.php [­r drupal_root] [­l site_url] help [command]




                                                                                           5
ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
define('DRUSH_BOOTSTRAP_DRUSH', 0);

    Drush Optionen
    ­r <path>, ­­root=<path>           Drupal root directory to use
                                       (default: current directory)
    ­l <uri> , ­­uri=<uri>             URI of the drupal site to use 
                                       (only needed in multisite environments)
    ­v, ­­verbose                      Display all available output
    ­q, ­­quiet                        Hide all output
    ­y, ­­yes                          Assume 'yes' as answer to all prompts
    ­s, ­­simulate                     Simulate all relevant actions 
                                       (don't actually change the system)
    ­i, ­­include                      A list of paths to search for drush commands
    ­c, ­­config                       Specify a config file to use. 
                                       See example.drushrc.php
    ­u, ­­user                     Specify a user to login with. May be           
                                   a name or a number.
    ­b, ­­backend                      Hide all output and return structured data
                                       (internal use only).

                                                                                           6
ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
define('DRUSH_BOOTSTRAP_DRUSH', 0);

    Drush-Kommandos
    help                Print this help message. Use ­­filter to
                        limit command list to one command file
                        (e.g. ­­filter=pm)
                  
    dl                  Download core Drupal and projects 
                        like CCK, Zen, etc.




                                                                                           7
ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
define('DRUSH_BOOTSTRAP_DRUPAL_ROOT', 1);

    Drush mit einer Drupal-Installation(Drupal-Root)

    status                       Provides a birds­eye view of the
                                 current Drupal installation, if any. 




                                                                                           8
ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
define('DRUSH_BOOTSTRAP_DRUPAL_SITE', 2);

    Drupal-Kommandos
    cron                             Run all cron hooks.
    script                 Run php script(s).
    cache clear            Clear all caches.
    watchdog show          Shows recent watchdog log messages.
                           Optionally filter for a specific type.
    watchdog delete        Delete all messages or only those of a
                           specified type.
    sync                   Rsync the Drupal tree to/from another
                           server using ssh.
    eval                   Evaluate arbitrary php code after 
                           bootstrapping Drupal.


                                                                                           9
ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
define('DRUSH_BOOTSTRAP_DRUPAL_SITE', 2);

    Paket-Management und Updates
    refresh                          Refresh update status information

    enable                           Enable one or more modules.

    disable                          Disable one or more modules.

    uninstall                        Uninstall one or more modules.

    statusmodules                    Show module enabled/disabled status

    refresh                          Refresh update status information

    updatecode                       Update your project code

    update                           Update your project code and apply any
                                     database updates required (update.php)

    info                             Release information for a project

    updatedb                        Execute the update.php process from the                   
                                    command line.


                                                                                           10
ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
define('DRUSH_BOOTSTRAP_DRUPAL_CONFIGURATION',3);


    Drush mit Zugriff auf eine settings.php(SQL)
    sql conf                     Print database connection details.

    sql connect                  A string for connecting to the DB.

    sql dump                     Exports the Drupal DB as SQL using
                                 mysqldump.

    sql query                    Execute a query against the site database.

    sql load                     Copy source database to target database.

    sql cli                      Open a SQL command­line interface using
                                 Drupal’s credentials.



                                                                                           11
ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
~/.drushrc.php

    Die Konfigurationsdatei von drush
    Orte der Plazierung:
    1. Ordner einer Drupal-Site
    2. Wurzel der Drupal Installation
    3. Im Home-Verzeichnis(~/.drushrc.php)
    4. Im Ordner der Drush-Installation
    oder Spezifizierung durch ­c oder --config




                                                                                           12
ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
~/.drushrc.php

    Die Konfigurationsdatei für Drush
    <?php
       $options['r'] = '/home/florian/drupal/6.x';
       $options['v'] = 1;    

         $options['skip­tables'] = array(
           'common' => array('accesslog', 'cache', 'cache_block',       
           'cache_filter', 'cache_form', 'cache_menu', 
           'cache_page', 'cache_update', 'history',                     
           'search_dataset', 'search_index', 
           'search_total', 'sessions', 'watchdog'),
         );

         $options['handler'] = 'wget';

    Beispiel
        example.drushrc.php
    ●



                                                                                           13
ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
~/.drush

    Eigene Drush-Erweiterungen
    Location
        Ordner .drush im Heimatverzeichnis
    ●



        Spezifizierung durch ­i oder ­­include
    ●



    Beispiel
        example.drush.inc
    ●




                                                                                           14
ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
which; whatis; who >/dev/null

    Fragen?
    Kontakt
    ISL Individuelle System Lösungen
      http://is-loesungen.de
      f.latzel@is-loesungen.de
    Netzaffe (Blog)
     http://netzaffe.de
     floh@netzaffe.de




                                                                                           15
ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel

Weitere ähnliche Inhalte

Andere mochten auch

2012 Crestron Integration Award Winners
2012 Crestron Integration Award Winners2012 Crestron Integration Award Winners
2012 Crestron Integration Award WinnersCrestron Electronics
 
Bill gatesdicea losadolescentes12
Bill gatesdicea losadolescentes12Bill gatesdicea losadolescentes12
Bill gatesdicea losadolescentes12Juan Russo
 
Programa de mejoramiento de arroz de Embrapa Brasil
Programa de mejoramiento de arroz de Embrapa BrasilPrograma de mejoramiento de arroz de Embrapa Brasil
Programa de mejoramiento de arroz de Embrapa BrasilCIAT
 
Sistema de organizacion, necesidad de la implicacion de la direccion
Sistema de organizacion, necesidad de la implicacion de la direccion Sistema de organizacion, necesidad de la implicacion de la direccion
Sistema de organizacion, necesidad de la implicacion de la direccion hayleen_giammaria
 
Bay Talkitec Next Gen Vas Platform
Bay Talkitec Next Gen Vas PlatformBay Talkitec Next Gen Vas Platform
Bay Talkitec Next Gen Vas Platformroger1
 
2w guia de_recomendacoes_de_seguranca
2w guia de_recomendacoes_de_seguranca2w guia de_recomendacoes_de_seguranca
2w guia de_recomendacoes_de_seguranca_AXE_PM
 
A2 fr06 inventario de material bibliografico
A2 fr06 inventario de material bibliograficoA2 fr06 inventario de material bibliografico
A2 fr06 inventario de material bibliograficoiejcg
 
MOCA iBeacons SDK for iOS 7
MOCA iBeacons SDK for iOS 7MOCA iBeacons SDK for iOS 7
MOCA iBeacons SDK for iOS 7MOCA Platform
 
Leonello Tronti (SSPA), Presentazione del volume "Capitale umano: definizione...
Leonello Tronti (SSPA), Presentazione del volume "Capitale umano: definizione...Leonello Tronti (SSPA), Presentazione del volume "Capitale umano: definizione...
Leonello Tronti (SSPA), Presentazione del volume "Capitale umano: definizione...Istituto nazionale di statistica
 
Teoria general del proceso i
Teoria general del proceso  iTeoria general del proceso  i
Teoria general del proceso ikarenm95
 
Co-Links: proposta de uma nova tecnologia para a escrita coletiva de links mu...
Co-Links: proposta de uma nova tecnologia para a escrita coletiva de links mu...Co-Links: proposta de uma nova tecnologia para a escrita coletiva de links mu...
Co-Links: proposta de uma nova tecnologia para a escrita coletiva de links mu...Alex Primo
 
IMF Iraq Updates - Translated Central Bank of Iraq Delete Zeros Iraqi Dinar S...
IMF Iraq Updates - Translated Central Bank of Iraq Delete Zeros Iraqi Dinar S...IMF Iraq Updates - Translated Central Bank of Iraq Delete Zeros Iraqi Dinar S...
IMF Iraq Updates - Translated Central Bank of Iraq Delete Zeros Iraqi Dinar S...Iraqi Dinar News
 

Andere mochten auch (20)

Nokia Asha 210 - Es
Nokia Asha 210 - EsNokia Asha 210 - Es
Nokia Asha 210 - Es
 
2012 Crestron Integration Award Winners
2012 Crestron Integration Award Winners2012 Crestron Integration Award Winners
2012 Crestron Integration Award Winners
 
Acta grupo libro digital (2ª reunión)
Acta grupo libro digital (2ª reunión)Acta grupo libro digital (2ª reunión)
Acta grupo libro digital (2ª reunión)
 
Bill gatesdicea losadolescentes12
Bill gatesdicea losadolescentes12Bill gatesdicea losadolescentes12
Bill gatesdicea losadolescentes12
 
Programa de mejoramiento de arroz de Embrapa Brasil
Programa de mejoramiento de arroz de Embrapa BrasilPrograma de mejoramiento de arroz de Embrapa Brasil
Programa de mejoramiento de arroz de Embrapa Brasil
 
Sistema de organizacion, necesidad de la implicacion de la direccion
Sistema de organizacion, necesidad de la implicacion de la direccion Sistema de organizacion, necesidad de la implicacion de la direccion
Sistema de organizacion, necesidad de la implicacion de la direccion
 
K jackson medical terminology chapter 11
K jackson medical terminology chapter 11K jackson medical terminology chapter 11
K jackson medical terminology chapter 11
 
Bay Talkitec Next Gen Vas Platform
Bay Talkitec Next Gen Vas PlatformBay Talkitec Next Gen Vas Platform
Bay Talkitec Next Gen Vas Platform
 
Absoluta volta antella
Absoluta volta antellaAbsoluta volta antella
Absoluta volta antella
 
Infoblatt entwicklung-und-projektionen
Infoblatt entwicklung-und-projektionenInfoblatt entwicklung-und-projektionen
Infoblatt entwicklung-und-projektionen
 
2w guia de_recomendacoes_de_seguranca
2w guia de_recomendacoes_de_seguranca2w guia de_recomendacoes_de_seguranca
2w guia de_recomendacoes_de_seguranca
 
A2 fr06 inventario de material bibliografico
A2 fr06 inventario de material bibliograficoA2 fr06 inventario de material bibliografico
A2 fr06 inventario de material bibliografico
 
MOCA iBeacons SDK for iOS 7
MOCA iBeacons SDK for iOS 7MOCA iBeacons SDK for iOS 7
MOCA iBeacons SDK for iOS 7
 
Segunda unidad de estadistica
Segunda unidad de estadisticaSegunda unidad de estadistica
Segunda unidad de estadistica
 
Leonello Tronti (SSPA), Presentazione del volume "Capitale umano: definizione...
Leonello Tronti (SSPA), Presentazione del volume "Capitale umano: definizione...Leonello Tronti (SSPA), Presentazione del volume "Capitale umano: definizione...
Leonello Tronti (SSPA), Presentazione del volume "Capitale umano: definizione...
 
3D printing
3D printing3D printing
3D printing
 
Teoria general del proceso i
Teoria general del proceso  iTeoria general del proceso  i
Teoria general del proceso i
 
Co-Links: proposta de uma nova tecnologia para a escrita coletiva de links mu...
Co-Links: proposta de uma nova tecnologia para a escrita coletiva de links mu...Co-Links: proposta de uma nova tecnologia para a escrita coletiva de links mu...
Co-Links: proposta de uma nova tecnologia para a escrita coletiva de links mu...
 
Simpsons' genitive
Simpsons' genitiveSimpsons' genitive
Simpsons' genitive
 
IMF Iraq Updates - Translated Central Bank of Iraq Delete Zeros Iraqi Dinar S...
IMF Iraq Updates - Translated Central Bank of Iraq Delete Zeros Iraqi Dinar S...IMF Iraq Updates - Translated Central Bank of Iraq Delete Zeros Iraqi Dinar S...
IMF Iraq Updates - Translated Central Bank of Iraq Delete Zeros Iraqi Dinar S...
 

Ähnlich wie Drush – Das Sackmesser für die Kommandozeile

Rex Linuxtag 2012
Rex Linuxtag 2012Rex Linuxtag 2012
Rex Linuxtag 2012inovex GmbH
 
Rsyslog deutsche Qualitätsarbeit für Linux Roman Gächter
Rsyslog deutsche Qualitätsarbeit für Linux Roman GächterRsyslog deutsche Qualitätsarbeit für Linux Roman Gächter
Rsyslog deutsche Qualitätsarbeit für Linux Roman GächterDésirée Pfister
 
Rsyslog - Deutsche Qualitätsarbeit für Linux
Rsyslog - Deutsche Qualitätsarbeit für LinuxRsyslog - Deutsche Qualitätsarbeit für Linux
Rsyslog - Deutsche Qualitätsarbeit für LinuxTrivadis
 
Ausgewählte PL/SQL Packages (3)
Ausgewählte PL/SQL Packages (3)Ausgewählte PL/SQL Packages (3)
Ausgewählte PL/SQL Packages (3)Ulrike Schwinn
 
Object-orientied way of using mysqli interface - Workshop
Object-orientied way of using mysqli interface - WorkshopObject-orientied way of using mysqli interface - Workshop
Object-orientied way of using mysqli interface - WorkshopWaldemar Dell
 
Microsoft Azure Platform - System Management v.0.5
Microsoft Azure Platform -  System Management v.0.5 Microsoft Azure Platform -  System Management v.0.5
Microsoft Azure Platform - System Management v.0.5 Oliver Michalski
 
Drupal Multisite und Subversion
Drupal Multisite und SubversionDrupal Multisite und Subversion
Drupal Multisite und SubversionDrupalist
 
Geoinformatik-Kolloquium Juni 2012: High Performance Computing Cluster GIS
Geoinformatik-Kolloquium Juni 2012: High Performance Computing Cluster GISGeoinformatik-Kolloquium Juni 2012: High Performance Computing Cluster GIS
Geoinformatik-Kolloquium Juni 2012: High Performance Computing Cluster GISPeter Löwe
 
Opensource Tools für das Data Center Management
Opensource Tools für das Data Center ManagementOpensource Tools für das Data Center Management
Opensource Tools für das Data Center Managementinovex GmbH
 
Bestehende WordPress-Seiten auf Multisite migrieren
Bestehende WordPress-Seiten auf Multisite migrierenBestehende WordPress-Seiten auf Multisite migrieren
Bestehende WordPress-Seiten auf Multisite migrierenWalter Ebert
 
Oracle12c threaded execution - Ressourcen sparen zum Nulltarif?!?
Oracle12c threaded execution - Ressourcen sparen zum Nulltarif?!?Oracle12c threaded execution - Ressourcen sparen zum Nulltarif?!?
Oracle12c threaded execution - Ressourcen sparen zum Nulltarif?!?Trivadis
 
Hochleistungsspeichersysteme für Datenanalyse an der TU Dresden (Michael Kluge)
Hochleistungsspeichersysteme für Datenanalyse an der TU Dresden (Michael Kluge)Hochleistungsspeichersysteme für Datenanalyse an der TU Dresden (Michael Kluge)
Hochleistungsspeichersysteme für Datenanalyse an der TU Dresden (Michael Kluge)data://disrupted®
 
Domino 9 - jetzt mit integrierten Features, die das Admin-Leben leichter machen
Domino 9 - jetzt mit integrierten Features, die das Admin-Leben leichter machenDomino 9 - jetzt mit integrierten Features, die das Admin-Leben leichter machen
Domino 9 - jetzt mit integrierten Features, die das Admin-Leben leichter machenAndreas Ponte
 
Automatisierte Linux Administration mit (R)?ex
Automatisierte Linux Administration mit (R)?ex Automatisierte Linux Administration mit (R)?ex
Automatisierte Linux Administration mit (R)?ex Jan Gehring
 
OSMC 2008 | Programmierung von Nagios-Plugins für NetApp Speichergeräte by In...
OSMC 2008 | Programmierung von Nagios-Plugins für NetApp Speichergeräte by In...OSMC 2008 | Programmierung von Nagios-Plugins für NetApp Speichergeräte by In...
OSMC 2008 | Programmierung von Nagios-Plugins für NetApp Speichergeräte by In...NETWAYS
 
Dart (Teil II der Tour de Dart)
Dart (Teil II der Tour de Dart)Dart (Teil II der Tour de Dart)
Dart (Teil II der Tour de Dart)Nane Kratzke
 
Cynapspro data endpoint protection - Anbindung von Drittsysteme
Cynapspro data endpoint protection - Anbindung von DrittsystemeCynapspro data endpoint protection - Anbindung von Drittsysteme
Cynapspro data endpoint protection - Anbindung von Drittsystemecynapspro GmbH
 
Textanalyse mit UIMA und Hadoop
Textanalyse mit UIMA und HadoopTextanalyse mit UIMA und Hadoop
Textanalyse mit UIMA und Hadoopinovex GmbH
 

Ähnlich wie Drush – Das Sackmesser für die Kommandozeile (20)

FLOW3-Workshop F3X12
FLOW3-Workshop F3X12FLOW3-Workshop F3X12
FLOW3-Workshop F3X12
 
Rex Linuxtag 2012
Rex Linuxtag 2012Rex Linuxtag 2012
Rex Linuxtag 2012
 
Rsyslog deutsche Qualitätsarbeit für Linux Roman Gächter
Rsyslog deutsche Qualitätsarbeit für Linux Roman GächterRsyslog deutsche Qualitätsarbeit für Linux Roman Gächter
Rsyslog deutsche Qualitätsarbeit für Linux Roman Gächter
 
Rsyslog - Deutsche Qualitätsarbeit für Linux
Rsyslog - Deutsche Qualitätsarbeit für LinuxRsyslog - Deutsche Qualitätsarbeit für Linux
Rsyslog - Deutsche Qualitätsarbeit für Linux
 
Ausgewählte PL/SQL Packages (3)
Ausgewählte PL/SQL Packages (3)Ausgewählte PL/SQL Packages (3)
Ausgewählte PL/SQL Packages (3)
 
Object-orientied way of using mysqli interface - Workshop
Object-orientied way of using mysqli interface - WorkshopObject-orientied way of using mysqli interface - Workshop
Object-orientied way of using mysqli interface - Workshop
 
Microsoft Azure Platform - System Management v.0.5
Microsoft Azure Platform -  System Management v.0.5 Microsoft Azure Platform -  System Management v.0.5
Microsoft Azure Platform - System Management v.0.5
 
Drupal Multisite und Subversion
Drupal Multisite und SubversionDrupal Multisite und Subversion
Drupal Multisite und Subversion
 
Geoinformatik-Kolloquium Juni 2012: High Performance Computing Cluster GIS
Geoinformatik-Kolloquium Juni 2012: High Performance Computing Cluster GISGeoinformatik-Kolloquium Juni 2012: High Performance Computing Cluster GIS
Geoinformatik-Kolloquium Juni 2012: High Performance Computing Cluster GIS
 
Opensource Tools für das Data Center Management
Opensource Tools für das Data Center ManagementOpensource Tools für das Data Center Management
Opensource Tools für das Data Center Management
 
Bestehende WordPress-Seiten auf Multisite migrieren
Bestehende WordPress-Seiten auf Multisite migrierenBestehende WordPress-Seiten auf Multisite migrieren
Bestehende WordPress-Seiten auf Multisite migrieren
 
Oracle12c threaded execution - Ressourcen sparen zum Nulltarif?!?
Oracle12c threaded execution - Ressourcen sparen zum Nulltarif?!?Oracle12c threaded execution - Ressourcen sparen zum Nulltarif?!?
Oracle12c threaded execution - Ressourcen sparen zum Nulltarif?!?
 
Hochleistungsspeichersysteme für Datenanalyse an der TU Dresden (Michael Kluge)
Hochleistungsspeichersysteme für Datenanalyse an der TU Dresden (Michael Kluge)Hochleistungsspeichersysteme für Datenanalyse an der TU Dresden (Michael Kluge)
Hochleistungsspeichersysteme für Datenanalyse an der TU Dresden (Michael Kluge)
 
Domino 9 - jetzt mit integrierten Features, die das Admin-Leben leichter machen
Domino 9 - jetzt mit integrierten Features, die das Admin-Leben leichter machenDomino 9 - jetzt mit integrierten Features, die das Admin-Leben leichter machen
Domino 9 - jetzt mit integrierten Features, die das Admin-Leben leichter machen
 
Automatisierte Linux Administration mit (R)?ex
Automatisierte Linux Administration mit (R)?ex Automatisierte Linux Administration mit (R)?ex
Automatisierte Linux Administration mit (R)?ex
 
OSMC 2008 | Programmierung von Nagios-Plugins für NetApp Speichergeräte by In...
OSMC 2008 | Programmierung von Nagios-Plugins für NetApp Speichergeräte by In...OSMC 2008 | Programmierung von Nagios-Plugins für NetApp Speichergeräte by In...
OSMC 2008 | Programmierung von Nagios-Plugins für NetApp Speichergeräte by In...
 
Dart (Teil II der Tour de Dart)
Dart (Teil II der Tour de Dart)Dart (Teil II der Tour de Dart)
Dart (Teil II der Tour de Dart)
 
Cynapspro data endpoint protection - Anbindung von Drittsysteme
Cynapspro data endpoint protection - Anbindung von DrittsystemeCynapspro data endpoint protection - Anbindung von Drittsysteme
Cynapspro data endpoint protection - Anbindung von Drittsysteme
 
Textanalyse mit UIMA und Hadoop
Textanalyse mit UIMA und HadoopTextanalyse mit UIMA und Hadoop
Textanalyse mit UIMA und Hadoop
 
Einführung in Docker
Einführung in DockerEinführung in Docker
Einführung in Docker
 

Mehr von Florian Latzel

Eine Einführung in Scrum
Eine Einführung in ScrumEine Einführung in Scrum
Eine Einführung in ScrumFlorian Latzel
 
Agiles Projektmanagement mit Scrum
Agiles Projektmanagement mit ScrumAgiles Projektmanagement mit Scrum
Agiles Projektmanagement mit ScrumFlorian Latzel
 
Agiles Projektmanagement mit Scrum
Agiles Projektmanagement mit ScrumAgiles Projektmanagement mit Scrum
Agiles Projektmanagement mit ScrumFlorian Latzel
 
Drupal 6.x, Drupal 7.x -- Scratching the surface
Drupal 6.x, Drupal 7.x -- Scratching the surfaceDrupal 6.x, Drupal 7.x -- Scratching the surface
Drupal 6.x, Drupal 7.x -- Scratching the surfaceFlorian Latzel
 
Scrum aus der Praxis - DrupalDevDays 2010
Scrum aus der Praxis - DrupalDevDays 2010Scrum aus der Praxis - DrupalDevDays 2010
Scrum aus der Praxis - DrupalDevDays 2010Florian Latzel
 
drush_multi @ DrupalDevDays 2010
drush_multi @ DrupalDevDays 2010drush_multi @ DrupalDevDays 2010
drush_multi @ DrupalDevDays 2010Florian Latzel
 
Drush und Multisite: drush_multi
Drush und Multisite: drush_multiDrush und Multisite: drush_multi
Drush und Multisite: drush_multiFlorian Latzel
 

Mehr von Florian Latzel (9)

Eine Einführung in Scrum
Eine Einführung in ScrumEine Einführung in Scrum
Eine Einführung in Scrum
 
Agiles Projektmanagement mit Scrum
Agiles Projektmanagement mit ScrumAgiles Projektmanagement mit Scrum
Agiles Projektmanagement mit Scrum
 
Agiles Projektmanagement mit Scrum
Agiles Projektmanagement mit ScrumAgiles Projektmanagement mit Scrum
Agiles Projektmanagement mit Scrum
 
features+ #dcb11
features+ #dcb11features+ #dcb11
features+ #dcb11
 
features+
features+features+
features+
 
Drupal 6.x, Drupal 7.x -- Scratching the surface
Drupal 6.x, Drupal 7.x -- Scratching the surfaceDrupal 6.x, Drupal 7.x -- Scratching the surface
Drupal 6.x, Drupal 7.x -- Scratching the surface
 
Scrum aus der Praxis - DrupalDevDays 2010
Scrum aus der Praxis - DrupalDevDays 2010Scrum aus der Praxis - DrupalDevDays 2010
Scrum aus der Praxis - DrupalDevDays 2010
 
drush_multi @ DrupalDevDays 2010
drush_multi @ DrupalDevDays 2010drush_multi @ DrupalDevDays 2010
drush_multi @ DrupalDevDays 2010
 
Drush und Multisite: drush_multi
Drush und Multisite: drush_multiDrush und Multisite: drush_multi
Drush und Multisite: drush_multi
 

Drush – Das Sackmesser für die Kommandozeile

  • 1. Drush – Das Sackmesser für die Kommandozeile Florian Latzel 1 ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
  • 2. whoami Florian „fl3a“ Latzel Staatl. gepr. Informatiker, LPIC Level 2 IT-Berater(„ISL Individuelle System Lösungen“) Schwerpunkt: Open Source Software ● Content Management Systeme ● Analyse, Beratung, Konzeption, Training ● Web-Entwicklung ● 2 ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
  • 3. ls ­lia drush Inhalt whatis drush.php ● man drush.php ● define('DRUSH_BOOTSTRAP_DRUSH', 0); ● Drush Optionen ● Drush Kommandos ● define('DRUSH_BOOTSTRAP_DRUPAL_ROOT', 1); ● define('DRUSH_BOOTSTRAP_DRUPAL_SITE', 2); ● Drupal-Kommandos ● Paketmanagement und Updates ● define('DRUSH_BOOTSTRAP_DRUPAL_CONFIGURATION', 3); ● SQL-Kommandos ● ~/.drushrc.php ● ~/.drush ● 3 ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
  • 4. whatis drush.php Drupal Shell Projektseite: http://drupal.org/project/drush ● Bevorzugt auf unixoiden Systemen ● PHP-CLI Skript ● Kein Drupal-Modul ● Benötigt keine Drupal-Installation ● Unabhängig von Drupal-Version(5.x, 6.x, 7.x) ● Installation von drush wget http://ftp.drupal.org/files/projects/drush­HEAD­all­versions.tar.gz 4 ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
  • 5. man drush.php RTFM oder die Drush-Hilfe drush.php [­r drupal_root] [­l site_url] help [command] 5 ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
  • 6. define('DRUSH_BOOTSTRAP_DRUSH', 0); Drush Optionen ­r <path>, ­­root=<path> Drupal root directory to use (default: current directory) ­l <uri> , ­­uri=<uri> URI of the drupal site to use  (only needed in multisite environments) ­v, ­­verbose Display all available output ­q, ­­quiet Hide all output ­y, ­­yes Assume 'yes' as answer to all prompts ­s, ­­simulate Simulate all relevant actions  (don't actually change the system) ­i, ­­include                A list of paths to search for drush commands ­c, ­­config                 Specify a config file to use.           See example.drushrc.php ­u, ­­user Specify a user to login with. May be                                          a name or a number. ­b, ­­backend Hide all output and return structured data (internal use only). 6 ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
  • 7. define('DRUSH_BOOTSTRAP_DRUSH', 0); Drush-Kommandos help                Print this help message. Use ­­filter to                   limit command list to one command file                   (e.g. ­­filter=pm)                dl                  Download core Drupal and projects  like CCK, Zen, etc. 7 ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
  • 8. define('DRUSH_BOOTSTRAP_DRUPAL_ROOT', 1); Drush mit einer Drupal-Installation(Drupal-Root) status Provides a birds­eye view of the current Drupal installation, if any.  8 ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
  • 9. define('DRUSH_BOOTSTRAP_DRUPAL_SITE', 2); Drupal-Kommandos cron Run all cron hooks. script                 Run php script(s). cache clear            Clear all caches. watchdog show          Shows recent watchdog log messages. Optionally filter for a specific type. watchdog delete        Delete all messages or only those of a specified type. sync                   Rsync the Drupal tree to/from another                      server using ssh. eval                   Evaluate arbitrary php code after                       bootstrapping Drupal. 9 ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
  • 10. define('DRUSH_BOOTSTRAP_DRUPAL_SITE', 2); Paket-Management und Updates refresh               Refresh update status information enable                Enable one or more modules. disable               Disable one or more modules. uninstall             Uninstall one or more modules. statusmodules         Show module enabled/disabled status refresh               Refresh update status information updatecode            Update your project code update                Update your project code and apply any database updates required (update.php) info                  Release information for a project updatedb Execute the update.php process from the                           command line. 10 ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
  • 11. define('DRUSH_BOOTSTRAP_DRUPAL_CONFIGURATION',3); Drush mit Zugriff auf eine settings.php(SQL) sql conf Print database connection details. sql connect A string for connecting to the DB. sql dump Exports the Drupal DB as SQL using mysqldump. sql query Execute a query against the site database. sql load Copy source database to target database. sql cli Open a SQL command­line interface using Drupal’s credentials. 11 ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
  • 12. ~/.drushrc.php Die Konfigurationsdatei von drush Orte der Plazierung: 1. Ordner einer Drupal-Site 2. Wurzel der Drupal Installation 3. Im Home-Verzeichnis(~/.drushrc.php) 4. Im Ordner der Drush-Installation oder Spezifizierung durch ­c oder --config 12 ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
  • 13. ~/.drushrc.php Die Konfigurationsdatei für Drush <?php  $options['r'] = '/home/florian/drupal/6.x';  $options['v'] = 1;      $options['skip­tables'] = array(    'common' => array('accesslog', 'cache', 'cache_block',           'cache_filter', 'cache_form', 'cache_menu',     'cache_page', 'cache_update', 'history',                         'search_dataset', 'search_index',     'search_total', 'sessions', 'watchdog'),  );  $options['handler'] = 'wget'; Beispiel example.drushrc.php ● 13 ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
  • 14. ~/.drush Eigene Drush-Erweiterungen Location Ordner .drush im Heimatverzeichnis ● Spezifizierung durch ­i oder ­­include ● Beispiel example.drush.inc ● 14 ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel
  • 15. which; whatis; who >/dev/null Fragen? Kontakt ISL Individuelle System Lösungen http://is-loesungen.de f.latzel@is-loesungen.de Netzaffe (Blog) http://netzaffe.de floh@netzaffe.de 15 ISL Individuelle System Lösungen | DrupalMediaCamp.CH 2009 | 2009-05-09 | Florian Latzel