Backtalk Installation Guide

Part III: SQL Server Configuration

Version 1.4.9

© 1996-2003 Jan Wolter, Steve Weiss

Prev: Part II: Compilation
Next: Part IV: Installation (with Backtalk Accounts or with Unix Accounts)


Obviously, this step should be skipped if you haven't configured Backtalk to use an SQL server. Proceed directly to the installation step.

(1) Create the SQL Database

If you are not using a pre-existing database, then this is the time to create one. The normal name for the database would be 'backtalk' but anything can be used. The database must be accessible from whatever account the CGI's run on.

If your server is run by an ISP, they will probably have provided a web interface through which you can create and administer databases. Use that. You'll probably need to give a name for the database, and create a user with a login and a password who has access to that database. You will be given the database servers hostname and the port number to be used. Note all of this down.

If you on a server you administer yourself, you'll probably have to use the command line interface to create a database. The commands to create a database will vary for different SQL servers. For PostgreSQL, you might create a database from the shell with the command:

    createdb backtalk

For MySQL, you might run the "mysql -u root -p" command. (If you don't have a password on your mysql root account omit the '-p' flag. Or better yet, set a password!) Then issue the command:

    create database backtalk;
You will also want to create a username and password for Backtalk to log in as and permit the database to be accessible only to that account. Whether this is needed depends on your configuration, but generally tighter access restrictions are better.

A typical mysql command that creates a mysql account named 'btuser' with password 'btpass' that can access the 'backtalk' database from the local server (only) would be:

  grant select,insert,update,delete,create,drop
     on backtalk.*
     to 'btuser'@'localhost'
     identified by 'btpass'; 

(2) Edit the Runtime Configuration File

Edit misc/backtalk.conf.

If you are upgrading a system that uses SQL, you will probably want to copy the `backtalk.conf' file that is installed in the backtalk etc directory into misc/backtalk.conf.

At this point, all you need to define are the SQL server settings. There are other settings in that file that you can configure, but they need not be set before installation. If your SQL server is running on the same machine as Backtalk, the database is called 'backtalk', and no login or password is needed to connect, you can probably use he default configuration file without changes. Otherwise, you may want to set the following options:

  1. SQL Server Hostname.
    This is the name of the machine that the SQL server runs on. The syntax is like
     
       sql_hostname sqlserver.mysite.com
     
    The default is 'localhost', that is the same machine that Backtalk runs on.
     
    If the name 'localhost' is given, Backtalk will usually not form a TCP/IP connection, but will instead use the more efficient Unix sockets. If you give a fully qualified domain name, like 'sqlserver.mysite.com', then a TCP/IP connection will be made, even if that happens to be the same machine Backtalk is running on.
     
  2. SQL Server Port Number.
    This is the port number that the SQL server listens for connections on. The command to set this looks like:
     
       sql_port 5432
     
    The default depends on the SQL server you are using. Unless your SQL server has been modified to listen on something other than the default port, you shouldn't have to set this.
     
  3. SQL Database Name.
    This is the name of the database that you created in step (1). The default is 'backtalk'. You can set something else with a command like:
     
       sql_dbname my_conf_db
     
  4. SQL Login Name.
    If a login is needed to access the database, then the login name should be specified, as follows:
     
       sql_login btuser
     
    If no login name is configured, none is used.
     
  5. SQL Login Password.
    If a password is needed to access the database, then the password name should be specified, as follows:
     
       sql_password btpass
     
    If no password is configured, none is used.
     
    Note that the password must be given in clear text, and the configuration file must be readable to the backtalk owner account. There may be security issues with this on some servers. If you have untrusted users accessing your server, you will not want this file installed where others can easily read it.

Prev: Part II: Compilation
Next: Part IV: Installation (with Backtalk Accounts or with Unix Accounts)