HowtoForge

Install Camfrogserver Advanced 6.0 On Ubuntu Linux

Install Camfrogserver Advanced 6.0 On Ubuntu Linux

This is an updated tutorial on how to install Camfrog Server on Ubuntu 10.10 (Maverick Meerkat).  When I first saw that Camfrog Server was released I was excited until I realized it was only for RedHat AS/ES 4.x 5.x, CentOS 4.x 5.x, Fedora 6.x 7.x 8.x operating systems. Then I realized you can convert rpm packages to deb packages using alien; you can even have alien install the rpm automatically after converting it. You also need the 32bit library files: 

sudo apt-get -f install ia32-libs

I have already converted the RPM Package for you so you don't have to use alien.

You may download it from my server: http://www.omrhosting.com/downloads/camfrogserver_6.2-41_all.deb

cd /tmp
wget http://www.omrhosting.com/downloads/camfrogserver_6.2-41_all.deb

Install it:

sudo dpkg -i camfrogserver_6.2-41_all.deb

Create a "new" script in your /etc/init.d/ directory called camfrogserver and put this in the file:

nano -x /etc/init.d/camfrogserver

#!/bin/bash
#
### BEGIN INIT INFO
# Provides:          camfrogserver
# Required-Start:    $network $remote_fs $syslog
# Required-Stop:     $network $remote_fs $syslog
# Should-Start:      $named
# Should-Stop:       $named
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Camfrog Server Linux Debian init.d script by James Youngstrom.
### END INIT INFO
NAME=camfrogserver DESC="Camfrog Server" DAEMON=/usr/bin/camfrogserver PIDFILE=/var/run/camfrogserver/$NAME.pid CONFDIR=/etc/camfrogserver.d CMDFILE=/var/run/camfrogserver/commands.ctl DAEMON_ARGS="-f -p${PIDFILE} -c${CMDFILE} ${CONFDIR}/cf_server.conf -d" CF_USER=camfrogserver
do_start() {
        start-stop-daemon --start \                 --user $CF_USER \                 --chuid $CF_USER \                 --pidfile $PIDFILE \                 --exec $DAEMON -- $DAEMON_ARGS < /dev/null         return $?
}
do_stop() {         start-stop-daemon --stop \                 --retry=TERM/30/KILL/5 \                 --pidfile $PIDFILE \                 --name $NAME         pkill $NAME         rm -f $PIDFILE         return "$?" }
case "$1" in start)         echo "Starting Camfrog Server"         do_start         echo "Camfrog Server Started Successfully"         ;;
stop)         echo "Shutting Down Camfrog Server."         do_stop         echo "Camfrog Server Is Now Down"         ;;
restart)         echo "Restarting Camfrog Server..."         do_stop         sleep 10         do_start         echo "Camfrog Server Restarted"         ;;
*)         echo "Usage: $0 start|stop|restart"         exit 1         esac         exit 0
        ;;

Next you want to make it executable:

sudo chmod +x /etc/init.d/camfrogserver

Then make sure it boots on system startup:

sudo update-rc.d camfrogserver defaults

Ports to forward:

6000:6010 tcp
5000:15000 udp
6005 udp
5999 tcp (for web panel access pro feature)

UFW commands to open ports for camfrogserver:

sudo ufw allow proto tcp from any to any port 6000:6010
sudo ufw allow proto udp from any to any port 5000:15000
sudo ufw allow 6005/udp
sudo ufw allow 5999/tcp

Next you will want to edit the cf_server.conf. I will show you how to create one based off the sample.

First: Edit the configuration file to fit your needs:

sudo nano -x /etc/camfrogserver.d/cf_server.conf.sample

Edit the following parameters in cf_server.conf.sample and save it as cf_server.conf:

rooms_active=Ubuntu_Linux
web_interface_enabled=on
web_server_port=5999
web_server_interface=

Ctrl+X saves the file. Make sure to rename it to cf_server.conf.

Next:

sudo mkdir /etc/camfrogserver.d/room_name

I am making for my room:

sudo mkdir /etc/camfrogserver.d/Ubuntu_Linux

Next:

sudo nano -x /etc/camfrogserver.d/cf_room.conf.sample

Editing the following parameters to suit your needs:

logon_name=Ubuntu_Linux
logon_password=password
serial=00000000000-0000000000000000-0000000
remote_access_login=James
remote_access_password=password

Ctrl + X to save the file. Save as:

room_name/cf_room.conf

In my case I'm saving it to:

/etc/camfrogserver.d/Ubuntu_Linux/cf_room.conf

Next, start up the camfrogserver by typing:

service camfrogserver start

Now type

/usr/bin/camfrogserver -g 

This will update the SSL_certificate_param in your cf_server.confautomatically.

You will see the following:

Certificate generated successfully, cert file name: /etc/camfrogserver.d/cert.pem, configuration file /etc/camfrogserver.d/cf_server.conf updated

You should now be able to login to your web interface using your Remote Access Login and Password as long as your room is a PRO room. Note: you may have to restart the server first:

service camfrogserver restart

Remember: Non-Pro rooms are extremely limited. The web interface will not be available for Free rooms.

 For those of you with the Camfrog Client installed my room is called Ubuntu_Linux

Install Camfrogserver Advanced 6.0 On Ubuntu Linux