This instruction should work for Debian, Ubuntu, CentOS:
Install Drush
sudo wget --quiet -O - http://ftp.drupal.org/files/projects/drush-All-Versions-HEAD.tar.gz | tar -zxf - -C /usr/local/share
sudo ln -s /usr/local/share/drush/drush /usr/local/bin/drush
sudo drush
Use Drush
- Change into your Web server's root directory (cd /var/www).
- Run drush dl drupal-7.0. This downloads Drupal 7.0 from drupal.org and extracts the files into /var/www/drupal-7.0.
- Change into the newly created directory (cd /var/www/drupal-7.0) and run thesite-install command:
drush site-install --db-url=mysql://root:secret@localhost/drupal
Answer “y” to the following prompt, and in a few short moments, you'll have a working Drupal install (using the “drupal” database on localhost). To verify, you can browse to http://localhost/drupal-7.0/ and log in using admin/admin as the user name/password, respectively. The site-install command has several additional options; run drush help site-install for full details.
$aliases['example'] = array(
'root' => '/var/www/example/drupal',
'uri' => 'example.com',
);
Now you can run drush commands for your example site from any directory usingdrush @example
No comments:
Post a Comment