Installing Drush on Linux Mint

This has been tested in Rebecca and Rosa.

Open the terminal in your $HOME directory. The $HOME directory is typically at /home/yourname. You can easily get to it from anywhere in the terminal just by typing cd and pressing enter.

1. Enter the following:

php -r "copy('', 'composer-setup.php');"

You may get a message that you need to install php5-cli using apt-get. If needed do it by typing:

TIP: Drupal6/7 permissions setup compatible with DSO (mod_php) 'nobody' web server mode on CentOS+WHM/cPanel under Drush maintenance

Some context

So why might you, if you are operating a cPanel-based VPS for your own Drupal sites, want to consider switching from suPHP to DSO ?

"Your Drupal site got hacked ? Well it's entirely your own fault ! You should always do your updates ! You've only got yourself to blame (and don't dare blame the security holes in that older Drupal code) !!!"

Advanced debugging of Drupal core using the command line (strace & tcpdump)


Debugging of Drupal was never easy, until you know the right tools and how to use them.

There are plenty of alternative debugging methods using some popular PHP libraries XDebug, XHProf, NuSphere PhpED, etc. and also most of the IDE have already built-in step-by-step debugger.

Useful Unix/Linux Commands for Drupal

Following are some useful Unix/Linux commands which are helpful if you are dealing with large sites (files and db size). I find these really handy when moving sites from one server to other, taking backups of Files, Database etc.

Note: To get access to the Unix command line, you will need an SSH client (e.g. Putty). You can also use WinSCP if you are not comfortable with Command line. WinSCP has a feature to enter custom commands using its interface.

Please add other command-line commands that you use while setting up, developing and managing your Drupal sites.

Zip Contents of current directory
zip -r *

Unzip Contents into current directory

Unzip (and extract) the tar'd, gzipped archive (tarball) Contents into current directory
tar zxvf tarballfile.tar.gz

Remove a directory and its contents (Use with extra care)
rm -rf directoryname

Backup Database
mysqldump dbname -uUSERNAME -pPASSWORD --host HOST > filename.sql

Restore Database
mysql -u root -p[root_password] [database_name] < dumpfilename.sql

Copy all files / directories from one server to other (Both servers should have SSH Support)
rsync -avz --progress username@servername:sourcefolder destinationfolder

Linux Memcached daemon, PHP PECL, Drupal Memcache & localized UNIX sockets

This information enhances the documentation for the Drupal Memcache module. The Drupal configuration on this page is for Drupal 6, while the other information below is Drupal version agnostic. For Drupal 7 sites on Ubuntu 12.04 you may want to see this post.

Quick install for developers (command line)

This page provides a summary of the command line instructions for installing Drupal on a typical UNIX/Linux web server. Every step contains a link to more detailed installation instructions where you also can find information about installing Drupal on other systems.


Subscribe with RSS Subscribe to RSS - linux