If you are a Ubuntu server you could use apt-get itself to do the installation
Ubuntu:
sudo apt-get install yui-compressor
In another reference I found, the jar file was copied to the folder /usr/share/yui-compressor
wget http://yui.zenfs.com/releases/yuicompressor/yuicompressor-2.4.6.zip
unzip yuicompressor-2.4.6.zip
mv yuicompressor-2.4.6/build/yuicompressor-2.4.6.jar /usr/share/yui-compressor/yui-compressor.jar
Then the file was created yui-compressor
in /usr/bin/
, creating an environment variable to run your file . jar
#!/bin/sh
YUI_JAR=/usr/share/yui-compressor/yui-compressor.jar
java -jar $YUI_JAR "$*"
There are also several warnings to check your installed java version.
Can you give more details about which server you are using? seems to me a pertinent detail to this question
– Guilherme