Syed Jahanzaib Personal Blog to Share Knowledge !

January 4, 2014

Automated Installation Script For DMASOFTLAB RADIUS MANAGER v4.1.x in Ubuntu


rm-logo

radiusmanager-modified

Following is an customized script to install DMASOFTLAB Radius Manager ver 4.0.4 & 4.1.xfor Ubuntu 10x or 12.x / 32bit.
(Selectable via menu, I will add the latest cumulative patch no.5 in this script later ).

The aim of writing this script was to save some time and efforts every time I put in new RM installation. Since DMA don’t have any official support forum (except for there email support which is valid for paid customers only) , so I thought it might be helpful for others too  by sharing this info 🙂

I know very well that It is not a perfect script, it can be very well shorten as per the requirement, but still it does it’s job very nicely with out any user intervention 🙂

Suggestions are most welcome at  . . .
aacable @ hotmail . com

 

Script Update Revision History:

1- —– forgot to make revision  from the beginning  😉
[ 7th January 2014 ]    Download URL changed to aacable.rdo.pt /files/rm_related
[ 7th January 2014 ]    MySQL user ‘conntrack’ variable fixed in MySQL section
[ 8th January, 2014]    O.S check for UBUNTU added
[ 8th January, 2014]    root user check added
[ 8th January, 2014]    Function added to remove previously downloaded files in /temp folder to avoid duplication
[ 8th January, 2014]    Internet and $URL availability check
[ 29th January, 2014]  aacable.rdo.pt was down dueto quota limit, now added secondary link URL2 = http://wifismartzone.com/files/linux_related/
[28th July, 2014] Add rmpoller service to run at startup
[19th November, 2014]  Fixed captcha image not showing dueto tmpimages folder missing

Requirements:

1- Fresh Installation of UBUNTU 32bit  (script is well tested with 10.x and 12.x ,  both Desktop/Server edition works, 32bit edition only)

2- Internet access, off course ; )

3- Valid License files provided by DMASOFTLAB , valid with your physical (or virtual) interface MAC address


 

What components does this script add to the system ?

This script will install following in your system. (as per order nos.)

> Download Radius Manager from an remote location, as per your choice between 4.0 and 4.1
(choice menu offered right after execution of the script) and place it /temp folder

> Update Ubuntu by apt-get update command

> Install necessary components like mysql , apache2, php5,

> download and install dmasoftlab required components like libltd* , IONCUBE and add its entries in Apache’s php files

> Download and compile freeradius-server-2.2.0-dma-patch-2 package

> Add Radius & Conntrack DB in mysql suing CLI (Make sure your root password matched in variables section)

> Extract Radius Manager Installation file & install it.

> Restart Services like apache2, mysql, radius


 

IMPORTANT:


1- B
efore accessing RM ACP , make sure you upload valid LICENSE files in /var/www/radiusmanager folder

2- Also make sure that when mysql asks you for password (during installation) set it to “zaib1234” , otherwise it will be a mess to change it later 🙂


 

How-to Execute The Script  !!

There are several ways to do it, one is explained below . . .

Create a new script

touch /rm-ubuntu-32bit.sh
chmod +x /rm-ubuntu-32bit.sh
nano /rm-ubuntu-32bit.sh

.

Now copy paste the following code.

#!/bin/bash
# Version 1.3 / 9th November, 2014
# Syed Jahanzaib / aacable@hotmail.com
# https://aacable.wordpress.com
# DMASOFTLAB Radius Manager 4.0.4 / 4.1.x Automated Installation Script for Ubuntu 10/12 32bit Edition
# Some CORE installation part have been taken from the Original INSTALL.SH with some In-House Heavy modifications : )
# Last Modified - 11-JAN-2016 , added wget retries for weak internet links
# After UBUNTU / 32bit installation , First configure internet access.
# set -x
# Setting Variables . . . [JZ]
clear
 
# MySQL ROOT Password , Change this variable according to your own setup if required. . . [[ JZ . . . ]]
sqlpass="zaib1234"
 
# For RM & MYSQL . . . [[ JZ . . . ]]
wwwpath="/var/www"
radhost="localhost"
raduser="radius"
myusr_rad="radius"
mypsw_radius="radius123"
myusr_cts="conntrack"
mypsw_cts="conn123"
httpuser="www-data"
rmver40="radiusmanager-4.0.4.tgz"
rmver41="radiusmanager-4.1.0.tgz"
 
osver=`cat /etc/issue |awk '{print $1}'`
 
# RM Installation Package Download URL , Change this variable according to your own setup , if required. . . [[ JZ . . . ]]
#rmurl="http://aacable.rdo.pt/files/rm_related"
rmurl="http://wifismartzone.com/files/rm_related"
 
# Colors Config . . . [[ JZ . . . ]]
ESC_SEQ="\x1b["
COL_RESET=$ESC_SEQ"39;49;00m"
COL_RED=$ESC_SEQ"31;01m"
COL_GREEN=$ESC_SEQ"32;01m"
 
# OS checkup for UBUNTU
echo -e "$COL_GREEN Checking OS version, as it must be Ubuntu in order to Continue . Syed Jahanzaib / aacable@hotmail.com. .$COL_RESET"
if [[ $osver == Ubuntu ]]; then
echo
echo -e "$COL_GREEN Ubuntu is installed with following information fetched. $COL_RESET"
lsb_release -a
sleep 3
else
echo -e "$COL_RED Sorry, it seems your Linux Distribution is not UBUNTU . Exiting ...$COL_RESET"
exit 1
fi
 
