1.4. Installation from source tarballs

This section will guide you through the compilation of the FRED and the follow-up installation. This procedure is meant for Ubuntu.

See also source code architecture.


Remember to set the timezone in PostgreSQL to UTC.

1.4.1. Add the CZ.NIC signing key and repositories

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1C0200016A9AC5C6

add-apt-repository "deb http://archive.nic.cz/ubuntu $(lsb_release -sc) main"
add-apt-repository "deb http://archive.nic.cz/private $(lsb_release -sc) main"

apt-get update

1.4.2. Satisfy dependecies

We prepared lists of all particular packages on which FRED’s compilation, installation or operation depends (package names may slightly differ across OS versions):

Install all the packages from the appropriate list.

1.4.3. Download and unpack

We publish a list of GitHub-generated tarballs on the website.

You may use the latest version list or an archived version list (see the website for archived versions).

mkdir fred && cd fred
curl -L https://fred.nic.cz/fred-sources-list-latest.txt | while read -r line; do
   curl -JLO "$line" # these options are necessary to have nice filenames
for file in *.tar.gz; do tar xvzf "$file" && ln -s "${file%.tar.gz}" "${file%-*}"; done

1.4.4. Install “A” packages

These packages are configured, compiled and installed using Autotools 1.

Package list:

  • fred-db

From the directory of the package, run this command sequence:

autoreconf -vfi # generates the 'configure' script
sudo make install

The configure script prepares package files for compilation and installation by adapting them to a specific environment and checks that the required tools are available.

The make command performs the actual compilation. (Some packages have nothing to compile. In that case, the make reports “Nothing to be done…”.)

The last command just copies files required for operation to the target directories. (You usually need administrator permissions if you install somewhere else than to your home directory.)

The target directory (installation prefix), as well as other parameters (e.g. compilation params), can be passed as arguments directly to the configure script or as environment variables. (See ./configure --help for options.)


Note that the default prefix is used in examples throughout this manual.


For more information about Autotools see the GNU Automake Manual.

1.4.5. Install “C” packages

These packages use CMake 3 for build and installation.

Some of these packages require IDL definitions during compilation, therefore the IDL package must be installed before other “C” packages and before the fred-pyfred package.

Package list:

  • fred-idl (does not require build nor installation)

  • fred-libfred (not to be built standalone, it is included by fred-server)

  • fred-server

  • fred-mod-corba (doesn’t require IDLs)

  • fred-mod-eppd

  • fred-mod-whoisd

  • fred-akm

  • cdnskey-scanner (doesn’t require IDLs)

For fred-mod-corba and cdnskey-scanner run: 2

mkdir _build && cd _build
cmake ..

For fred-server build run: 2

mkdir _build && cd _build
cmake -DIDL_DIR=../../fred-idl/idl -DLIBFRED_DIR=../../libfred ..

For the other packages run: 2

mkdir _build && cd _build
cmake -DIDL_DIR=../../fred-idl/idl ..

The positional argument of CMake should be the directory with the CMakeLists.txt file of the component being built. We build relatively to the parent directory .. in our code samples.


For more information about CMake see https://cmake.org/.

1.4.6. Install “S” packages

These packages use Setuptools 4 for build and/or installation.

Setuptools must be installed (python-setuptools or pip install setuptools) before all other Python packages.

Package list:

  • fred-utils-pyfco

  • fred-utils-pylogger

  • fred-client

  • fred-doc2pdf

  • fred-pyfred

  • fred-rdap

  • fred-webadmin

  • fred-webwhois

  • fred-logger-maintenance (optional)

  • fred-transproc (optional)

  • django-pain (optional)

  • fred-pain (optional)

For each package in the list, run this command from its directory:

sudo python ./setup.py install

The install command calls compilation (build) first, if needed, and then just copies files required for operation to the target directories. (You usually need administrator permissions if you install elsewhere than to your home directory.)

The target directory (installation prefix), or other parameters, can be passed as arguments. Refer to python ./setup.py --help install for installation parameters.

The installer writes a list of installed files (with their full path) to the install.log file when it finishes.


For more information about Setuptools see https://setuptools.readthedocs.io.

1.4.7. Finalization

You need to finish the setup of the following parts to make the system operational:

  • enable Apache modules,

  • setup the database schema,

  • launch servers. Enable Apache modules

