Question
What is Plesk Mirror Setup Tool v3.1.4 and how to use it?
Answer
Plesk Mirror Setup Tool can be used if it is required to have a local Plesk repository (mirror) for use in an internal network environment.
A mirror - is a website 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
SOURCE
variable of the /root/.autoinstallerrc or C:.autoinstallerrc file on the machine where autoinstaller is launched;# 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 a 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.
Below are the instructions on how to use the tool and typical scenarios:
-
Prerequisites:
-
Each Plesk for Linux version requires around 500MB of free disk. For Windows, it's 4GB.
-
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 the option
+FollowSymLinks
set; -
Unless the other sources are specified,
rsync://rsync.autoinstall.plesk.com/autoinstall
andrsync://ch.origin.autoinstall-win.plesk.com/autoinstall
for Plesk Windows must be accessible from the machine, where the script is being run, and from the destination machine; -
PHP must be compiled with the 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 -
AlmaLinux:
# dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
# pecl install -f https://pecl.php.net/get/ssh2-1.1.2.tgz
-
-
When all the prerequisites are met download the tool using…