Symptoms
It is required to have a local Plesk repository (mirror) for use in an internal network environment.
A mirror – is a web site available via HTTP, which can be used as a source for installing/upgrading Plesk family products using autoinstaller. A mirror can be used in either of the following ways:
- by changing DNS resolving and setting up the mirror web host so that http://autoinstall.plesk.com (for Plesk Linux) or http://autoinstall-win.plesk.com/ (for Windows) would point to the mirror;
-
by specifying the URL to the mirror in the
variable of the /root/.autoinstallerrc or C:.autoinstallerrc file on the machine where autoinstaller is launched;
SOURCE
# SOURCE=http://uri.of.local.mirror/here/
-
by specifying the mirror URL in the –source option when launching autoinstaller in interactive mode.
The main feature set of the Mirror Setup Tool allows providers to manage selected Plesk versions and operating systems.The tool also offers an interface for managing pre-launch testing of upcoming Plesk releases.
The tool should be launched on Linux system. The mirror (rsync) can be running on Linux or Windows systems.
Please feel free to discuss the tool in the special thread on the Plesk Forum .
Note: Plesk Windows and Plesk Linux mirrors CAN NOT be located in the same folders. Mirrors MUST be created in separate paths.
Note: If after following this guide, an update/upgrade of Plesk using this new mirror shows any error like “The requested URL returned error: 404 Not Found”, it’s required to re-synchronize the mirror again as such file is missing.
Prerequisites:
- Virtual host used for mirroring should have all script handlers (php, pl, cgi, py, fcgi etc) disabled;
- Virtual host or directory used for mirroring should have option
set;
+FollowSymLinks
- Unless the other sources are specified,
and
rsync://rsync.autoinstall.plesk.com/autoinstall
for Plesk Windows must be accessible from the machine, where the script is being run, and from the destination machine;
rsync://autoinstall-win.plesk.com/autoinstall
-
PHP must be compiled with support of the below extensions on the machine, where the script is being run (see http://www.php.net/manual/en/ssh2.installation.php ):
- ssh2_connect
- simplexml
- XML DOM
Below are sample instructions on compiling PHP with the required extensions (they can be different depending on the operating system version):
CentOS 7 :
# yum install gcc php-devel php-pear libssh2 libssh2-devel make
# pecl install -f ssh2
# echo extension=ssh2.so > /etc/php.d/ssh2.ini
# service httpd restart
# php -m | grep ssh2
Ubuntu 16
# apt-get install libssh2-php php5-cli
Resolution
Download the tool using the following link: mirrorctlv3.1.1.zip .
Note: Plesk Onyx mirrors are available since version 3.1.1 of the utility. Make sure you are using the latest version from this article.
User Interface (Syntax)
Note: for Plesk for Windows mirroring specify
option for all commands used (see below);Use separate configuration files for Plesk Windows and Plesk Linux mirrors.If the below descriptions are not clear, try reading the “Use Case Examples” section below.
--win
Options for working…