JoomlaTemplates.me by HostMonster Reviews

How to Install Drush on Debian Squeeze for Drupal-7

Published: Wednesday, 19 June 2013

I just discovered about 2-weeks ago that Drush exists, before which I had been breaking my back whenever I'm to install Drupal-7 and its modules.

Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt. Source: click here

What this means is that Drush makes downloading Drupal and its modules very easy as a lot can be done from the command line,

In very simple steps,

1) Install Drush using apt-get or from Synaptic: apt-get install drush

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libvpx1 libmozjs19d
Use 'apt-get autoremove' to remove them.
Suggested packages:
cvs subversion
The following NEW packages will be installed:
drush
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 156 kB of archives.
After this operation, 766 kB of additional disk space will be used.
Get:1 http://ftp.us.debian.org/debian/ squeeze/main drush all 3.3-1 [156 kB]
Fetched 156 kB in 4s (34.5 kB/s)
Selecting previously deselected package drush.
(Reading database ... 58821 files and directories currently installed.)
Unpacking drush (from .../archives/drush_3.3-1_all.deb) ...
Processing triggers for man-db ...
Setting up drush (3.3-1) ...
root@debian:/home/tokunbo#

2) check drush version:

tokunbo@debian:~$ cat /usr/share/drush/drush.info
drush_version=3.3
tokunbo@debian:~$

3) drush and drush make can also be installed from Synaptic Package Manager, however drush make will give a dependency error:

upgrade drush from backports for drush make in drupal

root@debian:/home/tokunbo# apt-get -t squeeze-backports install drush
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
libvpx1 libmozjs19d
Use 'apt-get autoremove' to remove them.
Suggested packages:
git
The following packages will be upgraded:
drush
1 upgraded, 0 newly installed, 0 to remove and 78 not upgraded.
Need to get 251 kB of archives.
After this operation, 455 kB of additional disk space will be used.
Get:1 http://backports.debian.org/debian-backports/ squeeze-backports/main drush all 4.5-2~bpo60+1 [251 kB]
Fetched 251 kB in 3s (73.9 kB/s)
Reading changelogs... Done
(Reading database ... 60164 files and directories currently installed.)
Preparing to replace drush 3.3-1 (using .../drush_4.5-2~bpo60+1_all.deb) ...
Unpacking replacement drush ...
Processing triggers for man-db ...
Setting up drush (4.5-2~bpo60+1) ...
root@debian:/home/tokunbo#

4) check version after upgrade:
root@debian:/home/tokunbo# cat /usr/share/drush/drush.info
drush_version=4.5
root@debian:/home/tokunbo#

or

dpkg -l drush
root@debian:/home/tokunbo# dpkg -l drush
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-====================-

====================-============================

============================
ii drush 4.5-2~bpo60+1 command line shell and Unix scripting interface for Drup
root@debian:/home/tokunbo#

5) install drush make:
root@debian:/home/tokunbo# apt-get install drush make
Reading package lists... Done
Building dependency tree
Reading state information... Done
drush is already the newest version.
The following packages were automatically installed and are no longer required:
libvpx1 libmozjs19d
Use 'apt-get autoremove' to remove them.
Suggested packages:
make-doc
The following NEW packages will be installed:
make
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/392 kB of archives.
After this operation, 1,233 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Media change: please insert the disc labeled
'Debian GNU/Linux 6.0.6 _Squeeze_ - Official i386 CD Binary-1 20120929-15:56'
in the drive '/media/cdrom/' and press enter

Selecting previously deselected package make.
(Reading database ... 60192 files and directories currently installed.)
Unpacking make (from .../make-dfsg/make_3.81-8_i386.deb) ...
Processing triggers for man-db ...
Setting up make (3.81-8) ...
root@debian:/home/tokunbo#

6) check drush make version:

root@debian:/home/tokunbo# dpkg -l drush make
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Description
+++-====================-

====================-

========================

==============================
ii drush 4.5-2~bpo60+1 command line shell and Unix scripting interface for Drup
ii make 3.81-8 An utility for Directing compilation.
root@debian:/home/tokunbo#

note: the version is now 4.5......

7) you can also check drush status:

root@debian:/var/www/drupal2# drush status
PHP configuration : /etc/php5/cli/php.ini
Drush version : 4.5
Drush configuration :
Drush alias files :

8) go to drushmake.me and generate a sample .make file:

For this tutorial, the administration menu, module filter and the slideshow modules are chosen:
- copy generated file and save with a filename, ex: sample.make
- CD to your webserve DIR,
- create a folder, ex: drupal1
- copy sample.make into drupal1
root@debian:/var/www/drupal1# dir
sample.make
root@debian:/var/www/drupal1# drush make sample.make -y

 

the "-y" is to answer an automatic yes to any prompts during the installation

Add comment


Security code
Refresh