Synopsis
ncs-VSN.OS.ARCH.installer.bin [--local-install] LocalInstallDir
ncs-VSN.OS.ARCH.installer.bin --system-install [--install-dir InstallDir] [--config-dir ConfigDir] [--run-dir RunDir] [--log-dir LogDir] [--run-as-user User] [--keep-ncs-setup] [--non-interactive]
DESCRIPTION
The NCS installation script can be invoked to do either a simple "local installation", which is convenient for test and development purposes, or a "system installation", suitable for deployment.
LOCAL INSTALLATION
[ --local-install ]LocalInstallDir-
When the NCS installation script is invoked with this option, or is given only the
LocalInstallDirargument, NCS will be installed in theLocalInstallDirdirectory only.
SYSTEM INSTALLATION
--system-install-
When the NCS installation script is invoked with this option, it will do a system installation that uses several different directories, in accordance with Unix/Linux application installation standards. The first time a system installation is done, the following actions are taken:
-
The directories described below are created and populated.
-
An init script for start of NCS at system boot is installed.
-
User profile scripts that set up
$PATHand other environment variables appropriately for NCS users are installed. -
A symbolic link that makes the installed version the currently active one is created (see the
--install-diroption).
-
[ --install-dirInstallDir]-
This is the directory where static files, primarily the code and libraries for the NCS daemon, are installed. The actual directory used for a given invocation of the installation script is
, allowing for coexistence of multiple installed versions. The currently active version is identified by a symbolic linkInstallDir/ncs-VSNpointing to one of theInstallDir/currentncs-VSNdirectories. If the--install-diroption is omitted,/opt/ncswill be used forInstallDir. [ --config-dirConfigDir]-
This directory is used for config files, e.g.
ncs.conf. If the--config-diroption is omitted,/etc/ncswill be used forConfigDir. [ --run-dirRunDir]-
This directory is used for run-time state files, such as the CDB data base and currently used packages. If the
--run-diroption is omitted,/var/opt/ncswill be used forRunDir. [ --log-dirLogDir]-
This directory is used for the different log files written by NCS. If the
--log-diroption is omitted,/var/log/ncswill be used forLogDir. [ --run-as-userUser]-
By default, the system installation will run NCS as the
rootuser. If a different user is given via this option, NCS will instead be run as that user. The user will be created if it does not already exist. This mode is only supported on Linux systems that have the setcap command, since it is needed to give NCS components the required capabilities for some aspects of the NCS functionality.When the option is used, the following executable files (assuming that the default
/opt/ncsis used for--install-dir) will be installed with elevated privileges:-
/opt/ncs/current/lib/ncs/lib/core/pam/priv/epam -
Setuid to root. This is typically needed for PAM authentication to work with a local password file. If PAM authentication is not used, or if the local PAM configuration does not require root privileges, the setuid-root privilege can be removed by using chmod u-s.
-
/opt/ncs/current/lib/ncs/erts/bin/ncs/opt/ncs/current/lib/ncs/erts/bin/ncs.smp -
Capability
cap_net_bind_service. One of these files (normallyncs.smp) will be used as the NCS daemon. The files have execute access restricted to the user given via--run-as-user. The capability is needed to allow the daemon to bind to ports below 1024 for northbound access, e.g. port 443 for HTTPS or port 830 for NETCONF over SSH. If this functionality is not needed, the capability can be removed by using setcap -r. -
/opt/ncs/current/lib/ncs/bin/ip -
Capability
cap_net_admin. This is a copy of the OS ip(8) command, with execute access restricted to the user given via--run-as-user. The program is not used by the core NCS daemon, but provided for packages that need to configure IP addresses on interfaces (such as thetailf-hccpackage). If no such packages are used, the file can be removed. -
/opt/ncs/current/lib/ncs/bin/arping -
Capability
cap_net_raw. This is a copy of the OS arping(8) command, with execute access restricted to the user given via--run-as-user. The program is not used by the core NCS daemon, but provided for packages that need to send gratuitous ARP requests (such as thetailf-hccpackage). If no such packages are used, the file can be removed.
Note
When the
--run-as-useroption is used, all OS commands executed by NCS will also run as the given user, rather than as the user specified in e.g. clispec(5) definitions for custom CLI commands. -
[ --keep-ncs-setup ]-
The ncs-setup command is not usable in a "system installation", and is therefore by default excluded from such an installation to avoid confusion. This option instructs the installation script to include ncs-setup in the installation despite this.
[ --non-interactive ]-
If this option is given, the installation script will proceed with potentially disruptive changes (e.g. modifying or removing existing files) without asking for confirmation.
Synopsis
ncs-uninstall --ncs-version [Version] [--install-dir InstallDir] [--non-interactive]
ncs-uninstall --all [--install-dir InstallDir] [--non-interactive]
DESCRIPTION
The ncs-uninstall command can be used to
remove part or all of an NCS "system installation", i.e. one that
was done with the --system-install option to the
NCS installer (see ncs-installer(1)).
OPTIONS
--ncs-version [Version]-
Removes the installation of static files for NCS version
Version. I.e. the directory tree rooted atwill be removed. TheInstallDir/ncs-VersionVersionargument may also be given as the filename or pathname of the installation directory, or, unless--non-interactiveis given, omitted completely in which case the command will offer selection from the installed versions. --all-
Completely removes the NCS installation. I.e. the whole directory tree rooted at
InstallDir, as well as the directories for config files (option--config-dirto the installer), run-time state files (option--run-dirto the installer), and log files (option--log-dirto the installer), and also the init script and user profile scripts. [ --install-dirInstallDir]-
Specifies the directory for installation of NCS static files, like the
--install-diroption to the installer. If this option is omitted,/opt/ncswill be used forInstallDir. [ --non-interactive ]-
If this option is used, removal will proceed without asking for confirmation.