Linux

How to quickly enable or disable Drupal CSS/JS optimization using DRUSH

I find this command very handy during development. Drush can easily disable or enable CSS and JS aggregation using the vset command in Drush. Here's how:

Code

// To turn on JS Aggregation
    drush vset preprocess_js 1 --yes

// To clear all Cache
    drush cc all

// To disable JS Aggregation
   drush vset preprocess_js 0 --yes

// To clear cache of JS and CSS only
   drush cc css+js

// To enable CSS Aggregation
   drush vset preprocess_css 1 --yes

// To disable CSS Aggregation
   drush vset preprocess_css 0 --yes

How to install node.js in CentOS server

Here how to install node.js into you CentOS server. Login to your centOS server using SSH client such as putty and type the following commands in shell.

Code

yum install openssl-devel
cd /usr/local/src
wget http://nodejs.org/dist/v0.6.8/node-v0.6.8.tar.gz
tar zxvf node-v0.6.8.tar.gz
cd node-v0.6.8
./configure
make
make install

How to Install GMP Math library in CentOS server with WHM/CPANEL installation?

First log-in to your server through ssh access then follow this command or type these command in shell

wget http://ftp.sunet.se/pub/gnu/gmp/gmp-4.2.2.tar.bz2
tar -xjvf gmp-4.2.2.tar.bz2
cd gmp-4.2.2
./configure
make
make check
make install

nano /var/cpanel/easy/apache/rawopts/all_php5

add or type the following

--with-gmp

then recompile PHP with default settings

/scripts/easyapache

save and compile, follow the instructions until the scripts finish recompiling the PHP. done!