To give users the ability to locate your documentation server without knowing the URL, you can register the name of your server with the FNS system. Users can still access unregistered documentation servers if they know the URL.
How you register your server depends on two things:
Your familiarity with FNS commands
If you are familiar with standard FNS commands, such as fnbind, you can use those commands to register the server. However, to simplify the registration process, the /usr/lib/ab2/bin/ab2regsvr command can register your server for you. For more information, see "Registering Your Server Using the ab2regsvr Command" and "Registering Your Server Using Standard FNS Commands".
What name service you are using
NIS+ (Network Information Service Plus) is the primary name service used for Solaris 2.6 and later operating environments. If your system is using NIS+ and you have administrative privileges, you can register the server while logged in on either the NIS+ master or NIS+ client system.
NIS (Network Information Service) was the standard name service provided in SunOS 4.x (Solaris 1.x) environments. If your system is using NIS, you must be logged in as root on the NIS master system to register the documentation server.
The AnswerBook2 product also works with a file system-defined naming system (files) in which all names are manually entered into data files. These files are stored in the directory /var/fn/. In this case, to register the server, you must have root access to the system and registration applies only on the machine on which it is registered. Other machines cannot see a server registered under a file system mechanism.
To register your server, use the ab2regsvr command. The ab2regsvr command looks at your system's configuration and sets up the appropriate name space for your server.
To register your server, type:
# /usr/lib/ab2/bin/ab2regsvr server_url |
Where server_url is the fully qualified URL to get to this server (for example: http://imaserver.eng.sun.com:8888/).
The ab2regsvr command also provides some other options you might find useful:
To view a list of registered AnswerBook2 server URLs:
# /usr/lib/ab2/bin/ab2regsvr -l |
To remove a registered server from the list:
# /usr/lib/ab2/bin/ab2regsvr -d |
To change the URL for the currently registered AnswerBook2 server:
# /usr/lib/ab2/bin/ab2regsvr -r server_url |
Where server_url is the new URL to get to this server (for example: http://aserver.eng.sun.com:8888/). This replaces any existing URLs with the specified URL.
For more information about the ab2regsvr command, see the ab2regsvr(1m) man page.
If you want to use FNS commands to register your server and you already have FNS installed at your location, use the following command to register the specified URL as a documentation server for your organization (domain):
# fnbind -r thisorgunit/server/answerbook2 onc_answerbook2 \ onc_addr_answerbook2 server_url |
Where server_url is the fully qualified URL to get to this server (for example: http://imaserver.eng.sun.com:8888/).
To find out what servers are currently registered, use the following command:
% fnlookup -v thisorgunit/service/answerbook2 |
This returns a list of registered servers that looks similar to the following:
Reference type: onc_answerbook2 Address type: onc_addr_answerbook2 length: 19 data: 0x68 0x74 0x74 0x70 0x3a 0x2f 0x2f 0x61 0x6e 0x73 http://ans 0x77 0x65 0x72 0x73 0x3a 0x38 0x38 0x38 0x38 wers:8888 |
In this example, the registered server is http://answers:8888/.
If you get a response similar to the following, then no documentation servers are registered with FNS:
Lookup of 'thisorgunit/service/answerbook2' failed: \ Name Not Found: 'answerbook2' |
For more information about FNS, including how to install it, see the FNS documentation.
Rather than using the described name services to find a documentation server, the user can define a default AnswerBook2 server using the environment variable AB2_DEFAULTSERVER. For example, the user could have the following line in the .cshrc file:
setenv AB2_DEFAULTSERVER http://imaserver.eng.sun.com:8888 |
If the user has not defined an environment variable, when the user launches the AnswerBook2 product from the desktop, the product looks to see if the system from which it was launched is running a documentation server. If so, it launches using the URL: http://localhost:port, where port defaults to 8888.
If the user has not defined an environment variable and the current system is not a documentation server, when the user launches AnswerBook2 from the desktop, the system performs an fnlookup thisorgunit/service/answerbook2 command to find out what documentation servers are available. It then chooses one of those servers and launches the AnswerBook2 browser using that server name for the URL.