It`s quite easy to determine it:
- Code: Select all
wget -N http://httpupdate.cpanel.net/latest
head latest
#!/bin/sh
# This script was generated using Makeself 2.1.3
...
label="Cpanel & WHM Installer"
...
So, "latest" cPanel installer is just self-extractable tar.gz archive from a directory. Let`s view built-in makeself metadata/info:
- Code: Select all
# sh latest --help
Makeself version 2.1.3
1) Getting help or info about latest :
latest --help Print this message
latest --info Print embedded info : title, default target directory, embedded script ...
latest --version Display the installer version
latest --lsm Print embedded lsm entry (or no LSM)
latest --list Print the list of files in the archive
latest --check Checks integrity of the archive
2) Running latest :
latest [options] [--] [additional arguments to embedded script]
with following options (in that order)
--confirm Ask before running embedded script
--noexec Do not run embedded script
--keep Do not erase target directory after running
the embedded script
--nox11 Do not spawn an xterm
--nochown Do not give the extracted files to the current user
--target NewDirectory Extract in NewDirectory
--tar arg1 [arg2 ...] Access the contents of the archive through the tar command
-- Following arguments will be passed to the embedded script
And, for example, embedded info:
- Code: Select all
# sh latest --info
Installer Version: v00016
Installer Revision: cd0e5c998da04fab845f7e0d6e0983dc837b3336
Identification: Cpanel & WHM Installer
Target directory: installd
Uncompressed size: 180 KB
Compression: gzip
Date of packaging: Fri Sep 30 16:41:36 CDT 2011
Built with Makeself version 2.1.3 on linux-gnu
Build command was: utils/makeself installd latest Cpanel & WHM Installer ./bootstrap
Script run after extraction:
./bootstrap
directory installd is permanent
Unpack the content and prevent further execution of an embedded script after extraction:
- Code: Select all
# sh latest --noexec --target latest_unpacked
Creating directory latest_unpacked
Verifying archive integrity... All good.
Uncompressing Cpanel & WHM Installer.............
View result directory 'latest_unpacked' content:
- Code: Select all
# ls -1 latest_unpacked
access.conf
bashrc
blank
bootstrap
bootstrap-dnsonly
fixconf.pl
install
installlogo
issue
issue.net
motd
RpmUtils.pm
VERSION
Install script is a plain text readable perl script:
- Code: Select all
# file latest_unpacked/install
latest_unpacked/install: a /usr/bin/perl script, ASCII text executable
Among basic routine tasks I found couple of interesting (for me) points. Namely, cPanel install script will look for custom EasyApache yaml profile first /etc/cp_easyapache_profile.yaml and will use it during the initial Apache/PHP compilation. Great news, because one can avoid additional run of EasyApache script with desired profile after "sh latest" and save tens of minutes.