Starting off with Web Server 7.0 CLI

Starting off with Web Server 7.0 CLI

One of the salient features of Web Server 7.0 is the presence of a Command Line Interface called wadm for performing administrative tasks. wadm can run in 3 modes:

  • Single mode where you type the whole command with options like how you would use any other command.
  • Shell mode which takes you to an embedded JACL shell. This mode can be used to utilize JACL features that can be used for scripting purposes.
  • File mode where you can store all the commands into a file and input it to wadm.

This blog will take you through the steps to use some of the simple features of running wadm in shell mode to perform various tasks.

  1. Invoke the CLI, this will display the usage.

    -bash-3.00$ wadm
    Usage: wadm [--user=admin-user] [--password-file=admin-pswd-file] [--host=admin-host] [--port=admin-port] [--no-ssl] [--rcfile=rcfile] [--no-prompt] [--help] [--commands-file=filename]
    CLI014 user is a required option.

  2. To connect to the Administration Server, run

    -bash-3.00$ wadm –user=admin –host=abc.sun.com –port=2222 –no-ssl
    Please enter admin-user-password>
    Sun Java System Web Server 7.0 B05/12/2006 09:47
    wadm>

  1. You can store the password into a plain text file and then pass this file to wadm to avoid typing the password each time

    -bash-3.00$ echo “wadm_password=secret” >admin.pwd
    -bash-3.00$ wadm –user=admin –password-file=./admin.pwd
    Sun Java System Web Server 7.0 B05/12/2006 09:47
    wadm>

  1. One of the cool features of the CLI is that the wadm command options and their values can be stored into a default file called .wadmrc in the user home directory. Or you can choose to pass the path to this startup file and pass it to wadm. This will avoid typing all the options each time.

    -bash-3.00$ wadm --user=admin --rcfile=./rcfile
    Please enter admin-user-password>
    Sun Java System Web Server 7.0 B05/12/2006 09:47
    wadm>

  1. You can set a variety of options in the .wadmrc file. You would just need to prefix wadm_ to the option name and store it in this file. Suppose you need the CLI to be more verbose set the wadm_verbose to true. Or if you are interested in looking at the complete command that goes to the administration server, set wadm_echo to true. To enable JACL set wadm_script to true.

The startup file contents would look like this:

set wadm_user admin
set wadm_password secret
set wadm_echo true
set wadm_verbose true
set wadm_host localhost
set wadm_port 8989
set wadm_ssl true
set wadm_script true

  1. To list all the variables in shell, run

    wadm> info vars
    wadm_echo argv wadm_histfile auto_execs auto_index errorInfo wadm_user wadm_ssl auto_oldpath wadm_script tcl_library errorCode wadm_verbose wadm_password argc wadm_port wadm_savehist wadm_mode tcl_patchLevel wadm_host tcljava tcl_platform env tcl_version tcl_interactive wadm_prompt argv0 auto_path
    wadm>

  1. To get Tcl and Jacl versions, do

    wadm> echo $tcl_version
    8.0
    wadm> package require java
    1.3.2
    wadm>

  1. In shell mode wadm also supports command completion using the tab key, command history and command editing.

  • wadm> list-

    list-acls list-auth-realm-userprops list-auth-realms
    list-authdb-userprops list-authdbs list-certs
    list-cgi-dirs list-cgi-envvars list-ciphers
    list-config-files list-configs list-crls
    list-custom-resource-userprops list-custom-resources list-dav-collections
    list-document-dirs list-error-pages list-events
    list-external-jndi-resource-userprops list-external-jndi-resources list-group-members
    list-groups list-http-listeners list-instances
    list-jdbc-resource-userprops list-jdbc-resources list-jvm-options
    list-jvm-profilers list-lifecycle-module-userprops list-lifecycle-modules
    list-locks list-mail-resources list-mime-types
    list-nodes list-org-units list-reverse-proxy-headers
    list-reverse-proxy-uris list-search-collections list-soap-auth-provider-userprops
    list-soap-auth-providers list-tokens list-uri-patterns
    list-url-redirects list-users list-virtual-servers
    list-webapps
    wadm> list-


  • The quickest way to get more info on any command are the man pages. Use wadm --help to get a list of commands.




    Comments:

    Post a Comment:
    • HTML Syntax: NOT allowed
    About

    yamini

    Search

    Top Tags
    Archives
    « April 2014
    SunMonTueWedThuFriSat
      
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
       
           
    Today