OceanStor Dorado 6.0.1 高级运维命令参考

rst_svc_ctl.sh

rst_svc_ctl.sh

命令功能

rst_svc_ctl.sh命令用于配置和控制REST服务。

命令格式

rst_svc_ctl.sh host -a xxx

rst_svc_ctl.sh host -r xxx

rst_svc_ctl.sh host -d

rst_svc_ctl.sh host -h

rst_svc_ctl.sh host -c

rst_svc_ctl.sh -h

rst_svc_ctl.sh options -r

rst_svc_ctl.sh options -d

rst_svc_ctl.sh options -h

rst_svc_ctl.sh nosniff -a

rst_svc_ctl.sh nosniff -r

rst_svc_ctl.sh nosniff -h

参数说明

参数

参数说明

取值

type 配置的REST服务类型。

支持类型如下:

host,options。

-h 查询帮助信息。

-

host -a [ip_addr | domain_nm] 添加主机IP地址或域名到白名单。

合法的IPv4或者IPv6地址或者域名。

host -r [ip_addr | domain_nm] 删除白名单IP地址或域名。

合法的IPv4或者IPv6地址或者域名。

host -d 查询当前白名单列表。

-

host -c 清除当前主机白名单,并且关闭主机白名单功能。

-

options -r 从Apache服务器恢复OPTIONS和POST选项。

-

options -d 从Apache服务器删除OPTIONS和POST选项。

-

nosniff -a 从Apache服务器配置增加nosniff选项。

-

nosniff -r 从Apache服务器删除nosniff选项。

-

模式

最小模式

使用指南

REST服务配置和控制接口,请在技术工程师指导下使用。

使用实例

  • 查询帮助信息。

    Storage: minisystem> rst_svc_ctl.sh -h
    rst_svc_ctl.sh  obj [-h] | [-d] | [-ar ip_addr] : manage apache white ip list.
        obj: host,options,nosniff
        -h,                    show help info.
        -a host,               add ip_addr or host_name into apache white ip list.
                               under nosniff subtype, add nosniff into the apache configuration.
        -r host,               under host subtype, remove ip_addr or host_name from apache white ip list.
                               under options subtype, restore the OPTIONS and POST option of the apache server.
                               under nosniff subtype, removes nosniff from the apache configuration.
        -d,                    under host subtype, display current ip list.
                               under options subtype , delete OPTIONS and POST option of the apache server.
        -c,                    clear host white list and disable this function.
  • 从Apache服务器配置增加nosniff选项。

    Storage: minisystem> rst_svc_ctl.sh nosniff -a
    DANGER: You are about to configure the nosniff options of the Apache server. After the configuration, you will disable the MIME sniffing function of the web browser. This operation will restart DeviceManager and disconnect all existing connections.
    Suggestion: 1.Confirm that you want to configure the nosniff options of the Apache server.2. Ensure that no connection is set up, or the disconnection does not affect services.
    Have you read danger alert message carefully?(y/n)
    y
    Are you sure you really want to perform the operation?(y/n)
    y
    add nosniff success.
  • 从Apache服务器删除nosniff选项。

    Storage: minisystem> rst_svc_ctl.sh nosniff -r
    DANGER: You are about to delete the nosniff options of the Apache server. After the deletion, the MIME sniffing service of the web browser will be restored. This operation will restart DeviceManager and disconnect all existing connections.
    Suggestion: 1.Confirm that you want to delete the nosniff options of the Apache server.2. Ensure that no connection is set up, or the disconnection does not affect services.
    Have you read danger alert message carefully?(y/n)
    y
    Are you sure you really want to perform the operation?(y/n)
    y
    remove nosniff success.
  • 添加主机IP地址或域名进白名单。

    Storage: minisystem> rst_svc_ctl.sh host -a 10.18.18.18
    DANGER: You are about to add an IP address or domain name to the apache host whitelist. If you add the IP address or domain name for the first time, the whitelist function will be enabled. After the IP address or domain name is added, only the IP addresses or domain names in the list can be accessed. This operation will restart the DeviceManager, and the existing connections will be disconnected.
    Suggestion: 1. Confirm that you want to enable the apache host whitelist function. 2. Ensure that no connection is set up, or the disconnection does not affect services. 3. Ensure that the added IP address or domain name is correct and accessible.
    Have you read danger alert message carefully?(y/n)
    y
    Are you sure you really want to perform the operation?(y/n)
    y
    add host address success.
  • 删除白名单主机IP地址或域名。

    Storage: minisystem> rst_svc_ctl.sh host -r 10.18.18.18
    DANGER: You are about to delete the IP address or domain name from the apache host whitelist. The deleted IP address or domain name will be inaccessible. After the last record in the whitelist is deleted, the whitelist function will be disabled and all IP addresses and domain names can be accessed. This operation will restart the DeviceManager and all existing connections will be disconnected.
    Suggestion: 1. Ensure that the deleted IP address or domain name is inaccessible. 2. If the last whitelist record is deleted, ensure that disabling the apache whitelist function does not affect services. 3. Ensure that no connection is set up, or the disconnection does not affect services.
    Have you read danger alert message carefully?(y/n)
    y
    Are you sure you really want to perform the operation?(y/n)
    y
    remove host address success.
  • 查询当前白名单列表。

    Storage: minisystem> rst_svc_ctl.sh host -d
    10.46.6.112 1
    10.46.6.112:8088 1
    10.12.12.12 1
    10.12.12.12:8088 1
    10.12.12.14 1
    10.12.12.14:8088 1
    www.baidu.com 1
    www.baidu.com:8088 1
  • 清除主机白名单文件,关闭白名单功能。

    Storage: minisystem> rst_svc_ctl.sh host -c
    clear host address and disable white list function success.
  • 从apache服务器中恢复OPTIONS和POST选项。

     Storage: minisystem> rst_svc_ctl.sh options -r
    DANGER: You are about to restore the OPTIONS and POST options of the Apache server. This operation will restart DeviceManager and disconnect all existing connections.
    Suggestion: Ensure that no connection is set up, or the disconnection does not affect services.
    Have you read danger alert message carefully?(y/n)
    y
    Are you sure you really want to perform the operation?(y/n)
    y
    recover options success.
  • 从apache服务器删除OPTIONS和POST选项。

    Storage: minisystem> rst_svc_ctl.sh options -d
    DANGER: You are about to delete the OPTIONS and POST options of the Apache server. After the deletion, you cannot use POST and OPTIONS to access the static files of the REST service. This operation will restart DeviceManager and disconnect all existing connections.
    Suggestion: 1.Confirm that you want to delete the OPTIONS and POST options of the Apache server.2. Ensure that no connection is set up, or the disconnection does not affect services.
    Have you read danger alert message carefully?(y/n)
    y
    Are you sure you really want to perform the operation?(y/n)
    y
    delete options success.

输出说明

无。

收藏
下载文档
更新时间:2021-11-26
文档编号:EDOC1100135735
浏览量:322056
下载量:242
平均得分:0.0