Install YUI Compressor – A code minification tool
wget http://yuilibrary.com/downloads/yuicompressor/yuicompressor-2.4.2.zip
unzip yuicompressor-2.4.2.zip
mv yuicompressor-2.4.2/build/yuicompressor-2.4.2.jar /opt/fileconveyor/code/processors/yuicompressor.jar
or
Install YUI Compressor via apt:
sudo apt-get install yui-compressor
Compress the script:
java -jar /usr/share/yui-compressor/yui-compressor.jar --type js -v
myscript.js -o myscript.min.js
RPM available here from http://rpm.pbone.net