Enable mod_ssl (not enabled by default):

sudo a2enmod ssl

Configure Apache to load mod_eppd and mod_whoisd, create virtual hosts to provide EPP server and Web Whois server and configure directories to provide Unix Whois and RDAP server:

  • Correct RDAP Apache module configuration (comment or delete the WSGISocketPrefix directive):

    sudo sed -i~ -e "s/^WSGISocketPrefix/#WSGISocketPrefix/" \
  • Link configuration snippets (provided with the FRED) to Apache’s virtual host directory:

    cd /etc/apache2/sites-available/
    sudo ln -s /usr/local/share/fred-mod-corba/01-fred-mod-corba-apache.conf .
    sudo ln -s /usr/local/share/fred-mod-whoisd/02-fred-mod-whoisd-apache.conf .
    sudo ln -s /usr/local/share/fred-mod-eppd/02-fred-mod-eppd-apache.conf .
    sudo ln -s /usr/local/share/doc/fred-whois/apache.conf 03-fred-whois.conf
    sudo ln -s /usr/local/share/fred-rdap/apache.conf 04-fred-rdap.conf
  • Enable FRED sites:

    sudo a2ensite 01-fred-mod-corba-apache.conf
    sudo a2ensite 02-fred-mod-whoisd-apache.conf
    sudo a2ensite 02-fred-mod-eppd-apache.conf
    sudo a2ensite 03-fred-whois.conf
    sudo a2ensite 04-fred-rdap.conf
  • Set the Apache user (www-data) as the owner of the log directory to make logging possible:

    sudo chown www-data:www-data /usr/local/var/log/
  • Finally, restart the Apache to load the new settings:

    sudo service apache2 restart Setup the database schema

The FRED database schema is installed automatically with the default settings

(user name and database name) on the first run of the CORBA servers.

However, if you want to setup the database manually, you need to:

  • disable the auto-install by setting the flag DB_INIT=0 in /usr/local/etc/init.d/fred-server

  • setup the database settings (as the postgres user):

    su - postgres
    • create a user and set his privileges:

      createuser -SDR -l {dbusername}
    • create a database, set the owner and encoding:

      createdb {dbname} -O {dbusername} -E UTF8
    • install ‘plpgsql’ language for the database:

      createlang plpgsql {dbname}
    • set a password for the user (from the psql console):

      postgres=# alter user {dbusername} password 'passwd';
  • adapt the PostgreSQL client authentication configuration in /etc/postgresql/9.1/main/pg_hba.conf to use the plain-password authentication method 5

    • for all databases and users:

      #TYPE   DATABASE    USER        ADDRESS      *METHOD*
      local   all         all                      password
      host    all         all password
      host    all         all         ::1/128      password
    • for your user and your database specifically:

      # Unix-socket connections
      local  {dbname}    {dbusername}              password
      # localhost TCP/IP-socket connections, IPv4
      host   {dbname}    {dbusername} password
      # localhost TCP/IP-socket connections, IPv6
      host   {dbname}    {dbusername} ::1/128      password
    • and restart the PostgreSQL server:

      sudo service postgresql restart

We use the plain-password method only as an illustration of simple settings, however we do not suggest that this method is secure. We recommend you to consult the PostgreSQL documentation and your local security policy.

  • run the provided SQL script to create the FRED database structure:

    psql {dbname} -U {dbusername} -f /usr/local/share/fred-db/structure.sql
  • adapt the FRED configuration files accordingly (set the correct database name, user and password)

    • /usr/local/etc/fred/server.conf:

      host = localhost    # hostname of the database server (default)
      port = 5432         # port of the db service (default)
      name = {dbname}     # database name
      user = {dbusername} # database user name
      password = passwd   # user password
    • /usr/etc/fred/pyfred.conf:

      ... Launch servers

To start the FRED CORBA servers, you can use the service script or run this command:

sudo /usr/local/etc/init.d/fred-server start

To start the FRED webadmin server (Daphne), you can use the service script or run this command:

sudo /usr/etc/init.d/fred-webadmin-server start

Now, you can perform the smoke test to make sure that all interfaces are available and working together.

1.4.8. After installation

Check the system configuration and adapt it accordingly.

Before registrars can access the Registry, you must initialize it.

You may also want to test the installation.