Skip to content

Red5 Service Daemon

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE
Unknown
license.txt
Notifications You must be signed in to change notification settings

beetlejesss/red5-service

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Red5 service

Herein you will find the service / daemon portion of the project. We utilize the Apache Commons Daemon project for our service process on all supported platforms; currently Linux and Windows are supported.

Apache Daemon Windows binaries download

Daemon Details

To hook-in to the daemon, one would get an instance of the EngineLauncher class and call the start() method to start the server process and stop() to terminate it. The windows implementation using procrun is only slightly different in that it calls windowsService() for both start and stop (The string start must be supplied via args with windows).

Shutdown

The Server / service shutdown is performed via socket connection and the shutdown token must be supplied via args when making the request; if its not supplied, the shutdown.token file will be opened, if it exists and is readable.

Setup

Linux

Linux daemon uses jsvc and the init.d script red5.

  1. Set / export RED5_HOME environmental variable
  2. Edit the variables in the init.d script to match your server
  3. Install jsvc
  • Debian sudo apt-get install jsvc
  • CentOS sudo yum ??
  1. Copy the red5 script to your init.d directory, ex. /etc/init.d/
  2. This step is for Systemd enabled operating systems only such as CentOS 7. Copy the red5.service file into the /etc/systemd/system/ directory. Modify the file as needed, ensure the ExecStart path is correctly pointing to the init script.
  3. Install the init.d script
  • Debian
sudo update-rc.d red5 defaults
sudo update-rc.d red5 enable
  • CentOS
systemctl daemon-reload
systemctl enable red5.service
  1. Start the service
  • Debian service red5 start
  • CentOS systemctl start red5.service
  1. Stop the service
  • Debian service red5 stop
  • CentOs systemctl stop red5.service

Windows

Windows daemon uses procrun.

Install

  1. Set the RED5_HOME environmental variable (see below Managing Windows Environment Variables for more detail)
  2. Edit the variables in the install-service.bat script to match your server, if you have special requirements
  3. Download the windows binaries
  • The most current daemon archive (since 2013) to use is named: commons-daemon-1.0.15-bin-windows.zip
  1. Unzip the daemon archive into your red5 directory
  2. Ensure procrun.exe is in your red5 home directory alongside red5-service.jar
  3. Execute install-service.bat to install the service
  4. Open the windows services panel services.msc
  5. Scroll down to Red5
  6. Start the service by clicking the start button in the UI
  7. Stop the service by clicking the stop button in the UI

Uninstall

  1. To uninstall the service execute uninstall-service.bat

Managing Windows Environment Variables

The RED5_HOME variable is used by Red5 and the service daemon; it is used to locate the Red5 installation. The variable must point to the Red5 install location, which may be C:\Program Files\Red5 or something similar depending on how you installed it.

System Variables

You must be an administrator to modify a system environment variable. System environment variables are defined by Windows and apply to all computer users. Changes to the system environment are written to the registry, and usually require a restart to become effective.

User Variables for User Name

Any user can add, modify, or remove a user environment variable. These variables are established by Windows Setup, by some programs, and by users. The changes are written to the registry, and are usually effective immediately. However, after a change to user environment variables is made, any open software programs should be restarted to force them to read the new registry values. The common reason to add variables is to provide data that is required for variables that you want to use in scripts.

To view or change environment variables:

  • Right-click My Computer, and then click Properties.
  • Click the Advanced tab.
  • Click Environment variables.
  • Click one the following options, for either a user or a system variable:
  • Click New to add a new variable name and value.
  • Click an existing variable, and then click Edit to change its name or value.

About

Red5 Service Daemon

Resources

License

Apache-2.0, Unknown licenses found

Licenses found

Apache-2.0
LICENSE
Unknown
license.txt

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 86.6%
  • Batchfile 7.5%
  • Shell 5.9%