你的位置:国外/美国服务器租用 技术文档 Virtualmin使用教程 正文
Virtualmin命令行的用法,如何在ssh里用命令行删除网站?
  • Virtualmin命令行的用法如下, 在linux中使用命令 virtualmin --help 可查看基本用法。 如何在ssh里用命令行批量删除网站?范例:virtualmin delete-domain --domain ctohome.com --domain ctohome.com --domain ctohome.com

    Virtualmin命令行详细用法如下
    usage: /usr/sbin/virtualmin <command> [args..]
       or: /usr/sbin/virtualmin help <command>

    Available commands :

    Backup and restore
    ------------------
    backup-domain            Backup one or more virtual servers
    list-scheduled-backups   Outputs a list of scheduled backups
    restore-domain           Restore one or more virtual servers

    Virtual servers
    ---------------
    clone-domain             Duplicates an existing virtual server with a new name.
    create-domain            Create a virtual server
    delete-domain            Delete one or more virtual servers.
    disable-domain           Temporarily disable a virtual server
    enable-domain            Re-enable one virtual server
    migrate-domain           Imports a virtual server from some other product
    modify-domain            Change parameters of a virtual server
    move-domain              Change the owner of a virtual server
    unalias-domain           Convert an alias domain into a sub-server.
    unsub-domain             Convert a sub-domain into a sub-server.
    list-domains             Lists all virtual servers.
    notify-domains           Send email to some or all virtual server owners.
    validate-domains         Check the configuration of virtual servers
    enable-feature           Turn on some features for a virtual server
    disable-feature          Turn off some features for a virtual server
    modify-dns               Change DNS settings for virtual servers
    modify-spam              Change spam filtering and delivery settings for a
                             virtual server
    modify-web               Change a virtual server's web configuration
    modify-mail              Change mail-related settings for some domains
    resend-email             Re-send the signup email for a domain

    Mail and FTP users
    ------------------
    create-user              Create a mail, FTP or database user
    delete-user              Delete a mail, FTP or database user
    modify-database-user     Changes the MySQL or PostgreSQL login for some domain.
    modify-user              Change attributes of a mail, FTP or database user
    list-users               List users in a virtual server
    list-available-shells    List all shells for use with domain owners and
                             mailboxes
    list-mailbox             Dump inbox email for one user

    Mail aliases
    ------------
    create-alias             Create a new mail alias
    create-simple-alias      Adds a mail alias to some domain, with simple
                             parameters
    delete-alias             Delete a mail alias
    list-aliases             List aliases for a virtual server
    list-simple-aliases      Lists mail aliases in a simple format for some domain

    Server owner limits
    -------------------
    disable-limit            Removes access to some feature or edit capability for
                             some virtual servers
    enable-limit             Grants access to some feature or edit capability for
                             some virtual servers
    modify-limits            Changes the owner limits for some virtual server

    Extra administrators
    --------------------
    delete-admin             Deletes an extra administrator from a virtual server

    Custom fields
    -------------
    list-custom              List custom fields for virtual servers
    modify-custom            Modify custom fields for a virtual server

    Databases
    ---------
    create-database          Creates a database for a virtual server
    delete-database          Deletes one database
    disconnect-database      Removes a database from the control of a virtual
                             server.
    import-database          Adds an existing database to a virtual server
    list-databases           Lists databases for some virtual server
    modify-database-hosts    Adds or removes an allowed MySQL host for some or all
                             domains

    Script installers
    -----------------
    install-script           Install one third-party script
    delete-script            Un-install one script from a virtual server
    list-scripts             Display script installed into some virtual server
    list-available-scripts   List known scripts

    PHP versions
    ------------
    delete-php-directory     Remove any custom version of PHP for some directory
    set-php-directory        Set the version of PHP to run in some directory
    list-php-directories     List all directories in which a specific version of PHP
                             has been activated

    SSL certificates
    ----------------
    list-certs               Output the certificates for some or all virtual
                             servers.
    generate-cert            Generate a new self-signed cert or CSR for a virtual
                             server.
    install-cert             Replace the SSL certificate or private key for a
                             virtual server.

    Virtual server templates
    ------------------------
    create-template          Creates a template for use by new domains.
    delete-template          Removes one virtual server template.
    get-template             Outputs all settings in a template.
    modify-template          Changes one or more settings in a template.
    list-templates           List available templates for new domains

    Account plans
    -------------
    create-plan              Creates a new account plan for use with virtual
                             servers.
    delete-plan              Removes one existing account plan.
    modify-plan              Modifies an existing account plan for use with virtual
                             servers.
    list-plans               List available account plans for new domains

    Other scripts
    -------------
    change-password          Changes the password of some Virtualmin user.
    check-config             Run the Virtualmin config check
    copy-mailbox             Copy mail from one location to another, perhaps
                             converting formats.
    create-redirect          Adds a web redirect or alias to some domain
    create-shared-address    Adds an IP address for use by multiple virtual servers
    delete-redirect          Removes a web redirect or alias from some domain
    delete-shared-address    Removes an IP address that can be used by virtual
                             servers
    disable-writelogs        Disable logging via program
    enable-writelogs         Enable logging via program
    get-command              Show information about some command.
    get-dns                  Output all DNS records for a domain.
    get-ssl                  Output SSL certificate information for a domain.
    info                     Show general information about this Virtualmin system.
    list-backup-logs         Outputs a list of backups that have been run.
    list-bandwidth           Shows bandwidth usage for some domain over a date range
    list-commands            Lists API scripts available
    list-features            Lists features available when creating a domain
    list-php-ini             Show PHP variables for some or all domains.
    list-redirects           Lists web redirects and aliases in some domain
    list-shared-addresses    Lists shared IP addresses for virtual servers
    lookup-domain-daemon     A background process for looking up user details.
    modify-database-pass     Changes the MySQL or PostgreSQL password for some
                             domain.
    modify-php-ini           Changes PHP variables for some or all domains.
    run-all-webalizer        Run Webalizer reports for all virtual servers
    set-global-feature       Turns on or off some Virtualmin feature or plugin
                             globally.
    set-spam                 Change the spam and virus scanners for all domains
    test-imap                Checks if IMAP login to some server works.
    test-pop3                Checks if POP3 login to some server works.
    test-smtp                Checks if the mail server can RCPT to some address

     

    批量修改网站为mod php的命令行范例:

    修改单个网站:

    virtualmin modify-web --domain ctohome.com --mode mod_php"

    列出所有域名 :

    virtualmin list-domains --with-feature web --name-only

    组合命令行 :

    for dom in `virtualmin list-domains --with-feature web --name-only`; do
      virtualmin modify-web --domain $dom --mode mod_php
    done

  • 点这里复制本页地址发送给您QQ/MSN上的好友
  • 相关文章
  • 本文章所属分类:首页 技术文档 Virtualmin使用教程