# Make sure only root can run our script / Checking if user is root, otherwise exit with error [[Jz]]
echo
echo -e "$COL_GREEN Verifying if you are logged in with root priveleges . . .$COL_RESET" 1>&2
FILE="/tmp/out.$$"
GREP="/bin/grep"
if [ "$(id -u)" != "0" ]; then
echo
echo -e "$COL_RED This script must be run as root, switch to root now . . .$COL_RESET" 1>&2
exit 1
fi
echo -e "$COL_GREEN OK - You are logged in with root ID, Ok to proceed further . . .!! $COL_RESET"
 
# Temporary Folder where all software will be downloaded . . . [[ JZ . . . ]]
temp="temp"
 
# Checking if /temp folder is previously present or not . . .
{
if [ ! -d "/temp" ]; then
echo
echo -e "$COL_RED /temp folder not found, Creating it so all downloads will be placed here . . . $COL_RESET"
mkdir /temp
else
echo
echo -e "$COL_GREEN /temp folder is already present , so no need to create it, Proceeding further . . . $COL_RESET"
echo
fi
}
 
cd /$temp
 
# Clearing Old downloads in /temp to avoid DUPLICATIONS . . .
echo -e "$COL_RED Clearing Old downloads in /temp to avoid DUPLICATIONS . . . $COL_RESET"
 
rm -fr /temp/radiusmanager*.*
rm -fr /temp/freeradius*.*
rm -fr /temp/libltd*.*
rm -fr /temp/ioncube*.*
sleep 5
 
# Checking IF $rmurl is accessible m if YES then continue further , otherwise EXIT the script with ERROR ! [[ JZ .. . .]]
echo
echo -e "$COL_GREEN Checking if $rmurl is accessible in order to proceed further. . .!! $COL_RESET"
cd /temp
wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 0 -q $rmurl/rm4.txt
{
if [ ! -f /temp/rm4.txt ]; then
echo
echo -e "$COL_RED ERROR: Unable to contact $rmurl, or possibly internet is not working or your IP is in black list at destination server !! $COL_RESET"
echo -e "$COL_RED ERROR: Please check manual if $rmurl is accessible or not or if it have required files, JZ !! $COL_RESET"
exit 0
fi
}
rm -fr /temp/rm4.txt
sleep 6
######################
 
clear
 
# Selection choice menu of RM version 4.0 or 4.1
echo -e "$COL_GREEN ########################################### $COL_RESET"
echo -e "$COL_GREEN Select the type of your operating system: $COLRESET"
echo -e "$COL_GREEN Syed Jahanzaib / aacable@hotmail.com $COLRESET"
echo -e "$COL_GREEN ########################################### $COL_RESET"
echo
echo "1. Radius Manager 4.0.4"
echo "2. Radius Manager 4.1.0"
echo
echo -n "Choose an option: [1] "
 
read rmver
if [ -z "$rmver" ]; then
rmver="1"
fi
case $rmver in
1 ) echo "Selected RM version is: 4.0.4 [Old]"
 
# Download radius manager 4.0.4 in $temp folder
echo .
echo -e "$COL_GREEN Downloading RADIUS MANAGER 4.0.4 package from INTERNET . Sleeping for 5 Seconds . . (Press CTRL+C to stop any time) $COL_RESET"
defver="radiusmanager-4.0.4.tgz"
defverdir="radiusmanager-4.0.4"
 
sleep 5
wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 0 $rmurl/$defver
;;
2 ) echo "Selected RM version is: 4.1.0 [Latest]"
echo -e "$COL_GREEN Downloading RADIUS MANAGER 4.1.0 package from INTERNET . Sleeping for 5 Seconds . . (Press CTRL+C to stop any time) $COL_RESET"
defver="radiusmanager-4.1.0.tgz"
defverdir="radiusmanager-4.1.0"
 
echo .
sleep 5
 
# Download radius manager 4.1.0 in $temp folder
wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 0 $rmurl/$defver
;;
* ) echo "Invalid selection. Installation aborted."
echo
exit
;;
esac
 
# Checking IF RM installation file have been downloaded. if YEs continue further , otherwise EXIT the script with ERRO ! [[ JZ .. . .]]
{
if [ ! -f /$temp/$defver ]; then
echo .
echo -e "$COL_RED ERROR: RM Installation File could not be download or found in /$temp/$defver ! $COL_RESET"
exit 0
fi
}
 
# Function to check RM Installation Package SIZE , if its Ok or corrupted (JZ) I will update it later
#SIZE=$(du -sb file.txt | awk '{ print $1 }')
#if ((SIZE<900)); then
# echo "RM File Size not Ok, possibly corrupted";
#else
# echo "RM FILE SIZE OK !";
#exit 0
#fi
 
# Update UBUNTU FIRST . . . [[ JZ . . . ]]
echo
echo
echo -e "$COL_GREEN Updating UBUNTU . Sleeping for 5 Seconds . . (Press CTRL+C to stop any time) $COL_RESET"
sleep 5
apt-get update
 
# Installing required components for RM . . . [[ JZ . . . ]]
 
echo .
echo -e "$COL_GREEN Installing components like MYSQL , PHP etc . Sleeping for 5 Seconds . . (Press CTRL+C to stop any time) $COL_RESET"
sleep 5
 
apt-get -y install mc wget rcconf make gcc mysql-server mysql-client libmysqlclient15-dev libperl-dev curl php5 php5-mysql php5-cli php5-curl php5-mcrypt php5-gd php5-snmp apache2
 
# While installing above components , it may ask for mysql password, use same password as you have used before . . . [[ JZ . . . ]]
 
echo .
echo -e "$COL_GREEN Installing LIB packages . Sleeping for 5 Seconds . . (Press CTRL+C to stop any time) $COL_RESET"
sleep 5
cd /$temp
wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 0 http://www.dmasoftlab.com/cont/download/libltdl3_1.5.24-1ubuntu1_i386.deb
wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 0 http://www.dmasoftlab.com/cont/download/libltdl3-dev_1.5.24-1ubuntu1_i386.deb
dpkg -i libltdl3_1.5.24-1ubuntu1_i386.deb
dpkg -i libltdl3-dev_1.5.24-1ubuntu1_i386.deb
 
