Remote Installation through PowerShell
To install NCache remotely, you need to use the PowerShell script installNCache.ps1 shipped with NCache. This is located at %NCHOME%/Integrations/PowerShell.
Pre-requisites:
- All remote machines must be logged in as Administrator.
- The NCache setup MSI file must be placed in the same location on all remote machines.
To remote install NCache, do the following:
From the machine from where you’re installing NCache remotely, search for Windows PowerShell and select Run as Administrator.
Go to the directory %NCHOME%/Integrations/PowerShell.
Execute either of the following commands, modifying the values according to your environment. Note that these examples install Cache Server edition with credentials for John Smith. It is assumed that the NCache setup MSI file is available on D:/ drive root of all remote machines and also that NCache is to be installed on the default path C:/Program Files.
- Single Server Installation
This example installs NCache Cache Server edition on remote machine 20.200.20.29. Please replace the server IP
20.200.20.29
with your own remote machine IP../installNCache.ps1 /e 0 /k XXXXXXXXXXXXXXXXX /file "ncache.ent.x64.msi" /file-path "D:\" /f "John" /l "Smith" /email "john@alachisoft.com" /c "Alachisoft" /s 20.200.20.29
- Multiple Server Installation
This example installs NCache Cache Server edition on three machines (20.200.20.29,20.200.20.30 and 20.200.20.31). Please replace these servers IPs with your own remote cache server machine IPs.
./installNCache.ps1 /e 0 /k XXXXXXXXXXXXXXXXX /file "ncache.ent.x64.msi" /file-path "D:\" /f "John" /l "Smith" /email "john@alachisoft.com" /c "Alachisoft" /s 20.200.20.29,20.200.20.30,20.200.20.31
Upon successful installation you will see a message with
Return Value:0
.
Note for Silent Mode Installation
NCache installation requires an installation of Microsoft Visual C++ 2010 x64 Redistributable as a pre-requisite. However, there are some cases where command line and PowerShell installation in quiet mode results in the redistributable not being downloaded.
Hence, as a precaution, it is highly recommended that the following PowerShell script is executed BEFORE INSTALLATION in quiet mode to download and install the redistributable package according to the operating system detected:
# VCRedist check and download
if([Environment]::Is64BitOperatingSystem)
{
Write-Host "64-Bit OS Detected"
$regEntry = Test-Path Registry::HKLM\SOFTWARE\\Classes\\Installer\\Products\\1926E8D15D0BCE53481466615F760A7F
$url =
"https://download.microsoft.com/download/3/2/2/3224B87F-CFA0-4E70-BDA3-3DE650EFEBA5/vcredist_x64.exe"
vcRed = "vcredist_x64.exe"
# Checking if vcredist_x64 is installed on this machine
if($regEntry -eq 0)
{
# If no installation found download visual c++ redistributable
write-host "Microsoft Visual C++ 2010 x64 Redistributable NOT Found"
write-host "Downloading from $url"
$vcredistPath = "$ENV:temp\$vcRed"
(New-Object System.Net.WebClient).DownloadFile($url, $vcredistPath)
write-host "Download Complete"
# Installing vcredist_x64
write-host "Installing Microsoft Visual C++ 2010 x64 Redistributable"
start-process -Wait $vcredistPath -ArgumentList "/norestart /q"
write-host "Installation Complete"
}
else
{
write-host "Microsoft Visual C++ 2010 x64 Redistributable is already installed on this computer."
}
}
$regEntry = Test-Path
Registry::HKLM\\SOFTWARE\\Classes\\Installer\\Products\\1D5E3C0FEDA1E123187686FED06E995A
$url =
"https://download.microsoft.com/download/5/B/C/5BC5DBB3-652D-4DCE-B14A-475AB85EEF6E/vcredist_x86.exe"
$vcRed = "vcredist_x32.exe"
# Checking if vcredist_x32 is installed on this machine
if($regEntry -eq 0)
{
# If no installation found download visual c++ redistributable
write-host "Microsoft Visual C++ 2010 x32 Redistributable NOT Found"
write-host "Downloading from $url"
$vcredistPath = "$ENV:temp\$vcRed"
(New-Object System.Net.WebClient).DownloadFile($url, $vcredistPath)
write-host "Download Complete"
# Installing vcredist_x32
write-host "Installing Microsoft Visual C++ 2010 x32 Redistributable"
start-process -Wait $vcredistPath -ArgumentList "/norestart /q"
write-host "Installation Complete"
}
else
{
write-host "Microsoft Visual C++ 2010 x32 Redistributable is already installed
on this computer."
}
You can now proceed to install NCache in silent mode.
Remote Installation Properties
Argument | Description |
---|---|
/file |
Allows the user to specify the name of the setup file along with the file extension. |
/file-path |
Allows the user to specify the complete file-path/file-location of the setup file. |
/k |
Allows the user to specify a valid license key. |
/servers |
Allows the user to specify a comma separated list of Server Names or IP Addresses of machines where NCache is going to be installed. |
/f |
Allows the user to specify first name. |
/l |
Allows the user to specify last name. |
/e |
Allows the user to specify the NCache installation edition. • 0 : Cache Server installation • 2 : Developer installation • 3 : Remote Client installation |
Default is 0 . |
|
/email |
Allows the user to specify the email address. |
/company |
Allows the user to specify the company name. |
/install-dir |
Allows the user to specify the path where to install NCache. Default is "C:/Program Files". |
/set-per |
Allows the user to specify the permissions for quite mode. Default is 1. |
/? |
Displays command syntax and options for the utility. |
Evaluation and Trial License
NCache Enterprise comes with all features during the initial evaluation period of 30 days. However, it has a built-in performance limitation (max 200 requests/sec per cache per server) and amount of activity limitation (total 500,000 requests before a cache restart is required).
You can remove these limitations from NCache Enterprise by requesting a FREE 60-day Trial License Key and activating all the cache servers with it. This Trial License is extendible for 30 days upon each additional request.
Upon purchase of NCache Enterprise, the purchased license key also removes all these limitations.