Install drush on CentOS using command line with simple steps

Drush is great native application for development of drupal project. I really like to use this tool in every project. There are some good steps to install drush on Linux or windows environment. I recently installed drush on my centos machine. Here are those steps:

Commands has been highlighted in blue color.

[root@ap107 purab]# wget
–2016-04-21 11:50:43–
Connecting to||:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 5264426 (5.0M) [application/octet-stream]
Saving to: “drush.phar”

100%[===========================================================================================================================================================>] 5,264,426    221K/s   in 65s

2016-04-21 11:51:50 (78.5 KB/s) – “drush.phar” saved [5264426/5264426]

[root@ap107 purab]# php drush.phar core-status
PHP configuration      :  /etc/php.ini
PHP OS                 :  Linux
Drush script           :  /home/purab/drush.phar
Drush version          :  8.0.5
Drush temp directory   :  /tmp
Drush configuration    :
Drush alias files      :

[root@ap107 purab]# chmod +x drush.phar

[root@ap107 purab]# mv /usr/local/bin/drush /usr/bin/drush
[root@ap107 purab]# drush init
Copied example Drush configuration file to /root/.drush/drushrc.php                                                                                                                       [ok]
Copied example Drush bash configuration file to /root/.drush/drush.bashrc                                                                                                                 [ok]
Copied Drush completion file to /root/.drush/                                                                                                                            [ok]
Copied example Drush prompt file to /root/.drush/                                                                                                                          [ok]
# Include Drush bash customizations.
if [ -f “/root/.drush/drush.bashrc” ] ; then
source /root/.drush/drush.bashrc

# Include Drush completion.
if [ -f “/root/.drush/” ] ; then
source /root/.drush/

# Include Drush prompt customizations.
if [ -f “/root/.drush/” ] ; then
source /root/.drush/

Append the above code to /root/.bashrc? (y/n): y
Updated bash configuration file /root/.bashrc                                                                                                                                             [ok]
Start a new shell in order to experience the improvements (e.g. `bash`).                                                                                                                  [ok]
[root@ap107 purab]# drush

Published by


I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

Leave a Reply

Your email address will not be published.