定制 deaduseful/openvz-client 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

deaduseful/openvz-client

最新稳定版本:0.0.2

Composer 安装命令:

composer require deaduseful/openvz-client

包简介

An OpenVz Client

README 文档

README

An OpenVz client using the ssh2 client.

Installation

composer require deaduseful/openvz-client

Prerequisites

If you wish to use the SSH Client, you will need the ssh2 extension installed. This is not required for the OpenVz Client itself, but is needed if you want to use the SSH functionality.

  • On Linux:
    yum install libssh2-devel
    pear config-set preferred_state beta
    pecl install ssh2
    pear config-set preferred_state stable

On Mac OS X:

    brew install libssh2
    pecl install ssh2-1.1.2

Usage

The server must have "PasswordAuthentication yes" set in the sshd_config.

OpenVz Client Usage

    $vz = new OpenVz/Client();
    print_r($vz->connect('server.domain.com', 'username', 'p4ssw0rd', 22));
    print_r($vz->su());
    print_r($vz->listvz());
    print_r($vz->listos());
    print_r($vz->exists('123'));
    print_r($vz->create('123', 'centos-4-i386-minimal', '192.168.50.51', 'n3wr00tp4ssw0rd'));
    print_r($vz->set('123', array('diskspace'=>'430209:433209', 'cpulimit'=>'20%')));
    print_r($vz->stop('123'));
    print_r($vz->start('123'));
    print_r($vz->restart('123'));
    print_r($vz->destroy('123'));

SSH Client usage

    $ssh = new Ssh/Client();
    $ssh->connect('host');
    $ssh->auth('user', 'password');
    $ssh->shellExecute('ps auxfc; ls');
    $ssh->disconnect();

About

A dead useful project for Phurix Web Hosting.

Copyright (c) 2004-2025 James Wade

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-08-22