Downloading and installing Access Manager is a quite easy process. Since Access Manager is a PHP/HTML based program, we'll require a Linux machine with a webserver (apache2), PHP5 and MySQL Server installed. We'll be using Ubuntu Server for this installation. And in this tutorial, we presume you have a fresh installation of Ubuntu server (14.04) with atleast one network interface configured with IP Address 192.168.1.10 and is reachable over your local network. And Internet is reachable from this machine.
If you want to divide the load on multiple nodes, by installing MySQL Server on another linux machine, you can easily do that. But, for the sake of simplicity, in this document we'll be installing all of them on one single machine only.
Easiest way to install packages on a linux machine is using package repository. i.e. apt-get for debian/ubuntu and yum for Radhat family. Login to your linux machine and issue following commands:
Just follow the on screen instruction and proceed with the installation. It may take a few seconds to few minutes depending on speed of your internet connection. During the Installation you'll be asked to set root password for MySQL Server. In this tutorial we set it to '123456'. But on a production server we strongly recommend setting a strong password.
Access Manager utilizes apache's mod_rewrite module and .htaccess files for short & easily readable URLs. By default both of these are disabled. Let's enable them.
Enabling mod_rewrite on Ubuntu Server is as easy as issuing following command.
Issue following command to enable mcrypt extension.
To enable .htaccess support we need to modify virtual server's configuration file. Since we're using default server in this tutorial, open default virtual server's config file /etc/apache2/sites-enabled/000-default.conf. and add following code block somewhere with-in <VirtualHost> </VirtualHost> block.
Save file and exit the editor. Restart apache web server with following command to make the changes effected.
Issue following command to login to MySQL Server using the password you just set.
You'll be presented with a welcome message, and your prompt will change to mysql>. Enter following commands to create a new database. This database will be used as Access Manager and Freeradius data store. You may name it anything, but you'll have to provide same name when making changes to Freeradius as well as Accesss Manager's database configuration file. Here we name it 'acmanager'.
Though its not mandatory to install composer for Access Manager to work. But, its recommended because, once you've composer installed it becomes very easy to install Access Manager & in the future update dependencies when available.
Issuing the following command will download the composer.phar into current dirctory.
Now, issue to following commands to make it executeable & move it to /usr/local/bin to make it available globally.
After installing all the required packages and creating mysql database to use, we're ready to fetch/transfer Access Manager package onto our server. Since we've already installed composer, use following commands to move into your web root directory, and install access-manager.
Issuing the above mentioned command will install Access Manager 2 along with all its dependencies.
Now, as we have all the required files in place. Modify the database configuration of Access Manager
with correct database credentials. open the file database.php file located at:
On line 55 you'll find 'mysql' array, all the options are self-explanatory. Update the configuration with appropriate values. At max you'll need to modify four options: Host, Database, Username and Password.
After making the desired changes, save & exit the editor.
Once you've configured the correct database credentials, Access Manager can take care of creating the required database schema including the tables required for Freeradius Server.
Issue following commands to populate the database and seed the database with default values.
Issuing the above mentioned commands, along with setting default values, will also create a admin account with username being 'admin' and password '123456'.
You've successfully installed and configured Access Manager on your Ubuntu Server. AdminPanel can be accessed on http://192.168.1.10/access-manager/admin
Now, we'll continue to how to install and configure Freeradius server.