How to create a Plesk Mirror

- by


When you deploy Plesk to various instances on your local network you can save the world (and yourself) from a lot of internet traffic by creating a local mirror.

This is a duplicate of the original installer files needed to deploy Plesk which are downloaded once and can then be used from a machine on your network – which makes the installation much faster. This used to be a bit of a pain, but thanks to a new knowledge base article – and Ivan Butorin for telling me about this – it’s become so much easier to do.

In this example I’ll set the mirror up on my NC10 netbook running CentOS 6.5.

Download the helper script

Parallels have provided a small utility which will take care of the heavy lifting for us. You can get it from the above mentioned KB article. Download it to your local machine like this:

cd mirrorctl

Now we can use the tool with ./mirrorctl

Add the ssh2 extension to PHP

If it was as easy as calling one file anyone could do it. Let’s make sure it gets much more complicated than it really needs to be!

The above script is written in PHP, and as we’ve learnt in a previous article we can run PHP scripts from the command line. That’s the good news.

The bad news is that the script requires the ssh2 extension which is available from this website and sadly not installed on CentOS by default. In fact what we have to do is

  • install a few additional packages
  • create ssh2 as a PECL extension
  • and add it to the php.ini file

Sound Chinese? Let’s try this! First we install some (very possibly) missing packages:

yum install php-devel openssl-devel make gcc

Next we’ll grab hold of libssh2 from here: You can find the latest version for your OS on that website. Let’s download it and compile it from source:

tar -zxvf libssh2-*
cd libssh2*
make install

That wasn’t everything… Now we need to grab the ssh2 component and do the same thing:

tar -zxvf ssh2
cd ssh2-*
./configure --with-ssh2
make install

If all this went without any error messages you should find a new extension here: /usr/lib/php/modules/ We need to add this to our PHP configuration file and add this extension to it:

vi /etc/php.ini

And Finally: work with the mirror tool

cd back into the mirrorctl directory and check if it works:

./mirrorctl show-all-releases
./mirrorctl os-list --release=PLESK_11_5_30

These commands will show you which versions are available (for example, PLESK_11_5_30), and in which flavours. The tool will show Linux distributions by default. Specify –win to display Windows flavours.

To configure the tool to build a local mirror for Plesk 11.5.3 on CentOS in 64bit you’d do this:

./mirrorctl cfg --add  --release=PLESK_11_5_30 --os=cos6_x86_64

Trying to add OS ‘cos6_x86_64’ into config file… ok

Run this command multiple times to add more configurations. Then to begin the monumental download, execute this:

mkdir /mirror
./mirrorctl update --path=/mirror

All files will be copied into /mirror. Obviously you need to specify a directory that’s available to the machine you’d like to install Plesk to. Run the same command to perform an incremental update of the entire mirror (updates will be much faster than the initial installation).

Installing Plesk from your local mirror

You can find an autoinstaller file for your system here: You can specify ‘–source server:/path’ as an option to specify your mirror. To install from the above example mirror, this is how we’d do it:

chmod +x ./plesk-installer
./plesk-installer --source root@

Happy mirroring!

Further Reading


If you enjoy my content, please consider supporting me on Ko-fi. In return you can browse this whole site without any pesky ads! More details here.

Leave a Comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.