man Pages(1M): System Administration Commands
この本のみを検索
PDF 文書ファイルをダウンロードする

NAME

ab2admin - command line interface for AnswerBook2 administration

SYNOPSIS

ab2admin [ -h ] [ -H command ] [ -o command [ arguments ] ]

DESCRIPTION

ab2admin enables you to administer AnswerBook2 collections and documents on a specified AnswerBook2 server. You can install and uninstall AnswerBook1 and AnswerBook2 collections to a server, scan for locally installed collections and update the server database, and obtain a listing of collections and books.
ab2admin server management functions include: stopping the server, starting the server, restarting the server, turning the server log files on or off, and rotating the log files. You can configure the server to resolve links to books located on other AnswerBook2 servers.
ab2admin can also be used to control server access by adding or deleting users to the pool of administrative users. You can turn on or off the access control
ab2admin can connect to any AnswerBook2 server (local or remote). Certain functions, such as stop, start and restart apply only to the local AnswerBook2 server. If the AnswerBook2 server is protected by a password, then user id and password are required to initiate an administration task.
ab2admin can run interactively by typing ab2admin from the command line and then entering commands as prompted; or, it can be executed entirely from the command line using the -o option.

OPTIONS

The following options are supported:
-h
Displays help.
-H command
Displays help for command.
-o command [ arguments ]
access_off [ -m server ] [ -p server_port_number ]
Turns off the server access log file.
access_on [ -m server ] [ -p server_port_number ]
Turns on the server access log file.
add_coll -d path [ -m server ] [ -p server_port_number ]
Adds AnswerBook1 or AnswerBook2 collections into the specified AnswerBook2 server database.
add_server -M additional_server -P additional_server_port_number [ -m server ]
        [ -p server_port_number ]

Makes additional server known to the specified server.
add_admin -u user_id [ -m server ] [ -p server_port_number ]
Adds user to the authorized list of server administrators.
auth_off [ -m server ] [ -p server_port_number ]
Turns off the server administration verification.
auth_on [ -m server ] [ -p server_port_number ]
Turns on the server administration verification.
change_password -u user_id [ -m server ] [ -p server_port_number ]
Changes authorized user's password.
delete_coll -t collection_title [ -m server ] [ -p server_port_number ]
Deletes AnswerBook1 or AnswerBook2 collections from the
specified server.
del_server -M additional_server -P additional_server_port_number [ -m server ]
        [ -p server_port_number ]

Delete additional server from list of servers known to the specified server.
del_admin -u user_id [ -m server ] [ -p server_port_number ]
Deletes user from the list of authorized server administrators.
error_off [ -m server ] [ -p server_port_number ]
Turns off the server error log file.
error_on [ -m server ] [ -p server_port_number ]
Turns on the server error log file.
install -d path [ -n package ]
                Install package on specified server. See pkgadd (1M).

list [ -m server ] [ -p server_port_number ]
Lists AnswerBook1 and AnswerBook2 collections available on the specified server. The listing includes the books contained within collections.
modify_server_name -s new_server_name [ -m server ] [ -p server_port_number ]
Modifies the server's name.
modify_server_port -a new_server_port_number [ -m server ]
        [ -p server_port_number ]
                Modifies the server's port number.

rotate_access[ -m server ] [ -p server_port_number ] [ -d path/filename ]
Saves and resets the server access log file.
rotate_error [ -m server ] [ -p server_port_number ] [ -d path/filename ]
Saves and resets the server error log file.
restart
Restarts local AnswerBook2 server. Requires root access.
scan [ -m server ] [ -p server_port_number ]
Scans for locally installed collections (AnswerBook1 or AnswerBook2) and update the collections on specified server's database.
start
Starts local AnswerBook2 server. Requires root access.
stop
Stops local AnswerBook2 server. Requires root access.
uninstall [ -n package ]
                Delete package on specified server. See pkgadd (1M).

view_access [ -m server ] [ -p server_port_number ]
Views the contents of the server access log file.
view_config [ -m server ] [ -p server_port_number ]
Views the configuration settings of the server.
view_error [ -m server ] [ -p server_port_number ]
Views the contents of the server error log file.

USAGE

quit
Exit interactive mode.
bye
Exit interactive mode.
exit
Exit interactive mode.

EXAMPLES

To list the collections available on a server named foo.com, using port number 8888 :
        example% ab2admin -o list -m foo.com -p 8888
To use ab2admin in interactive mode for the same operation as shown above:
        example% ab2admin
        >> list -m foo.com -p 8888
To install AnswerBook2 collection via pkgadd (1M):
        example% pkgadd -d package_directory/SUNWabsdk

The collection directory structure will be copied into the system (by default) to /opt/answerbooks/local. . .
To install AnswerBook2 collection that has beed introduced to the system via pkgadd (1M)but did not get updated to the server database: (Note that -d path must include the collinfo file. Refer to "Using AnswerBook2 to View Online Information" in your information library.)
ab2admin -o add_coll -d /opt/answerbooks/english/solaris_2.6/SUNWabsdk
To inspect how an AnswerBook1 collection is defined:
example% cat /opt/SUNWans/ab_cardcatalog
:id=SUNWab_10_4: \
:version=: \
:title=Solaris XGL 3.1 AnswerBook: \
:tocpath=/net/elirium.Eng/export/answerbook/Solaris_2.4/SUNWAxg/toc: \
:pspath=/net/elirium.Eng/export/answerbook/Solaris_2.4/SUNWAxg/ps: \
:indexpath=/net/elirium.Eng/export/answerbook/Solaris_2.4/SUNWAxg/index

To install AnswerBook1 collections:
ab2admin -o install -d
/opt/answerbooks/english/solaris_2.6/SUNWabe/ab_cardcatalog

To inspect how an AnswerBook2 collection is defined:
example% cat /opt/answerabooks/english/solaris_2.6/SUNabsd/collinfo
dwCollections {
 coll.45.4 dwCollection
}

dwSetParam coll.45.4 {
 location /opt/answerbooks/english/solaris_2.6/SUNWabsdk
 title "Solaris 2.6 Software Developer AnswerBook Vol 1"
 type EbtCollection
}

FILES

/var/log/ab2/catalog/local.socat
Catalog file
/var/log/ab2/catalog/remote.socat
Catalog file
/var/log/ab2/catalog/delegate.socat
Catalog file
/var/log/ab2/catalog/libcat.socat
Catalog file
/var/log/ab2/logs/access_8888.log
Default access log file
/var/log/ab2/logs/errors_8888.log
Default error log file
/usr/lib/ab2/dweb/data/config/ab2_collections.template
AnswerBook2 collection database
/var/log/ab2/catalog/ab1_cardcatalog
AnswerBook1 collection database
/usr/lib/ab2/dweb/data/config/admin_passwd
File containing username:password

ATTRIBUTES

See attributes(5) for a discussion of the following attributes:
ATTRIBUTE TYPEATTRIBUTE VALUE
AvailabilitySUNWab2u

SEE ALSO

pkgadd (1M),pkgrm(1M), attributes(5)