Learn How To Install Ventrilo as a Service on CentOS 6

March 20, 2020

Table of Contents

Introduction

In this tutorial, we’ll be installing Ventrilo on CentOS 6 x64.

Prerequisites

A CentOS 6 system, with more than 768 megabytes of RAM.

Installation

Step one – retrieving the latest TAR file from their site:

Unfortunately, downloading the TAR directly from their site isn’t possible with wget, nor cURL. We’ll need to download this manually and upload it via/ SFTP or FTP.

Step two – extracting the tarball (change version accordingly):
tar -xvf ventrilo_srv-3.0.3-Linux-i386.tar.gz 
Step three – moving the libraries:
mv ventsrv/ventrilo_status /usr/bin/ventrilo_status
mv ventsrv/ventrilo_srv /usr/bin/ventrilo_srv
mkdir /etc/ventrilo
mv ventrilo_srv.ini /etc/ventrilo/ventrilo_srv.ini
Step four – setting the appropiate permissions:
chmod +x /usr/bin/ventrilo_srv /usr/bin/ventrilo_status
chown -R ventrilo:ventrilo /etc/ventrilo
Step five – creating the service:
vi /etc/init.d/ventrilo

Paste the following:

#!/bin/bash
# Ventrilo Daemon
# chkconfig: 2345 95 20

. /etc/rc.d/init.d/functions

VENPATH=/etc/ventrilo
VENBIN=/usr/bin/ventrilo_srv
RETVAL=0
prog="ventrilo"

runlevel=$(set -- $(runlevel); eval "echo $$#" )
start()
{

echo -n $"Starting $prog: "
$VENBIN -f$VENPATH/ventrilo_srv -d && success || failure
RETVAL=$?
[ "$RETVAL" = 0 ] && touch /var/lock/subsys/ventrilo_srv
echo

# renice -5 `cat $VENPATH/ventrilo_srv.pid`
}
stop()
{

echo -n $"Stopping $prog: "
if [ -n "`pidfileofproc $VENBIN`" ] ; then
killproc $VENBIN
else
failure $"Stopping $prog"
fi
RETVAL=$?
[ "$RETVAL" = 0 ] && rm -f /var/lock/subsys/ventrilo_srv
echo
}

case "$1" in
start)
start
;;
stop)
stop
;;
*)
echo "Usage: $0 "
RETVAL=1
esac
exit $RETVAL

Save and exit (hit CTRL, followed by W, Q, and the Enter key).

Optional Step – making it start automatically on boot:
chkconfig ventrilo on

Starting and stopping Ventrilo

Starting:

service ventrilo start

Stopping:

service ventrilo stop

Conclusion

This concludes our tutorial, thank you for reading.

Need help?

Do you need help setting up this on your own service?
Please contact us and we’ll provide you the best possible quote!