[Red5] Red5 daemon startup on Fedora/RedHat/CentOS?
Jeremy Morton
admin at game-point.net
Tue Sep 29 11:05:18 PDT 2009
Yeah but come on, it should be simpler than having to install a new
piece of software. On Debian/Ubuntu OSes, there is one init.d script to
get it to work. It should be possible on RedHat too.
Best regards,
Jeremy Morton (jez)
Mondain wrote:
> Jeremy,
> We are currently using Tanuki softwares' "Java Service Wrapper" in the
> windows versions, but they do offer support for other OS's like Linux.
> http://wrapper.tanukisoftware.org/doc/english/download.jsp
> <http://wrapper.tanukisoftware.org/doc/english/download.jsp>Probably
> wouldn't be all that hard to port what we have (scripts) to their Linux
> version, which I assume offers you the level of control that you want.
>
> Paul
>
> On Tue, Sep 29, 2009 at 9:49 AM, Jeremy Morton <admin at game-point.net
> <mailto:admin at game-point.net>> wrote:
>
> Does no-one have a better way of doing this in RedHat-based OSes? :-(
>
>
> Best regards,
> Jeremy Morton (Jez)
>
> Jeremy Morton wrote:
>
> Is this really the only way to stop the service on RedHat OSes?
> Kill
> ALL java processes?!
>
> Best regards,
> Jeremy Morton (Jez)
>
> Prabhu Tamilarasan (omNovia) wrote:
>
> Not sure if attachments go through so I'll include the
> script here as
> well...
>
> # Init file for red5
> #
> # chkconfig: 345 85 15
> # description: red5 server
> #
> # processname: java
>
> . /etc/rc.d/init.d/functions
>
> RETVAL=0
> name="RED5 Server"
>
> export RED5_HOME=/opt/red5
> test -x $RED5_HOME/red5.sh || exit 5
> echo $RED5_HOME
>
> start()
> {
> echo -n $"Starting $name:"
> mv /var/log/red5.log /var/log/red5_$(date
> +%Y-%m-%d-%H-%M-%S).log
> cd $RED5_HOME
> LD_LIBRARY_PATH=/opt/red5/webapps/ export LD_LIBRARY_PATH
> su -s /bin/bash -c "$RED5_HOME/red5.sh&" root> /var/log/red5.log
> 2>&1&& success || failure
> RETVAL=$?
> echo
> }
>
> stop()
> {
> echo -n $"Stopping $name:"
> su -s /bin/bash -c "killall -q -u root java" root&& success ||
> failure
> echo
> }
>
> case "$1" in
> start)
> start
> ;;
> stop)
> stop
> ;;
> restart)
> stop
> start
> ;;
> status)
> status java
> RETVAL=$?
> ;;
> *)
> echo $"Usage: $0 {start|stop|restart|status}"
> RETVAL=1
> esac
> exit $RETVAL
>
>
> Prabhu Tamilarasan
> ptamilarasan at omnovia.com <mailto:ptamilarasan at omnovia.com>
>
> next generation web conferencing
>
> Follow us:
>
> 675 Bering Drive, Suite 290
> Houston, TX 77057 USA
> www.omNovia.com <http://www.omNovia.com>
> T +1.281.500.4065
>
>
>
>
>
> -----Original Message-----
> From: red5-bounces at osflash.org
> <mailto:red5-bounces at osflash.org>
> [mailto:red5-bounces at osflash.org
> <mailto:red5-bounces at osflash.org>] On
> Behalf
> Of Jeremy Morton
> Sent: Wednesday, September 23, 2009 6:52 PM
> To: red5 at osflash.org <mailto:red5 at osflash.org>
> Subject: [Red5] Red5 daemon startup on Fedora/RedHat/CentOS?
>
> Hi,
>
> I'd like to know how people have gotten Red5 to run as a
> daemon on the
> Fedora/RedHat/CentOS flavours of Linux.
>
> The Ubuntu/Debian init.d script that comes with the Debian
> installer for
> Red5 contains an init.d script that uses the
> 'start-stop-daemon' command
> to fork off an instance of red5.sh, as it deosn't fork itself.
> Unfortunately, the RedHat-based Linuxes do not have this
> command. :-(
> I've been trying to hours to figure out how to code an
> init.d script to
> modify that Debian one to get Red5 to work as a daemon on
> RedHat-based
> OSes, but I'm giving up now. I just can't figure it out.
> Sure, I can
> get red5.sh to run when I say './red5 start', but it doesn't
> relinquish
> control back to the console; it just keeps outputting java
> stuff from
> Red5. I need it to run in the background, but I also need to
> capture
> its PID so a PID file can be written, duplicate executions
> can be
> prevented, and the service can be stopped with './red5 stop'
> is called.
>
> Could anyone who's gotten Red5 working as a daemon on
> RedHat-based OSes
> please reply and tell me how you did it? Are these OSes just as
> terrible at running services as I think they are (they seem
> to rely 100%
> on the actual service script forking itself off nicely, and
> Red5 fails
> to do that)?
>
> Best regards,
> Jeremy Morton (Jez)
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org <mailto:Red5 at osflash.org>
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org <mailto:Red5 at osflash.org>
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org <mailto:Red5 at osflash.org>
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org <mailto:Red5 at osflash.org>
> http://osflash.org/mailman/listinfo/red5_osflash.org
>
>
>
>
> --
> http://gregoire.org/
> http://code.google.com/p/red5/
> http://code.google.com/p/blue5/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Red5 mailing list
> Red5 at osflash.org
> http://osflash.org/mailman/listinfo/red5_osflash.org
More information about the Red5
mailing list