ABillS
ABillS (AsmodeuS Billing System) is a mature, open-source ISP billing and subscriber-management platform for dialup, PPPoE/PPTP/L2TP, hotspot, VoIP and IPTV services, built around Perl, MySQL, and FreeRADIUS.
1Two official install paths exist
ABillS also ships an official automated installer (AInstall) that detects your OS and installs MySQL, Apache, and FreeRADIUS for you in one run. This guide covers the full manual install instead, since it's the one that actually shows every component being set up.
wget https://github.com/nabat/AInstall/archive/master.tar.gztar xvf master.tar.gzcd AInstall-master && ./install.shIf you'd rather not run every step by hand below, use this instead and skip to the login step at the end.
2Install prerequisites and add the Percona MySQL repository
ABillS' own docs specifically use Percona Server 5.7, not stock MySQL/MariaDB.
sudo apt install curl gnupg2 -ycd /tmpwget https://repo.percona.com/apt/percona-release_latest.$(lsb_release -sc)_all.debsudo dpkg -i percona-release_latest.$(lsb_release -sc)_all.debsudo apt update3Install MySQL, Apache, and required libraries
sudo apt-get install -yq percona-server-server-5.7 percona-server-client-5.7 libmysqlclient-dev apache2 apache2-utils libexpat1 ssl-cert4Download and configure ABillS
cd /usrwget https://sourceforge.net/projects/abills/files/abills/0.92/abills-0.92.05.tgzsudo tar zxvf abills-0.92.05.tgzsudo cp /usr/abills/libexec/config.pl.default /usr/abills/libexec/config.plCheck SourceForge for the current release number before downloading — 0.92.05 may be outdated by the time you read this. Edit config.pl afterward with your database credentials, admin email, domain, and a unique secret key.
5Create log directories and set permissions
sudo mkdir -p /var/log/httpd/sudo mkdir -p /usr/abills/var/logsudo touch /usr/abills/var/log/abills.logsudo chown -Rf www-data:www-data /usr/abills/cgi-binsudo chown -Rf www-data:www-data /usr/abills/Abills/templatessudo chown -Rf www-data:www-data /usr/abills/backupsudo touch /usr/abills/var/log/sql_errorssudo chown nobody /usr/abills/var/log/sql_errorssudo chmod 666 /usr/abills/var/log/sql_errors6Configure Apache
sudo cp /usr/abills/misc/apache/abills_httpd.conf /etc/apache2/sites-enabled/sudo /usr/abills/misc/certs_create.sh apachesudo a2enmod sslsudo a2enmod rewritesudo a2enmod suexecsudo a2enmod includesudo a2enmod cgisudo /etc/init.d/apache2 restart7Create the database and import the schema
sudo mysql --default-character-set=utf8 -u root -pInside the MySQL prompt: GRANT ALL ON abills.* TO `abills`@localhost IDENTIFIED BY "sqlpassword"; CREATE DATABASE abills DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci; quit; Then import the schema: mysql --default-character-set=utf8 -u root -p -D abills < /usr/abills/db/abills.sql
8Install required Perl modules
cd /usr/abills/misc/ && sudo perl perldeps.pl apt-get -batchsudo apt-get install -yq cpanminus aptitudeThe perldeps.pl script reports any modules it couldn't install automatically — install those individually with 'cpanm <ModuleName>'.
9Compile FreeRADIUS from source
ABillS' own FreeRADIUS integration config targets a source build, not the distro's freeradius package.
sudo aptitude install libmysqlclient-dev libgdbm-dev make gcc libtalloc-dev libperl-dev libhiredis-devcd /tmpwget ftp://ftp.freeradius.org/pub/freeradius/freeradius-server-3.0.25.tar.gztar zxvf freeradius-server-3.0.25.tar.gzcd freeradius-server-3.0.25./configure --prefix=/usr/local/freeradius --with-rlm-perl-lib-dir=/usr/lib/x86_64-linux-gnu/ --with-dhcp=yes --with-openssl=nomake && sudo make installsudo ln -s /usr/local/freeradius/bin/* /usr/bin/sudo ln -s /usr/local/freeradius/sbin/* /usr/sbin/Check freeradius.org for the current 3.0.x release before downloading — 3.0.25 may be outdated by the time you read this.
10Install ABillS' own FreeRADIUS configuration
This replaces the compiled default config with ABillS' matching sites/modules, and creates the freerad system user FreeRADIUS runs as.
sudo rm /usr/local/freeradius/etc/raddb/sites-enabled/*sudo cp /usr/abills/misc/freeradius/v3/mods-enabled/perl /usr/local/freeradius/etc/raddb/mods-enabled/perlsudo cp /usr/abills/misc/freeradius/v3/mods-enabled/sql /usr/local/freeradius/etc/raddb/mods-enabled/sqlsudo cp /usr/abills/misc/freeradius/v3/sites-enabled/abills_default /usr/local/freeradius/etc/raddb/sites-enabled/abills_defaultsudo cp /usr/abills/misc/freeradius/v3/sites-enabled/control-socket /usr/local/freeradius/etc/raddb/sites-enabled/control-socketsudo cp /usr/abills/misc/freeradius/v3/users /usr/local/freeradius/etc/raddb/usersecho '' | sudo tee /usr/local/freeradius/etc/raddb/clients.confsudo groupadd freeradsudo useradd -g freerad -s /bin/bash freeradsudo chown -R freerad:freerad /usr/local/freeradius/etc/raddbsudo mkdir /var/run/radiusd/sudo chown -R freerad:freerad /var/run/radiusd/Edit /usr/local/freeradius/etc/raddb/mods-enabled/sql with the same database credentials you set in config.pl.
11Start FreeRADIUS
Run this first in debug mode to confirm it starts cleanly against your database, then stop it (Ctrl+C) and start it as a normal background service.
sudo radiusd -XABillS' docs describe creating an /etc/init.d/radiusd autostart script, then: chmod +x /etc/init.d/radiusd; update-rc.d radiusd defaults; update-rc.d radiusd enable; service radiusd start
12Add the billing cron jobs
ABillS relies entirely on cron for billing runs and periodic maintenance — nothing charges customers or expires accounts without these.
sudo touch /usr/abills/var/log/sql_errors && sudo chmod 666 /usr/abills/var/log/sql_errorsAdd to /etc/crontab: */5 * * * * root /usr/abills/libexec/billd -all 1 0 * * * root /usr/abills/libexec/periodic daily 1 1 * * * root /usr/abills/libexec/periodic monthly
13Log in
ABillS serves its admin and subscriber-facing interfaces on a dedicated HTTPS port.
Admin panel: https://your-server:9443/admin/ (default login abills / abills) — Subscriber portal: https://your-server:9443/ — change the default admin password immediately.