I followed the instructions in here to install red5 manually through tarball because the apt-get does not work for Ubuntu 14.04: Ubuntu Trusty red5-server installation fails to start

Even with installing the dependencies manually the server will always fail. The red5 server now works but the terminal must be open and just hang there. I need a startup script to run the process in the background. The conversation here: http://chat.stackexchange.com/rooms/29197/discussion-between-umi-and-pl-rock

I followed but it doesn't work properly. Now the result is:

In init.d/red5 I have two lines - start on filesystem & exec /bin/bash /usr/share/red5.sh.

update rc.d red5 defaults returns:

missing LSB information

sudo service red5 stop returns:

stop: Unknown instance

sudo service red5 start returns:

red5 stop/waiting
  • I am doing the installation of Red5 that I have been meaning to do for a long time. Im checking it now to see how I pulled it off with other 3 servers.
    – Faron
    Sep 24 '15 at 18:40

sorry by mistake i wrote there wrong syntax in chat .

First method :

create any file under /etc/init.d

sudo nano /etc/init.d/red5

add lines

cd /full-path/red5-server-1.0.6-RELEASE/ && ./red5.sh &

save this file and exit then make it executable

sudo chmod ugo+x /etc/init.d/red5

then run command

sudo update-rc.d red5 defaults

your problem is solved. you can start it using

sudo service red5 start

Second method :

you can use /etc/rc.local.
/etc/rc.local is where you can customize your own daemon to run in the background. Daemon is what does the job in running whichever scripts you want system to run in the background. This is where the system picks up to start daemons before releasing the system to you for your use.

open it using command

sudo nano /etc/rc.local

add bellow command before exit 0

cd /full_path/red5-server-1.0.6-RELEASE/ && ./red5.sh &

and you can test if this is working correctly or not

sh /etc/rc.local

next time you start your system or reboot your red5 server will run in background. it will work.

Third method :

create any .conf file under /etc/init

sudo nano /etc/init/red5.conf

add bellow lines

start on runlevel [2345]
stop on runlevel [016]
exec /full-path/red5-server-1.0.6-RELEASE/red5.sh

now you start server

sudo service red5 start

if you want to create better upstart then read Upstart Intro, Cookbook and Best Practises

  • Using the first method I still get "start: Unknown job: red5". In /etc/init.d/red5 i have "#!/bin/sh" and "cd /usr/share/red5/ && ./red5.sh &" In Also will this method startup red5 server when the VPS restarts?
    – Joe W
    Sep 25 '15 at 3:07
  • all three method i have tested on my ubuntu 14.04 is working . but , first one is not working then use second method it will solve your problem. my upstart script is basic . if you want to add all function reload , restart , stop etc. then you have put more effort to write it . if you just want to run in background then use second method.
    – pl_rock
    Sep 25 '15 at 3:16
  • I got it to work using the 2nd method! just tested after reboot, my red5 server was up!!! I think this will help so many people.
    – Joe W
    Sep 25 '15 at 3:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.