# IONCUBE Installation:
# Now Download ioncube library and add it to php . . . [[ JZ . . . ]]
echo .
echo -e "$COL_GREEN Installing IONCUBE . Sleeping for 5 Seconds . . (Press CTRL+C to stop any time) $COL_RESET"
sleep 5
 
wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 0 http://www.dmasoftlab.com/cont/download/ioncube_loaders_lin_x86.tar.gz
 
# Checking if IONCUBE installation file have been downloaded. if YEs continue further , otherwise EXIT the script with ERROR ! [[ JZ .. . .]]
{
if [ ! -f /$temp/ioncube_loaders_lin_x86.tar.gz ]; then
echo .
echo -e "$COL_RED ERROR: COULD NOT DOWNLOAD IONCUBE !!! EXITING . . . $COL_RESET"
exit 0
fi
}
 
tar zxvf ioncube_loaders_lin_x86.tar.gz
mkdir /usr/local/ioncube
cd /$temp/ioncube
cp -fr * /usr/local/ioncube/
 
# Now Add the appropriate ionCube loader to your php.ini . . . [JZ]
echo .
echo -e "$COL_GREEN Adding iONCUBE in PHP . Sleeping for 5 Seconds . . (Press CTRL+C to stop any time) $COL_RESET"
sleep 5
echo "zend_extension=/usr/local/ioncube/ioncube_loader_lin_5.3.so" >> /etc/php5/apache2/php.ini
echo "zend_extension=/usr/local/ioncube/ioncube_loader_lin_5.3.so" >> /etc/php5/cli/php.ini
 
cd /$temp
echo .
echo -e "$COL_GREEN Downloading FREERADiUS 2.2.20-dma-patch-2 package . Sleeping for 5 Seconds . . (Press CTRL+C to stop any time) $COL_RESET"
sleep 5
wget --retry-connrefused --waitretry=1 --read-timeout=20 --timeout=15 -t 0 http://www.dmasoftlab.com/cont/download/freeradius-server-2.2.0-dma-patch-2.tar.gz
 
# Checking if FREERADIUS is downloaded, just to make sure internet is working ,IF NOT, EXIT the script with ERROR ! [[ JZ .. . .]]
{
if [ ! -f /$temp/freeradius-server-2.2.0-dma-patch-2.tar.gz ]; then
echo .
echo -e "$COL_RED ERROR: COULD NOT DOWNLOAD FREERADIUS 2.2.20-dma-patch-2, possible INTERNET is not Working !!! EXITING . . . $COL_RESET"
exit 0
fi
}
 
echo .
echo -e "$COL_GREEN Compiling FREERADIUS . Sleeping for 5 Seconds . . (Press CTRL+C to stop any time) $COL_RESET"
sleep 5
tar zxvf freeradius-server-2.2.0-dma-patch-2.tar.gz
cd freeradius-server-2.2.0/
 
### Now proceed with the compilation of FREERAIDUS , applicable for all
./configure
make
make install
ldconfig
 
# Set the correct ownership on FreeRadius configuration files
chown $httpuser /usr/local/etc/raddb
chown $httpuser /usr/local/etc/raddb/clients.conf
 
# ================================================================
# Creating MySQL databases with MySQL command line tool . . . [JZ]
# ================================================================
# ** FROM CLI ** . . . [JZ]
echo .
echo -e "$COL_GREEN adding RADIUS user & DB in MYSQL . Sleeping for 5 Seconds . . (Press CTRL+C to stop any time) $COL_RESET"
sleep 1
mysql -u root -p$sqlpass -e "create database radius";
mysql -u root -p$sqlpass -e "create database conntrack";
mysql -u root -p$sqlpass -e "CREATE USER '$myusr_rad'@'$radhost' IDENTIFIED BY '$mypsw_radius';"
mysql -u root -p$sqlpass -e "CREATE USER '$myusr_cts'@'$radhost' IDENTIFIED BY '$mypsw_cts';"
mysql -u root -p$sqlpass -e "GRANT ALL ON radius.* TO radius@$radhost;"
mysql -u root -p$sqlpass -e "GRANT ALL ON conntrack.* TO conntrack@$radhost;"
 
# Time to Install RADIUS MANAGER 4.x.x . . . [JZ]
# ===============================================
 
cd /$temp
tar zxvf $defver
cd /$temp/$defverdir
echo .
echo -e "$COL_GREEN Starting RADIUS MANAGER install script install.sh . Sleeping for 5 Seconds . . (Press CTRL+C to stop any time) $COL_RESET"
sleep 5
 
echo "Radius Manager installer $defver for Ubuntu ONLY ****" [ JZ ]
echo "Copyright 2004-2012, DMA Softlab LLC"
echo "All right reserved."
echo
echo .
echo -e "$COL_GREEN (Use CTRL+C to abort any time) . Sleeping for 5 Seconds . . (Press CTRL+C to stop any time) $COL_RESET"
sleep 5
 
# copy web content
 
echo Copying Radius Manager WEB content to $wwwpath/radiusmanager
cp -fr www/radiusmanager $wwwpath
 
# rename .dist files
 
# Zaib / copy paypal cfg file so that user.php may not be missed
mv $wwwpath/radiusmanager/config/payfast_cfg.php.dist $wwwpath/radiusmanager/config/payfast_cfg.php
mv $wwwpath/radiusmanager/config/paypal_cfg.php.dist $wwwpath/radiusmanager/config/paypal_cfg.php
mv $wwwpath/radiusmanager/config/netcash_cfg.php.dist $wwwpath/radiusmanager/config/netcash_cfg.php
mv $wwwpath/radiusmanager/config/authorizenet_cfg.php.dist $wwwpath/radiusmanager/config/authorizenet_cfg.php
mv $wwwpath/radiusmanager/config/dps_cfg.php.dist $wwwpath/radiusmanager/config/dps_cfg.php
mv $wwwpath/radiusmanager/config/2co_cfg.php.dist $wwwpath/radiusmanager/config/2co_cfg.php
 
