Previous Topic

Next Topic

Book Contents

Setting Up Mirrors

To set up a mirror:

  1. Download the Auto-installer utility that suits your operating system from http://www.swsoft.com/en/download/plesk8/ and save it on your server's hard drive.

    The utility is a binary file named as follows: psa_installer_v<auto-installer version>_os_<operating system version>_<platform>. If you have Plesk installed on the server, you can use the autoinstaller binary file, which is stored in the directory /usr/local/psa/admin/bin/ on RPM-based Linux and FreeBSD systems, and /opt/psa/admin/bin/ on deb-based Linux systems.

  2. Choose a host where you want to set up a mirror.

    You can use any of your existing domains, or create a new domain specifically for that purpose. Let's assume you will use the domain updates.example.com.

    1. Choose the directory within the virtual host where the auto-installer will store packages and other required files. Let's assume this will be the root directory of the virtual host.
    2. Find out the absolute path to this directory.

      Look up the value of the 'HTTPD_VHOSTS_D' variable in the /etc/psa/psa.conf file. This variable stores the path to the location of virtual hosts. Let's assume that this will be the /var/www/vhosts/ directory.

      Within the /var/www/vhosts/ directory, there are subdirectories for each domain. The names of those subdirectories coincide with names of existing domains. In our example we will have the following path to the virtual host: /var/www/vhosts/updates.example.com/.

      All documents available via HTTP protocol are stored in the 'httpdocs' subdirectory within the virtual host.

      Therefore the absolute path to the directory where the updates will reside will be
      /var/www/vhosts/updates.example.com/httpdocs/.

  3. Set up the mirror.

    As you probably will not need a copy of all contents of the official Plesk update server, you should choose what Plesk versions for what operating systems you want to mirror. To obtain a list of available product versions:

    1. Run the auto-installer with the following options:

      autoinstaller --show-all-releases

      A list of product versions will be displayed:

      PLESK_7_5_4 (Plesk 7.5.4)

      PLESK_7_5_5 (Plesk 7.5.5)

      PLESK_8 (Plesk 8)

      Release identifiers are shown on the left, and release names are given in brackets. You will need to use these identifiers when working with the auto-installer through command line.

    2. Once you have decided which Plesk version to mirror, you need to choose the operating systems for which you want to obtain packages. To retrieve a list of operating systems supported by the Plesk version of your choice, you should run auto-installer with the following options:

      autoinstaller --select-release-id <release ID> --show-os-list

      A list of operating systems will show operating system names, their versions and identifiers:

      FreeBSD 5.2.1: plesk_7.1.7_fr5.2.1.inf

      FedoraCore Linux 1: plesk_7.1.7_fc1.inf

      FedoraCore Linux 2: plesk_7.1.7_fc2.inf

      SuSE Linux 9.0: plesk_7.1.7_suse9.0.inf

      For instance, plesk_7.1.7_fc2.inf is the identifier of Fedora Core Linux 2 operating system. You will need to use these identifiers when you run auto-installer for downloading packages to the local mirror.

    3. Now that you have decided which Plesk versions to mirror, run the auto-installer in order to download packages.

      For instance, if you wish to set up a mirror for Plesk 7.1.7 for Fedora Core 2 and Plesk 8.0 for Fedora Core 1 and Fedora Core 2, run the following command:

      autoinstaller --select-release-id PLESK_7_1_7
      --mirror-os plesk_7.1.7_fc2.inf
      --select-
      release-id PLESK_8_0
      --mirror-os
      plesk_8.0.0_fc1.inf
      --mirror-os
      plesk_8.0.0_fc2.inf
      --target
      /var/www/vhosts/updates.example.com/httpdocs/

      Note that when specifying several Plesk versions, the following sequence of options should be preserved:

      --release id 1 --mirror-os 1 --release id 2 -- mirror-os 2

      The '--target' option points to the directory where package files are stored. This is the directory within a virtual host that you selected at the step 2.

      Note: All releases and operating systems should be specified in a single command line.

    4. To have the contents of the mirror site automatically updated, you should create a cron job and specify the auto-installer execution command there. The cron task should be added to the crontab of the respective FTP user (see the respective section of Plesk Administrator's Manual).
    5. Now, to use this mirror during installation or upgrade, you should configure the Auto Updater through Plesk control panel or command line: select the 'Network Server' option, and specify the URL of the mirror. In our example, this would be http://updates.example.com/.