Saturday, April 20, 2013

IP Tables Port Redirection

PublicIP(NAT BOX):5001

PrivateIP:5001

iptables -t nat -I PREROUTING --src 0/0 --dst PrivateIP -p tcp --dport 5001 -j REDIRECT --to-ports 5001

iptables -I FORWARD -p tcp -d PrivateIP --dport 5001 -i eth0 -j ACCEPT

Friday, April 12, 2013

SBT Launcher

Copying the launcher into the bin dir and creating the script

#!/bin/sh
java -Xmx256M -jar `dirname $0`/sbt-launcher.jar "$@"
OR
A better script for the launch
FILENAME=$0if [ -h $FILENAME ]
  then
    FILE_NAME=`readlink $0`
fi
java -Xmx512M -jar `dirname $FILE_NAME`/sbt-launch-0.7.5.jar "$@"
so the sbt file can be placed on any path:
mkdir /opt/sbt
cd /opt/sbt
wget  http://simple-build-tool.googlecode.com/files/sbt-launch-0.7.5.jar

create a file and add the script above

vim sbt

chmod 755 sbt
ln -s /opt/sbt/sbt /usr/bin/sbt