# set ownership and permissions
 
chown $httpuser $wwwpath/radiusmanager/config
chown $httpuser $wwwpath/radiusmanager/config/system_cfg.php
chown $httpuser $wwwpath/radiusmanager/config/paypal_cfg.php
chown $httpuser $wwwpath/radiusmanager/config/netcash_cfg.php
chown $httpuser $wwwpath/radiusmanager/config/authorizenet_cfg.php
chown $httpuser $wwwpath/radiusmanager/config/dps_cfg.php
chown $httpuser $wwwpath/radiusmanager/config/2co_cfg.php
#chown $httpuser $wwwpath/radiusmanager/tmpimages
chown $httpuser $wwwpath/radiusmanager/tftpboot
chmod 600 $wwwpath/radiusmanager/config/system_cfg.php
chmod 600 $wwwpath/radiusmanager/config/paypal_cfg.php
chmod 600 $wwwpath/radiusmanager/config/netcash_cfg.php
chmod 600 $wwwpath/radiusmanager/config/authorizenet_cfg.php
chmod 600 $wwwpath/radiusmanager/config/dps_cfg.php
chmod 600 $wwwpath/radiusmanager/config/2co_cfg.php
chmod 644 $wwwpath/radiusmanager/config/docsis_keyfile
chmod 644 $wwwpath/radiusmanager/config/docsis_template
 
# Adding tmpimage folder for CAPTCHA images (Zaib)
mkdir /var/www/radiusmanager/tmpimages
chown $httpuser $wwwpath/radiusmanager/tmpimages
 
# chmod and copy binaries
 
echo "Copying binaries to /usr/local/bin"
chmod 755 bin/rm*
cp -fr bin/rm* /usr/local/bin
 
echo "Copying rootexec to /usr/local/sbin"
cp -fr bin/rootexec /usr/local/sbin
chmod 4755 /usr/local/sbin/rootexec
 
# chmod and copy radiusmanager.cfg
 
echo "Copying radiusmanager.cfg to /etc"
cp -fr etc/radiusmanager.cfg /etc
chown root /etc/radiusmanager.cfg
chmod 600 /etc/radiusmanager.cfg
 
# create or upgrade tables
 
echo "Creating MySQL tables"
mysql -h $radhost -u $myusr_rad -p$mypsw_radius radius < sql/radius.sql
mysql -h $radhost -u $myusr_cts -p$mypsw_cts conntrack < sql/conntrack.sql
 
# create rmpoller service
 
echo "Enabling rmpoller service at boot time"
cp -fr rc.d/rmpoller /etc/init.d
chown root.root /etc/init.d/rmpoller
chmod 755 /etc/init.d/rmpoller
update-rc.d rmpoller defaults 99
 
# create rmconntrack service
 
echo "Enabling rmconntrack service at boot time"
cp -fr rc.d/rmconntrack /etc/init.d
chown root.root /etc/init.d/rmconntrack
chmod 755 /etc/init.d/rmconntrack
update-rc.d rmconntrack defaults 99
 
# copy radiusd init script
 
echo "Enabling radiusd service at boot time"
chmod 755 rc.d/debian/radiusd
cp -fr rc.d/debian/radiusd /etc/init.d
update-rc.d radiusd defaults 99
 
# copy logrotate script
 
echo "Copying logrotate script"
cp -fr etc/logrotate.d/radiusd /etc/logrotate.d/radiusd
 
# copy cron job script
 
echo "Copying cronjob script"
cp -fr etc/cron/radiusmanager /etc/cron.d/radiusmanager
chmod 644 /etc/cron.d/radiusmanager
 
# comment out the old style cron job
 
sed -i 's/02\ 0\ \*\ \*\ \*\ root\ \/usr\/bin\/php/#2\ 0\ \*\ \*\ \*\ root\ \/usr\/bin\/php/g' /etc/crontab
 
# replace strings in cfg files for Debian
echo .
echo -e "$COL_GREEN Setting Debina base WWW dir in configuration files . . .!$COL_RESET"
sed -i 's/var\/lib\/mysql\/mysql.sock/var\/run\/mysqld\/mysqld.sock/g' /etc/radiusmanager.cfg
sed -i 's/var\/www\/html/var\/www/g' /etc/radiusmanager.cfg
sed -i 's/var\/www\/html/var\/www/g' /etc/cron.d/radiusmanager
sed -i 's/var\/www\/html/var\/www/g' /var/www/radiusmanager/config/system_cfg.php
 
# set permission on raddb files
 
echo "Setting permission on raddb files"
chown $httpuser /usr/local/etc/raddb
chown $httpuser /usr/local/etc/raddb/clients.conf
 
echo
echo .
echo -e "$COL_GREEN Radius manager Installation complete!$COL_RESET"
echo
 
# Now copy the two license files (that you receive from DMASOFTLAB) in /var/www/radiusmanager . . . [JZ]
cp -fr lic.txt /var/www/radiusmanager/
cp -fr mod.txt /var/www/radiusmanager/
 
echo .
echo .
echo -e "$COL_GREEN Re-Starting Apache2, Radius and mySQL Service$COL_RESET"
echo .
service radiusd start
service apache2 restart
service mysql restart
echo .
echo .
echo .
echo .
echo .
echo -e "$COL_GREEN All Done. Please access ADMIN panel via http://yourip/radiusmanager/admin.php $COL_RESET"
echo -e "$COL_GREEN RM Installation script by SYED JAHANZAIB / aacable@hotmail.com $COL_RESET"

 

