Database Configuration

To use Sauron, you need to create a database for it in PostgreSQL. Unless you plan on restoring existing Sauron database from a database dump, you also need to setup necessary tables for Sauron to use.

Creating database for Sauron

Choose name for your database (for example: sauron) and create empty database in PostgreSQL using createdb program.
        createdb sauron
        

After creating the database, you may either restore existing Sauron database dump or start from "scratch" and create necessary tables for Sauron as described in following Sections.

Initializing Database

Before using Sauron, you need to initialized the database. For this there is createtables utility that is included with Sauron. To initialize the database, simply run following command in Sauron program directory:
        ./createtables
        
This command will create all the necessary tables needed by Sauron. You can check that everything worked by issuing the following command:
        ./status
        
This should produce output similar to following showing that the database connection works:
Sauron v0.5.0 status

Database connection:   OK
Database version:      1.0
CGI interface:         Enabled

No servers found in database!
        

It is also recommended to check that the Perl modules in use meet the requirements (see the Section called System Requirements). This can be done by running status command with --versions option:
        ./status --versions
        

Initializing Global Tables

Sauron has several global tables that contain data that is used by all servers stored in a Sauron database. These tables contain a table (ether_info) that contains mappings of OUI's to Manufacturers that is used to display the manufacturers of NICs based on the Ethernet MAC address. There is also a table (root_servers) that contains global (default) root server information, and optionally also server specific root server information.

To populate OUI (ether_info) table with the included files, issue following commands in the Sauron top-level directory:
        ./import-ethers contrib/Ethernet.txt
        ./import-ethers --force contrib/additional-ether-codes.txt
        
You may also want to download IEEE's up to date public list of OUIs from
IEEE's web site, and install it as follows:
        ./import-ethers oui.txt
        

You should also add default root servers into root_servers table. This can be done as follows:
        ./import-roots default contrib/named.root
        
NOTE! remember to check for newer version of this file at ftp.rs.internic.net .