|
||
|
|
Appendix A Command Line Utilities
This appendix provides instructions for using command line utilities in place of the user interface screens.
This appendix contains the following sections:
LDIF consists of one or more directory entries separated by a blank line. Each LDIF entry consists of an optional entry ID, a required distinguished name, one or more object classes, and multiple attribute definitions.
For information about formatting LDIF entries, see the Netscape Directory Server Command and File Reference.
Modifying Database Entries Using ldapmodify
You use the
ldapmodifycommand-line utility to modify entries in an existing Directory Server database.ldapmodifyopens a connection to the specified server using the distinguished name and password you supply, and modifies the entries based on LDIF update statements contained in a specified file. Becauseldapmodifyuses LDIF update statements,ldapmodifycan do everything thatldapdeletecan do.For more information about command-line utilities used with Directory Server database entries, see the Directory Server Command and File Reference.
HttpServerAdmin (Virtual Server Administration)
HttpServerAdminis a command line utility that performs the same administrative functions as the virtual server user interface in the Server Manager and the Class Manager. If you prefer to set up your virtual servers using the command line interface, useHttpServerAdmin.
HttpServerAdminis in server_root/bin/https/httpadmin/bin.Before you can run
HttpServerAdmin, you need to set the environment variableNES_SERVER_HOMEto the server root directory in your environment.For example, on UNIX/Linux systems:
setenv
NES_SERVER_HOME /usr/netscape/server6On Windows NT/Windows 2000 systems:
- On the Control Panel, choose System.
![]()
- Click the Environment tab.
![]()
- Type
NES_SERVER_HOMEin the Variable field and the path to your server root in the Value field.![]()
- Click Set.
![]()
- Click OK.
![]()
In order to perform all commands, you need to have write permissions to the file
server.xmlwhere the virtual server information is stored.
The
HttpServerAdminsyntax is as follows:HttpServerAdmin command_name command_options -d server_root -sinst http_instance
You can get an online explanation of the command parameters by typing the following command:
There are four possible values for the command_name parameter:
Each command has its own set of command options. For more information, see the sections in this chapter that describe each command.
Regardless of the value of the command parameter, the parameters shown in Table A-1 can apply to all uses of the
HttpServerAdmincommand.
Table A-1 HttpServerAdmin Parameters
(required). This parameter designates the path to the server root (the location where the server is installed).
(required). This parameter designates which instance
HttpServerAdminaffects.
Use the
controlcommand to start, stop, and disable classes and virtual servers. If you do not specify a virtual server, the command starts, stops or disables every virtual server in the class.Use the options shown in Table A-2 with the
controlcommand to control classes and virtual servers.
Table A-2 Control command options
HttpServerAdmin control -cl classname, -control_option
[-idvirtual_server] -d server_root-sinsthttp_instanceUse these parameters with the command options to control virtual servers
Table A-3 Control command parameters
(optional) Designates the virtual server ID you are controlling.
Use the
createcommand to create classes of virtual servers, virtual servers, listen sockets and connection groups.Use the options shown in Table A-4 with the
createcommand to create classes, listen sockets, and virtual servers.
Table A-4 Create command options
Each of these options in turn has its own parameters, which are shown in the following sections.
Use this option of the create command to create a virtual server class.
HttpServerAdmin create -c -cl classname [-docroot document_root] [-obj obj.conf_file] [-acptlang accept_language] -d server_root -sinst http_instance
Use the parameters shown in Table A-5 with the
create-ccommand option to create classes.
Table A-5 Create virtual server class parameter
HttpServerAdmin create -c -cl myclass1 -d /export/netscape/servers -sinst https-netscape.com
Use this option of the create command to create a connection group.
HttpServerAdmin create -g group_ID -lsid listen_socket -ip IPaddress -sname server_name -defaultvs default_virtual_server -d server_root -sinst http_instance
Use the parameters shown in Table A-8 with the
create -gcommand option to create connection groups.
Table A-6 Create connection group parameters
The ID of the listen socket you want associated with this connection group.
The default virtual server the connection group connects to if the requested URL host cannot be found.
HttpServerAdmin create -g conngroup2 -lsid ls1 -ip 1.1.1.1 -sname netscape -defaultvs vs2 -d server_root -sinst https-netscape.com
Use this option of the create command to create a listen socket.
HttpServerAdmin create -l -ip ip_address -port port_number -sname server_name -defaultvs default_virtual_server [-sec security] [-acct number_of_accept_threads] -d server_root -sinst http_instance
Use the parameters shown in Table A-7 with the
create-lcommand option to create listen sockets.
Table A-7 Create listen socket parameters
HttpServerAdmin create -l -id ls3 -ip 0.0.0.0 -port 1333 -sname example -defaultvs vs2 -sec on -acct 4 -d /export/carey/server6 -sinst https-example.com
Use this option of the create command to create a virtual server.
Please note that if you do not include values for some of the optional parameters, defaults are provided. You can always change the default values after the virtual server is created.
HttpServerAdmin create -v -id virtual_server -cl classname -urlh urlhosts -conngroupid connection_group_ID[-state state][-docroot document_root] [-mime mime_types_file] [-aclid acl_ID] -d server_root -sinst http_instance
Use the parameters shown in Table A-8 with the
create -vcommand option to create virtual servers.
Table A-8 Create listen socket parameters
Use the delete command to delete classes of virtual servers, virtual servers, and listen sockets.
Use the options shown in Table A-9 with the
deletecommand to delete classes.
Table A-9 Delete command options
Use this option of the delete command to delete a virtual server class.
HttpServerAdmin delete -c -cl classname -d server_root -sinst http_instance
Use the parameters shown in Table A-9 with the
deletecommand to delete classes.
Table A-10 Delete class parameters
HttpServerAdmin delete -c -cl class1 -d /export/netscape/server6 -sinst https-netscape.com
Use this option of the delete command to delete a connection group.
HttpServerAdmin delete -g -id connection_group -lsid listen_socket -d server_root -sinst http_instance
Use the parameters shown in Table A-9 with the
deletecommand to delete a connection group.
Table A-11 Delete connection group parameters
HttpServerAdmin delete -g -id conngroup3 -lsid ls2 -d /export/netscape/server6 -sinst https-netscape.com
Use this option of the delete command to delete a listen socket.
HttpServerAdmin delete -l -id listen_socket -d server_root -sinst http_instance
Use the parameters shown in Table A-9 with the
deletecommand to delete classes.
Table A-12 Delete class parameters
HttpServerAdmin delete -l -id ls3 -d /export/netscape/server6 -sinst https-netscape.com
Use this option of the delete command to delete a virtual server.
HttpServerAdmin delete -v -id virtual_server -cl classname -d server_root -sinst http_instance
Use the parameters shown in Table A-9 with the
deletecommand to delete a virtual server.
Table A-13 Delete virtual server parameters
HttpServerAdmin delete -v -id vs3 -cl class1 -d /export/netscape/server6 -sinst https-netscape.com
Use the
listcommand to list classes of virtual servers, virtual servers, listen sockets and connection groups.HttpServerAdmin list -command_option -d server_root -sinst http_instance
Table A-14 List command options
© 2001 Sun Microsystems, Inc. Portions copyright 1999, 2002 Netscape Communications Corporation. All rights reserved.
Last Updated August 02, 2002