freeradiantbunny docs



How to Install the Database Using cPanel

Need to install the database using cPanel. You have come to the right place. (If you need to install a database on the command-line, go How to Install the Database.


Note that the following needs to be checked for bugs. YMMV.

Install Database using cPanel

Step 1. Login into cPanel.

Step 2.Navigate under the databases section and Go to "PostgreSQL Databases".

Step 3. Under "Create New Database" add the name of your database. In my case, the database was named "frbweb". Click "Create database" when ready.

Add this same name to your usr/config.php file where it reads "YOUR_DATABASE_NAME". When you are done, you should see your database listed.

  // databases
  // default
  //private $databases = array("example_database_name");
  // installed
  private $databases = array("account_frbweb");

Under "Add New User" add a user and input the configuration values as you see fit. We used the default values. YMMV.

Next, use "Add User To Database" so as to associate the database and the user, and click "Submit".

When you are done, check your work where it says "Current Databases".


Had to use phpPgAdmin to asign db username to database. Do this in phpPgAdmin under the menu selection "Privileges".

Next you need to get the schema and install it...

Start by going to the code and finding the latest database schema. In our case, the file name is "db_schema_1.1.sql". Open this file with a text editor and replace the text "YOUR_USERNAME_HERE" with the name of the database username (created above).

On the command-line use sed to search-and-replace.

sed -i 's/YOUR_USERNAME_HERE/NAME/g' freeradiantbunny/frb/lib/db/db_schema_1.2.sql

Use the cPanel FileManager to fine the db-schema file and open it with text editor to see if the username changes exist.

Back to the cPanel. Open up phpPgAdmin. Click on the name of the database.

Using phpPgAdmin, import the database schema. This is used using "SQL" (not the pop-up in the upper-right corner; but the one on the menu) and the ability to "upload an SQL script" and select it using the "Browse..." button.

Now we need to install some of the data that is used by many people.


Use .htaccess to protect the .git directories.

In the .git directories (2 of them) check that you have .htaccess files with the following "go-away" code.

Order allow,deny
Deny from all