Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
38
Добавлен:
18.03.2015
Размер:
608.7 Кб
Скачать

Configuring the Port Service on Client and Server

alice/3051:rabbit

Using a copy of firebird.conf

From Firebird 1.5 onward, you can optionally include a client-side copy of firebird.conf in the firebird root directory and configure RemoteServiceName or RemoteServicePort to help the client to locate the server port.

You can configure one of these two parameters to extend the override provided for the other one through the connection string (above); or to override only the RemoteServiceName or the RemoteServicePort without using the connection string to do it.

If you need to avoid passing the port service name or the port number in the connection string and the server is using non-defaults for both, you can configure both RemoteServiceName and RemoteServicePort. You would use this technique if your client application needed to retain the capability to connect to InterBase or Firebird 1.0 servers.

Location of Firebird artifacts on clients

When you rely on firebird.conf on client machines, it is important that the client library knows where to find it. You will need to set up a Firebird root directory and inform the system of its location. Use the FIREBIRD environment variable to do this. Windows clients can alternatively use the Firebird Registry key. With a correct client setup, you can also make use of a local version of the message file.

Configuring the Services File

You do not need to configure a service port entry for your Firebird server or clients if the server uses the installation defaults, gds_db on port 3050. If gds_db is the port service name and it cannot be resolved to any other port, it will map to port 3050 automatically.

If you are configuring the service port for a different port or service name, both the server and the client must be explicitly updated to reflect the reconfiguration. On both Linux and Windows, this information is stored in the services file.

Locating the services file

Windows XP/S2003

C:\windows\system32\drivers\etc\services

Windows NT/2000

C:\winnt\system32\drivers\etc\services

Windows 95/98/ME

C:\windows\services

92

Configuring the Port Service on Client and Server

Linux/UNIX

/etc/services

A services entry looks like this:

gds_db 3050/tcp # Firebird Server 1.5

Open the file using a text editor and either add a line or edit the existing gds_db entry, as follows:

for a Firebird 1.0.x server or client, alter either the service name or the port number to reflect how your server will start up.

for a Firebird 1.5 or higher server, edit or add a line, as required. If you have a Firebird 1.0 or InterBase server installed on the same host, retain the entries they require and add a new entry reflecting how the Firebird 1.5 server will start up.

93

Соседние файлы в папке doc