instalación de drush en un hosting cpanel de Lunarpages

Primero deben tener acceso SSH, si no lo tienen hay que pagar $2 adicionales por mes por el servicio en LP.
Aquí van los pasos:

1. Se conectan por ssh. Supongamos que tienen el usuario tony
2. Se van a la carpeta /home/tony y allí crean la carpeta src/
3. Dentro de la carpeta /home/tony/src descargan drush usando el comando

curl -L -O http://ftp.drupal.org/files/projects/drush-7.x-4.4.tar.gz

4. Descomprimen la carpeta que contiene drush
5. Abren el archivo /home/tony/.bashrc y allí dentro agregan la siguiente línea

alias drush='/home/abefe0/src/drush/drush'

5. Cerrar la sesión ssh y volver a ingresar para que recargue el alias del comando.

Eso es todo, tipeen drush y todo debería estar corriendo ok :)

Si les sale un error como

Command pm-update needs a higher bootstrap level to run - you will need invoke drush from a more functional Drupal environment to run this        [error]
command.
Command pm-update needs the following modules installed/enabled to run: update.                                                                   [error]
The drush command 'up' could not be executed.                                                                                                     [error]
Drush was not able to start (bootstrap) the Drupal database.                                                                                      [error]
Hint: This error often occurs when Drush is trying to bootstrap a site that has not been installed or does not have a configured database.

Drush was attempting to connect to : 
  Drupal version    : 6.19
  Site URI          : http://web.org/portal
  Database driver   : mysql
  Database hostname : localhost
  Database username : tony_admin
  Database name     : tony_portal
  Default theme     : garland
  Administration theme: garland
  PHP configuration : /usr/local/lib/php.ini
  Drush version     : 4.4
  Drush configuration: /home/tony/.drush/drushrc.php
  Drush alias files : 
  Drupal root       : /home/tony/www/portal
  Site path         : sites/default
  Modules path      : sites/all/modules
  Themes path       : sites/all/themes
  %paths            : Array

You can select another site with a working database setup by specifying the URI to use with the --uri parameter on the command line or
$options['uri'] in your drushrc.php file.

Entonces deben ir al archivo settings.php y cambiar localhost por 127.0.0.1 en la conexión mysql ($db_url ).

Etiquetas: