Installation on Virtuozzo containers for Linux

Deploying Plesk in a Virtuozzo containers environment implies the following two stages:

  1. Installing the Plesk application template on a hardware node.
  2. Creating a Container and deploying the application from the template.

For further details on Virtuozzo containers CLI, or the Virtuozzo containers API (XML or SOAP) functionality, refer to the Virtuozzo containers developer documentation.

The first stage is performed on each hardware node only once: As soon as an application template is installed on a hardware node, it can be deployed to as many Containers as required. Instead of creating a new Container every time you need to deploy a Container with Plesk, you can clone an existing Container where Plesk is installed, which acts as a sort of Template Container.

When the template is being installed on a hardware node, the core set of files is deployed, which includes defining of the application packages repository. Then, when the application is installed in a container, Virtuozzo containers communicates with the repository (the default one resides at http://installer.plesk.com), retrieves the application packages, and installs them in the container. The packages are stored in the node cache until it is cleaned up, and then the packages are retrieved from the repository again when the application is installed in the Container.To save time and bandwidth, you may want to use a custom mirror of Plesk repository. For details, see Appendix C: Mirroring Plesk updates Server.

 

To install a Plesk template on a Virtuozzo containers hardware node using the vzup2date utility:

  1. Connect to the target Virtuozzo containers hardware node over SSH.
  2. Install the application template by running a command in the following format:

    vzup2date -z

  3. Select the required operating system and application templates and click Next to start installation.

Note: On Virtuozzo (former Cloud Server), the vzup2date utility is deprecated. You should use yum instead.

To install a Plesk template on a Virtuozzo containers hardware node manually:

  1. Obtain the template from the Virtuozzo website and upload it to the target Virtuozzo containers hardware node.
  2. Install the application template by running a command in the following format:

    rpm -Uvh <absolute path to the template>

For example, the following command installs Qmail:

rpm -Uvh pp11.5-centos-5-x86_64-ez-3.0.0-35.prl.293476.noarch.rpm

To use a custom mirror:

  1. Set up a mirror as explained in the section Appendix C: Mirroring Plesk updates Server.
  2. On the hardware node, edit the file defining the repository URL.

    The file for editing is /vz/template/<os>/<os-version>/<platform>/config/app/<app-template-name>/default/repositories. For example: /vz/template/<os>/<os-version>/<platform>/config/app/pp10/default/repositories.

  3. Replace the Plesk updates server URLs with the corresponding ones of your mirror and save the file.
  4. Clean or re-fetch the packages metadata.

    You can do this, for example, with the vzpkg clean command. For details, refer to the Virtuozzo containers for Linux Reference Guide located at https://virtuozzo.com/support/.

To create a Container and install Plesk to it:

  1. Create a container and configure it.

    Issue the following commands:

    vzctl create <CTID> [options]

    vzctl set <CTID> <setting_name> <value> [--save]

    where

    • <CTID> defines an arbitrary container ID number higher than 100, which is unique on the hardware node
    • --save switch tells vzctl whether to save changes into the Container configuration file

      Note: For details on the Container creation and configuration options, refer to the Virtuozzo Containers for Linux Reference Guide located at https://virtuozzo.com/support/.

    The commands below do the following:

    1. Create a Container with ID 444 and IP 10.100.1.2, based on the Debian 5 operating system template.
    2. Set a barrier and limit for unswappable kernel memory, private (or potentially private) memory, number of files opened by all Container processes, disk space and the total number of disk inodes (files, directories, symbolic links) a Container can allocate.
    3. Save the barrier/limit values to the Container configuration file.
    4. Enable Power Panel on the vzpp port with the "--offline_management yes --offline_service vzpp" options.

      # vzctl create 444 --ostemplate debian-5.0-x86_64

      # vzctl set 444 --ipadd 10.100.1.2 --hostname example.com --save

      # vzctl set 444 --save --kmemsize 24299200:26429120 --privvmpages 362144:392912 --numfile
      12000:12000 --diskspace 5117880:5242880 --diskinodes 350000:370000

      # vzctl set 444 --save --offline_management yes --offline_service vzpp

      Important: It is mandatory to use exactly these values for the options to ensure the Plesk compatibility with the Virtuozzo environment.

 

Important: Plesk needs the container to be configured with an IPv4 address in order to work properly.

  1. Start the newly created Container:

    # vzctl start <CTID>

  2. Install the Plesk template into the container:
    • with EZ templates:

      vzpkg install <CTID> <ppp_template_name> ...

      For example, the following command installs the Plesk base components, BIND DNS server, and Kaspersky Antivirus:

      # vzpkg install 444 pp11.5 pp11.5-bind pp11.5-kav

Note: During installation of templates, you must specify the template of the mail server that you want to use. It can be pp12-qmail, pp12-postfix, or pp12-msmtp (if you do not want to install a mail server with Plesk).

To clone a Container:

Issue a command in the following format:

vzmlocal -C {CT List}
{CT List} = <em><source_CTID></em>:<em><dst_CTID></em>[:[<em><dstCT_private></em>][:<em><dstCT_root></em>]] [...]

You should specify the source Container ID (<source_CTID>) and the destination Container ID (<dst_CTID>). Specifying the destination Container private area path (<dstCT_private>) and root path (<dstCT_root>) is optional allowing you to override the default paths - /vz/private/<dst_CTID> and /vz/root/<dst_CTID>, respectively. For details on the command options, refer to the Virtuozzo Containers for Linux Reference Guide located at https://virtuozzo.com/support/.

For example, to clone the Container with Plesk created during the previous procedure, run the following command:

# vzmlocal -C 444:445
 

Leave your comments on this page

Leave your feedback or question on this documentation topic below. For technical assistance, contact your hosting service provider or submit a request to Plesk support. Suggest new features for Plesk here. Discuss general questions on the Plesk forum. All offtopic comments will be removed.