Save & Exit …





 

 

Now execute the script by

/rm-ubuntu-32bit.sh


 

After the script ends, do make sure that you don’t see any frequent Error’s  on the installation. Thats why I have added 5 Seconds delay in each section so you can view the results.

Now UPLOAD your valid License into /var/www/radiusmanager

.

Then try to access RM ACP via browser by

http://yourip/radiusmanager/admin.php

.

If you get blank page, then use tail command to view Apache error log , example

tail -f /var/log/apache2/error.log

.

OR more specifically

tail -f /var/log/apache2/error.log |grep lic

.

If you see any error like showed in the image below . . . (for not valid license), then make sure your license files are valid for right version and with the right mac address interface.

.

rm-lic-error


 

To deploy Radius Manager Patch 5 (4.1.5) , Kindly see the following Link

https://aacable.wordpress.com/2014/02/28/radius-manager-4-1-patch5-deployment/

I will add few snapshots and video as soon as I get some time.

 


 

Regard’s
Syed Jahanzaib

70 Comments »

  1. Very good work SYED, you did it 🙂

    Comment by Rui Oliveira — January 4, 2014 @ 2:51 AM

  2. …..Since DMA don’t have any official support forum (except for there email support) …
    Agree totally,

    It would make more sense to have actual usage examples available,

    Also cannot understand why all postpaid monthly accounts use the same start date, this results in users who have their speeds reduced by exceeding their bandwidth allowance reverting to full band bandwidth again and causing un-necessary network load, when their renewal should be offset to different monthly dates, current postpaid option results in network speed improving during the month as these users speeds are reduced………………..

    Comment by James — January 4, 2014 @ 2:54 AM

  3. Hello ubuntu 13.04 install errors
    tail -f /var/log/apache2/error.log
    [Sat Jan 04 03:19:41 2014] [notice] Graceful restart requested, doing restart
    [Sat Jan 04 03:19:41 2014] [notice] Apache/2.2.22 (Ubuntu) PHP/5.4.9-4ubuntu2.4 configured — resuming normal operations
    [Sat Jan 04 03:23:21 2014] [notice] caught SIGTERM, shutting down
    [Sat Jan 04 03:23:22 2014] [notice] Apache/2.2.22 (Ubuntu) PHP/5.4.9-4ubuntu2.4 configured — resuming normal operations
    [Sat Jan 04 03:24:46 2014] [error] [client 172.16.10.6] File does not exist: /var/www/favicon.ico
    Failed loading /usr/local/ioncube/ioncube_loader_lin_5.3.so: /usr/local/ioncube/ioncube_loader_lin_5.3.so: undefined symbol: php_body_write
    Failed loading /usr/local/ioncube/ioncube_loader_lin_5.3.so: /usr/local/ioncube/ioncube_loader_lin_5.3.so: undefined symbol: php_body_write
    Failed loading /usr/local/ioncube/ioncube_loader_lin_5.3.so: /usr/local/ioncube/ioncube_loader_lin_5.3.so: undefined symbol: php_body_write
    Failed loading /usr/local/ioncube/ioncube_loader_lin_5.3.so: /usr/local/ioncube/ioncube_loader_lin_5.3.so: undefined symbol: php_body_write
    [Sat Jan 04 03:25:16 2014] [error] [client 172.16.10.6] Negotiation: discovered file(s) matching request: /var/www/radiusmanager/admin (None could be negotiated).

    Comment by amed — January 4, 2014 @ 1:27 PM

  4. Ubuntu 12.04
    tail -f /var/log/apache2/error.log
    [Sat Jan 04 04:29:02 2014] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch configured — resuming normal operations
    [Sat Jan 04 04:32:49 2014] [notice] caught SIGTERM, shutting down
    [Sat Jan 04 04:32:50 2014] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch configured — resuming normal operations
    [Sat Jan 04 04:35:25 2014] [error] [client 172.16.10.6] PHP Fatal error: \nThe encoded file /var/www/radiusmanager/admin.php\nrequires a license file lic.txt.\n in Unknown on line 0
    [Sat Jan 04 04:35:28 2014] [error] [client 172.16.10.6] PHP Fatal error: \nThe encoded file /var/www/radiusmanager/admin.php\nrequires a license file lic.txt.\n in Unknown on line 0
    [Sat Jan 04 04:36:36 2014] [notice] caught SIGTERM, shutting down
    [Sat Jan 04 04:36:37 2014] [notice] Apache/2.2.22 (Ubuntu) PHP/5.3.10-1ubuntu3.9 with Suhosin-Patch configured — resuming normal operations
    [Sat Jan 04 04:36:53 2014] [error] [client 172.16.10.6] PHP Fatal error: \nThe encoded file /var/www/radiusmanager/admin.php\nrequires a license file lic.txt.\n in Unknown on line 0, referer: http://192.168.101.42/radiusmanager/
    [Sat Jan 04 04:36:59 2014] [error] [client 172.16.10.6] PHP Fatal error: \nThe encoded file /var/www/radiusmanager/admin.php\nrequires a license file lic.txt.\n in Unknown on line 0
    [Sat Jan 04 04:39:04 2014] [error] [client 172.16.10.6] PHP Fatal error: \nThe encoded file /var/www/radiusmanager/admin.php\nrequires a license file lic.txt.\n in Unknown on line 0

    Comment by amed — January 4, 2014 @ 2:45 PM

    • Did you read the REQUIREMENTS section?
      if not, its time to read them again. as it clearly says that you must have valid license from DMA before proceeding.

      Comment by Syed Jahanzaib / Pinochio~:) — January 4, 2014 @ 6:33 PM

      • Dear Sir. I have the same error although i uploaded license file to var/www/radiusmanager ( lic.txt and mod.txt ) . May be uper-case and lower-case problem in MAC-ADDRESS ? i sent DMA support lower-case but they sent me upper-case

        Comment by Son Tran — October 13, 2014 @ 4:29 AM

      • there is no difference for small or capitals in mac address, both are treated same. probably wrong mac address you have supplied or license is invalid. what exact error you are getting?

        Comment by Syed Jahanzaib / Pinochio~:) — October 13, 2014 @ 8:24 AM

    • dear sir 5.20 ka dns ip bta dain plz

      Comment by Sahil Gee — January 29, 2014 @ 10:46 PM

  5. Hi Syed;

    Ubuntu is available only for the script. CentOS version is also available?

    Thank You

    Comment by Zeki SANLI — January 6, 2014 @ 1:40 AM

    • It is currently made for Ubuntu , but we can add the Centos option too 🙂
      Since I dont have CENTOS available at my site, I cant do experiments on it, I will add it later.

      Comment by Syed Jahanzaib / Pinochio~:) — January 6, 2014 @ 8:16 AM

  6. sir radius manager licence pls

    Comment by ramanji — January 7, 2014 @ 3:24 AM

  7. […]  https://aacable.wordpress.com/2012/11/30/dmasoftlab-radius-manager-install-backup-restore-short-reference-guide/ https://aacable.wordpress.com/2014/01/04/automated-installation-script-for-radius-manager-v-4-0-44-1-&#8230; […]

    Pingback by DMASOFTLAB Radius Manager Backup Script ! | Syed Jahanzaib Personnel Blog to Share Knowledge ! — January 10, 2014 @ 2:15 PM

  8. You did a great job bro SYED. I have one questions if i install a clean ubuntu 12.04.3 and run your scripts, can i restore (i know the procedure of restore) a full backup that was taken from Centos. Will it work?

    Comment by Fatmir Sefa — January 21, 2014 @ 3:36 PM

    • CENTOS have different folder structure.
      just change the /var/www/ to /var/www/html (for centos) in config files.

      Comment by Syed Jahanzaib / Pinochio~:) — January 22, 2014 @ 8:04 AM

      • Dear, I’ve a problem after I backup RM (from ubuntu 12.04.3) and restore to the new clean install machine (ubuntu 12.04.3). Sometimes when a user disconnects from pppoe-server and when it try to reconnect it fails until i close the session in radius for that user.

        when ps aux in linux I see this: root 8782 0.0 0.0 13760 1212 ? S 11:51 0:00 /usr/local/bin/rmacnt update 4af2e7ab7bd097a3 “0” “1950957895” “0” “196502574” root 8783 0.0 0.0 13760 1208 ? S 11:51 0:00 /usr/local/bin/rmacnt update f07ba9469afde332 “0” “115522158” “0” “12610657” root 8786 0.0 0.0 13760 1208 ? S 11:51 0:00 /usr/local/bin/rmacnt update c0fb8305a1c6198f “0” “215591321” “0” “31414723” and many more similar lines

        Any idea ?

        On Wed, Jan 22, 2014 at 4:04 AM, Syed Jahanzaib Personnel Blog to Share Knowledge ! wrote:

        > Syed Jahanzaib / Pinochio~:) commented: “CENTOS have different folder > structure. just change the /var/www/ to /var/www/html (for centos) in > config files.”

        Comment by Fatmir Sefa — January 23, 2014 @ 3:52 PM

  9. Syed, Te felicito y agradezco por tu excelente trabajo. Una duda, cuales serían los cambios para / 64. Gracias bro

    Comment by Enrique — February 5, 2014 @ 7:37 PM

  10. Any chance of a CentOS 64bit script? You have an awesome blog… Thank you

    Comment by Riaan — March 23, 2014 @ 3:08 PM

  11. Thakyou Zaib Bhai , We Already did it and corrected your automated script to install DMA =D , and fully configured .

    Comment by Abubaker SIddiq Lasania — April 4, 2014 @ 1:00 AM

  12. Dear sir I just want to know if you can upload your lic text and mod text after installation is done and how to do it please.Your work is very great and I think it’s time to write your own radiusmanager software.You are GREAT

    Comment by Lascel — May 3, 2014 @ 12:34 AM

  13. bro, tell me could u configure my RM server centralized and DMZ along with some extended services like, mails n sms to users.
    and if any services charges or any other charges, plz reply me to pavankatepalli1905@live.com

    Comment by Pavan — May 10, 2014 @ 8:40 PM

  14. Hi sir, i get this error when trying to access http:/myip/radiusmanager/admin.php

    Apache/2.4.7 (Ubuntu) Server at 192.168.1.48 Port 80

    Can you guide me on this problem?

    Thank you.

    Comment by Naz — June 27, 2014 @ 6:39 AM

  15. Hi again, sorry i’m using ubuntu 14.0.4 32bit, is this script works for ver 14.04 too?

    Thank you.

    Comment by Naz — June 27, 2014 @ 9:05 AM

  16. i try to run script by bash rm-ubuntu-32bit.sh i get some errors

    root@system:/temp# bash rm-ubuntu-32bit.sh
    rm-ubuntu-32bit.sh: line 8: $’clear\r’: command not found
    rm-ubuntu-32bit.sh: line 9: $’\r’: command not found
    rm-ubuntu-32bit.sh: line 12: $’\r’: command not found
    rm-ubuntu-32bit.sh: line 24: $’\r’: command not found
    rm-ubuntu-32bit.sh: line 26: $’\r’: command not found
    rm-ubuntu-32bit.sh: line 30: $’\r’: command not found
    rm-ubuntu-32bit.sh: line 36: $’\r’: command not found
    Checking OS version, as it must be Ubuntu in order to Continue . . .
    rm-ubuntu-32bit.sh: line 121: syntax error near unexpected token `$’in\r”
    rm-ubuntu-32bit.sh: line 121: `case $rmver in
    root@system:/temp#

    any help

    Comment by Ahmed Adel — July 25, 2014 @ 5:21 AM

  17. second question is RM 4.0.4 work with freeradius 2.2.0 ?

    Comment by Ahmed Adel — July 25, 2014 @ 5:24 AM

  18. Asssalam Alaikum sir i have radius manager lic.txt and mode.txt. but dont hav it mac address. any solution to how i know this license assingned to what mac address.? so i can change my mac add to that.

    Comment by rehan — August 11, 2014 @ 5:26 PM

  19. no i dont hav legal license thats y m asking that.

    Comment by rehan — August 14, 2014 @ 7:50 PM

  20. when i install radiusmanager 4.0.4 i have this error when i want to connect to the radius ACP
    “Could not connect to localhost”

    Comment by lex — November 10, 2014 @ 4:15 PM

    • “Could not connect to localhost” means either mysql service is not started, or you may have wrong passwords in radius maanger cfg files and mysql.

      Comment by Syed Jahanzaib / Pinochio~:) — November 12, 2014 @ 10:35 AM

  21. Dear brother,,

    I followed all your steps. When i hit URL it is displaying white page…

    whats my mistake…

    Comment by Satish — November 28, 2014 @ 5:06 PM

    • Sorry brother i was my mistake. I again configured in another server i got page but i was unable to start radius server and DHCP server.

      Please help me…

      Comment by Satish — November 28, 2014 @ 7:12 PM

  22. hi, how can create a Valid License

    Comment by khaled — December 29, 2014 @ 11:17 AM

  23. getting blank page while accessing, http://mywanip/radiusmanager/admin.php

    and when check the error log of php, below mentioned line i am getting

    PHP Fatal error: Call to undefined function [obfuscated]() in /var/www/html/radiusmanager/misc.php on line 0

    Comment by WinuxAdmin — January 14, 2015 @ 3:34 PM

    • Hello, on one server error message its same. CentOS 6.5 /64.

      Comment by Mensur — January 28, 2015 @ 1:17 PM

      • cant say for 64bit, I made the script only for the Ubuntu 32bit version (ubuntu like ver 10 or preferably 12.4 32bit)

        Comment by Syed Jahanzaib / Pinochio~:) — January 28, 2015 @ 3:07 PM

  24. I am getting the same error. Any help?

    Comment by Leslie — January 27, 2015 @ 8:34 AM

    • Can you provide more details on your problem? what OS/architecture you are using ? can you provide output from apache error.log and access.lgo both ?

      Comment by Syed Jahanzaib / Pinochio~:) — January 27, 2015 @ 8:40 AM

      • Hello, I have same problem. Blank page(admin panel) after installation. I am using CentOS 6.6(64 bit). Log on my server ( PHP Fatal error: \nThe encoded file /var/www/html/radiusmanager/admin.php\nrequires a license file lic.txt.\n in Unknown on line 0), any idea?

        Comment by Mensur — January 27, 2015 @ 1:08 PM

      • You need to upload the valid license for the specific MAC address of your interface. You have to buy it from the DMASOFTLAB, then upload the license files to radiusmanager folder, then admin panel will open properly, otherwise you will see it blank. its a PAID software bro. or get crack one 😉

        Comment by Syed Jahanzaib / Pinochio~:) — January 27, 2015 @ 1:34 PM

  25. HI there, My OS verion is follow

    Distributor ID: CentOS 2.6.32-504.3.3.el6.x86_64
    Description: CentOS release 6.6 (Final)
    Release: 6.6
    Codename: Final

    PHP Version:
    [root@localhost ~]# php -v
    PHP 5.3.3 (cli) (built: Oct 30 2014 20:12:53)
    Copyright (c) 1997-2010 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies
    with the ionCube PHP Loader v4.2.2, Copyright (c) 2002-2012, by ionCube Ltd.

    Radius Manager 4.1 is installed but when I tried to login I see only white page:

    Bellow is error I get:
    [root@localhost ~]# tail -f /var/log/httpd/error_log
    [Tue Jan 27 15:13:59 2015] [error] [client ::1] PHP Notice: Undefined index: _lang in /var/www/html/radiusmanager/misc.php on line 0, referer: http://localhost/radiusmanager/admin.php
    [Tue Jan 27 15:13:59 2015] [error] [client ::1] PHP Notice: Undefined index: _lang in /var/www/html/radiusmanager/misc.php on line 0, referer: http://localhost/radiusmanager/admin.php
    [Tue Jan 27 15:13:59 2015] [error] [client ::1] PHP Notice: Undefined index: _lang in /var/www/html/radiusmanager/misc.php on line 0, referer: http://localhost/radiusmanager/admin.php
    [Tue Jan 27 15:13:59 2015] [error] [client ::1] PHP Notice: Undefined index: _lang in /var/www/html/radiusmanager/misc.php on line 0, referer: http://localhost/radiusmanager/admin.php
    [Tue Jan 27 15:13:59 2015] [error] [client ::1] PHP Notice: Undefined index: cont in /var/www/html/radiusmanager/admin.php on line 0
    [Tue Jan 27 15:13:59 2015] [error] [client ::1] PHP Notice: Undefined index: _lang in /var/www/html/radiusmanager/misc.php on line 0
    [Tue Jan 27 15:13:59 2015] [error] [client ::1] PHP Notice: Undefined index: cont in /var/www/html/radiusmanager/admin.php on line 0
    [Tue Jan 27 15:13:59 2015] [error] [client ::1] PHP Notice: Undefined index: nomaintpl in /var/www/html/radiusmanager/admin.php on line 0
    [Tue Jan 27 15:13:59 2015] [error] [client ::1] PHP Notice: Undefined index: cont in /var/www/html/radiusmanager/admin.php on line 0
    [Tue Jan 27 15:13:59 2015] [error] [client ::1] PHP Fatal error: Call to undefined function [obfuscated]() in /var/www/html/radiusmanager/misc.php on line 0

    Have you had cases like this, is it PHP version problem or something else?

    Thanks in advance for your assistance and help!

    Comment by Beny — January 27, 2015 @ 7:16 PM

    • This script will not work your CENTOS 64bit, you have to use ubuntu 12.4 32bit in order to successfully using this script

      Comment by Syed Jahanzaib / Pinochio~:) — January 28, 2015 @ 3:09 PM

  26. License is valid and paid and is CS level (license is old 5 years).

    Comment by Mensur — January 27, 2015 @ 7:48 PM

  27. i dont no dis servar

    Comment by zafer — April 21, 2015 @ 9:49 AM

  28. Any solution on PHP Fatal error: Call to undefined function [obfuscated]() in /var/www/html/radiusmanager/misc.php on line 0, referer: http://196.201.231.226/radiusmanager/admin.php?cont=login

    Comment by matt — April 29, 2015 @ 12:37 PM

  29. How to create search database on RM. to find users created on RM.

    Comment by kalyan — July 13, 2015 @ 3:52 PM

  30. Assalam Alikum
    i want to know if this script can work on centos 5.3 – 32bit ? as i have same system running RADIUS MANAGER 3 !!

    Comment by Tahir — September 19, 2015 @ 5:22 AM

  31. today scrip not work

    Comment by ahmed elemam — November 28, 2015 @ 7:22 PM

  32. asslam aleykom
    i have ubuntu 12.04 setup radiusmanager dma
    after finish all I have blank page
    in tail -f /var/log/apache2/error.log
    i have this problem
    PHP Parse error: syntax error, unexpected T_STRING in /var/www/radiusmanager/config/system_cfg.php on line 8

    Comment by ismaeel mustafa — March 10, 2016 @ 3:14 AM

  33. Thanks for the share
    Please I am using ubuntu 10.04 and I get this error anytime I restart the server and also get blank page.
    to make it work, I have to do restart service apache2 before it will work.
    Please help me

    [Sat Jun 04 22:25:41 2016] [notice] caught SIGTERM, shutting down
    [Sat Jun 04 22:25:42 2016] [notice] Apache/2.2.14 (Ubuntu) PHP/5.3.2-1ubuntu4.30 with Suhosin-Patch configured — resuming normal operations
    [Sat Jun 04 22:49:17 2016] [error] [client 192.168.1.102] PHP Notice: Undefined index: _lang in /var/www/radiusmanager/misc.php on line 0
    [Sat Jun 04 22:49:17 2016] [error] [client 192.168.1.102] PHP Notice: Undefined index: _lang in /var/www/radiusmanager/misc.php on line 0
    [Sat Jun 04 22:49:17 2016] [error] [client 192.168.1.102] PHP Notice: Undefined index: _lang in /var/www/radiusmanager/misc.php on line 0
    [Sat Jun 04 22:49:17 2016] [error] [client 192.168.1.102] PHP Notice: Undefined index: _lang in /var/www/radiusmanager/misc.php on line 0
    [Sat Jun 04 22:49:17 2016] [error] [client 192.168.1.102] PHP Notice: Undefined index: _lang in /var/www/radiusmanager/misc.php on line 0

    Thank you

    Comment by RichK — June 5, 2016 @ 4:05 AM

  34. Great share

    Please i have requested for a trial license from dmasoftlab but i always get this error when i reboot the server.

    Mon Jun 06 11:30:47 2016] [error] [client 192.168.5.1] PHP Fatal error: \nThe license file /var/www/radiusmanager/lic.txt\nfor /var/www/radiusmanager/admin.php\nis not valid for this server.\n in Unknown on line 0

    But it works perfect when i use #service apache2 restart command.

    Please what could be the problem

    Thank you

    Comment by RichK — June 6, 2016 @ 8:43 PM

    • you can simply add a script that can run the script on reboot to restart the apache2 service. or add it in rc.local

      Comment by Syed Jahanzaib / Pinochio~:) — June 7, 2016 @ 9:46 AM

      • please how do i do that because am new to linux

        I really appreciate your reply and effort
        May Allah bless you

        Comment by RichK — June 7, 2016 @ 11:40 PM

  35. Great share

    Please I have requested for a trial license from dmasoftlab but get this error anytime i reboot the server

    [Mon Jun 06 11:45:24 2016] [error] [client 192.168.5.10] PHP Fatal error: \nThe license file /var/www/radiusmanager/lic.txt\nfor /var/www/radiusmanager/admin.php\nis not valid for this server.\n in Unknown on line 0

    But it works perfect when I apply #service apache2 restart command.

    Please what could be the problem. thank you

    Comment by RichK — June 6, 2016 @ 8:55 PM

  36. A.O.A sir i need help kindly tell me i want to install it on centos and redhat base system so what are the steps of installation i’ll be highly thanks full to you.

    Comment by alishanrock66 — June 7, 2016 @ 12:53 PM

  37. Did anyone ever find a solution for this error? everyone is ignoring it?!

    PHP Fatal error: Call to undefined function [obfuscated]() in /var/www/html/radiusmanager/misc.php on line 0

    Comment by Martin Ndeto — December 31, 2016 @ 1:22 PM

  38. Did anyone ever find a solution for this? No one seems to be answering

    PHP Fatal error: Call to undefined function [obfuscated]() in /var/www/html/radiusmanager/misc.php on line 0

    Comment by Martin Ndeto — December 31, 2016 @ 1:23 PM


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: