Installing Ventrilo server on Centos 6
This guide is based on Ulyssesonline's guide for installing Ventrilo on Ubuntu: http://ulyssesonline.com/2012/08/27/install-ventrilo-server-on-ubuntu-12-04/
For any of us who have played any sort of online game before, Ventrilo is ubiquotous with raid groups or clans. In this tutorial, I'll show you how to install the free version (max 10 connection and locked port) version of Ventrilo Server on your Centos 6 server.
Step 1: download the tar file
First, navigate to the Ventrilo site and download the .tar of Ventrilo server. (Linux 32-bit, as there is no 64 bit server at this time): Download Here
Step 2: extract the files
Once you have downloaded the .tar file (either on your server via wget or something along those lines, or on your local machine) cd into the directory in which you download the file and extract the contents with the command:
$ tar -xvf ventrilo_srv-3.0.3-Linux-i386.tar.gz
$ cd ventrilo
Note that your version might be different than the 3.0.3 version I downloaded now.
Step 3: create Ventrilo user
In order for Ventrilo to run as a process, you will need to create a user to run Ventrilo. Create this user with the following command:
$ sudo useradd ventrilo
Step 4: move binaries and configuration files
Now we will need to move the binaries and config files to their appropriate place on our systems.
$ sudo mv ventsrv/ventrilo_srv /usr/bin/ventrilo_srv
$ sudo mv ventsrv/ventrilo_status /usr/bin/ventrilo_status
$ sudo chmod +x /usr/bin/ventrilo_srv /usr/bin/ventrilo_status
$ sudo mkdir /etc/ventrilo
$ sudo mv ventrilo_srv.ini /etc/ventrilo/ventrilo_srv.ini
$ sudo chown -R ventrilo:ventrilo /etc/ventrilo
Step 5: create startup scripts
Now that we have moved the binaries into the appropriate place, we need to create a startup/stop script in order to run Ventrilo and control it via command line.
Create the new startup script and paste the following script:
$ sudo vi /etc/init.d/ventrilo
#!/bin/bash
# ventrilo server
# chkconfig: 2345 95 20
# Pull in init.d functions
. /etc/rc.d/init.d/functions
VENPATH=/etc/ventrilo
VENBIN=/usr/bin/ventrilo_srv
RETVAL=0
prog="ventrilo"
runlevel=$(set -- $(runlevel); eval "echo \$$#" )
start()
{
# Startup ventrilo server
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()
{
# Kill ventrilo server
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 {start|stop}"
RETVAL=1
esac
exit $RETVAL
Step 6: add Ventrilo to startup programs
Now that you have added the startup script, you're going to want to set Ventrilo to run at server startup automatically. To do this in Centos, simple run the following command:
$ sudo chkconfig ventrilo on
Step 7: Start Ventrilo
$ sudo service ventrilo start
you should see the mesaage: "Starting ventrilo: [ OK ]" when ventrilo starts correctly.
Step 8: Stopping Ventrilo
Why you would need to stop Ventrilo, I'm not entirely sure, but it can be done in the normal way:
$ sudo service ventrilo stop
Step 9: Customize Ventrilo Configuration
The only configuration changes that I worry about is configuring Ventrilo server to work with Mac clients, which is a simple matter of setting the VoiceCodec=3 and VoiceFormat=18. Here is an example of the file '/etc/ventrilo/sentrio_srv.ini
[Server]
Name=ServerName
Phonetic=Servername
Auth=0
Duplicates=1
AdminPassword=password
Password=password
SendBuffer=0
RecvBuffer=0
Diag=0
LogonTimeout=5
CloseStd=1
TimeStamp=0
PingRate=10
ExtraBuffer=0
ChanWidth=0
ChanDepth=0
ChanClients=0
DisableQuit=0
VoiceCodec=3
VoiceFormat=18
SilentLobby=0
Step 10: Punch a Hole for Connections
In order for users to connect to your server from the outside world, you'll need to add the rules to your iptables and then restart iptables. Don't forget that you will also need to open this port in your router in order to allow traffic on this port into your netwrok to begin with.
$ sudo iptables -A INPUT -p tcp --dport 3784 -j ACCEPT
$ sudo iptables -A INPUT -p udp --dport 3784 -j ACCEPT
$ sudo service iptables restart
At this point you should be able to fire up a ventrilo client and connect to your server using your servers local ip (inside network) or external ip from outside of your network. Remember the port will be 3784.