wget [url]http://people.mobiledirect.ru/people/umask/public/jdk6u10/[/url]jdk-6u10-linux-x64-rpm.bin
sh jdk-6u10-linux-x64-rpm.bin
选择1
Java(TM) SE Runtime Environment (build 1.6.0_10-b33)
Java HotSpot(TM) 64-Bit Server VM (build 11.0-b15, mixed mode)
ln -s resin-3.1.8 resin
cp /home/resin/contrib/init.resin.in /etc/init.d/resin //设置Resin启动服务
RESIN_HOME=/home/resin
#
# Linux startup script for Resin
# chkconfig: 345 85 15
# description: Resin is a Java Web server.
# processname: wrapper.pl
#
# To install, configure this file as needed and copy init.resin
# to /etc/rc.d/init.d as resin. Then use "# /sbin/chkconfig resin reset"
#
JAVA_HOME=/usr/java/default
RESIN_HOME=/home/resin
#
# If you want to start the entire Resin process as a different user,
# set this to the user name. If you need to bind to a protected port,
# e.g. port 80, you can't use USER, but will need to use bin/resin.
#
USER=
#
# Set to the server id to start
#
#SERVER="-server app-a"
#
ARGS="-resin-home $RESIN_HOME $SERVER"
. /lib/lsb/init-functions
else
if [ -z "$1" ]; then
return 1
fi
echo -n "$1:"
return
fi
echo -n "$1: $2"
}
log_end_msg () {
[ -z "$1" ] && return 1
echo " ."
else
echo " failed!"
fi
return $1
}
start)
log_daemon_msg "Starting resin"
if test -n "$USER"; then
su $USER -c "$JAVA -jar $RESIN_HOME/lib/resin.jar $ARGS start" 1>/dev/null 2>/dev/null
else
$JAVA -jar $RESIN_HOME/lib/resin.jar $ARGS start 1>/dev/null 2>/dev/null
fi
log_end_msg $?
;;
stop)
log_daemon_msg "Stopping resin"
if test -n "$USER"; then
su $USER -c "$JAVA -jar $RESIN_HOME/lib/resin.jar $ARGS stop" 1>/dev/null 2>/dev/null
else
$JAVA -jar $RESIN_HOME/lib/resin.jar $ARGS stop 1>/dev/null 2>/dev/null
fi
log_end_msg $?
;;
restart)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac