Preparing for Manual On-premises Installation Using sudo
Applies only to manual On-premises installations.
If you choose to run the Installer as a sudo (non-root) user, the root user must first grant the sudo user installation permission. The sudo user must have permission to execute scripts under temporary directory /tmp on all master and worker nodes.
There are two distinct file edits that need to be performed: first on the Initial Master Node only, then on all remaining master and worker nodes. These file edits are detailed below.
- Editing the sudoers File on the Initial Master Node
- Editing the sudoers File on the Remaining Master and Worker Nodes
- Preparing for Manual On-premises Installation Using sudo
- Configuring the OS on the ArcSight Database Cluster Nodes
Editing the sudoers File on the Initial Master Node
First, log on to the initial master node as the root user. Then, using visudo, edit the /etc/sudoers file and add or modify the following lines.
>>> /etc/sudoers: syntax error near line nn <<<-
Add the following
Cmnd_Aliasline to the command aliases group in thesudoersfile.Cmnd_Alias CDFINSTALL = <unzipped-installer-dir>/installers/cdf/scripts/pre-check.sh, <unzipped-installer-dir>/installers/cdf/install, <unzipped-installer-dir>/installers/cdf/node_prereq, <CDF_HOME>/uninstall.sh, <CDF_HOME>/bin/cdfctl, <CDF_HOME>/scripts/cdfctl.sh, <CDF_HOME>/bin/jq, /usr/bin/kubectl, /usr/bin/mkdir, /usr/bin/cp, /usr/bin/helm, /bin/rm, /bin/chmod, /bin/tar, <CDF_HOME>/scripts/uploadimages.sh, <CDF_HOME>/scripts/cdf-updateRE.sh, <CDF_HOME>/bin/kube-status.sh, <CDF_HOME>/bin/kube-stop.sh, <CDF_HOME>/bin/kube-start.sh, <CDF_HOME>/bin/kube-restart.sh, <CDF_HOME>/bin/env.sh, <CDF_HOME>/bin/kube-common.sh, <CDF_HOME>/bin/kubelet-umount-action.sh, /bin/chown, /bin/ls, /bin/cd, /bin/openssl, /bin/cat, /bin/vi, /bin/systemctl daemon-reload
For an AWS installation, thecdf-updateRE.shscript has the path:aws-byok-installer/installer/cdf-deployer/scripts/cdf-updateRE.shIf you are specifying an alternatetmpfolder using the--tmp-folderparameter, ensure that you specify the correct path to<tmp path>/scripts/pre-check.shin theCmnd_Aliasline.- Replace the
{unzipped-installer-dir}with the directory where you unzipped the installation package. For example,/tmp/arcsight-platform-installer-<version>.zip. -
Replace
<CDF_HOME>with the value defined from a command line. By default,<CDF_HOME>is/opt/arcsight/kubernetes.
- Replace the
-
Add the following lines to the wheel users group, replacing
<username>with yoursudousername.%wheel ALL=(ALL) ALL <username> ALL=NOPASSWD: CDFINSTALL Defaults:<username> env_keep += "CDF_HOME", !requiretty Defaults: root !requiretty
-
Locate the
secure_pathline in thesudoersfile and ensure the following paths are present.Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/binBy doing this, the
sudouser can execute theshowmount, curl, ifconfigandunzipcommands when installing the OMT Installer. -
Save the file.
Editing the sudoers File on the Remaining Master and Worker Nodes
Log in to each master and worker node. Then, using visudo, edit the /etc/sudoers file and add or modify the following:
>>> /etc/sudoers: syntax error near line nn <<<-
Add the following
Cmnd_Aliasline to the command aliases group in the sudoers file.Cmnd_Alias CDFINSTALL = /tmp/pre-check.sh, /tmp/ITOM_Suite_Foundation_Node/install, /tmp/ITOM_Suite_Foundation_Node/node_prereq, <CDF_HOME>/uninstall.sh, <CDF_HOME>/bin/cdfctl, <CDF_HOME>/scripts/cdfctl.sh, /usr/bin/kubectl, /usr/bin/mkdir, /usr/bin/cp, /usr/bin/helm, /bin/rm, /bin/su, /bin/chmod, /bin/tar, <CDF_HOME>/scripts/uploadimages.sh, <CDF_HOME>/scripts/cdf-updateRE.sh, <CDF_HOME>/bin/kube-status.sh, <CDF_HOME>/bin/kube-stop.sh, <CDF_HOME>/bin/kube-start.sh, <CDF_HOME>/bin/kube-restart.sh, <CDF_HOME>/bin/env.sh, <CDF_HOME>/bin/kube-common.sh, <CDF_HOME>/bin/kubelet-umount-action.sh, /bin/chown
If you are specifying an alternatetmpfolder using the--tmp-folderparameter, ensure that you specify the correct path to<tmp path>/scripts/pre-check.shin theCmnd_Aliasline.-
Replace
<CDF_HOME>with the value defined from a command line. By default,<CDF_HOME>is/opt/arcsight/kubernetes.
-
-
Add the following lines to the wheel users group, replacing
<username>with yoursudousername.%wheel ALL=(ALL) ALL <username> ALL=NOPASSWD: CDFINSTALL Defaults:<username> env_keep += "CDF_HOME", !requiretty Defaults: root !requiretty
-
Locate the
secure_pathline in the sudoers file and ensure the following paths are present.Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/binBy doing this, the sudo user can execute the
showmount, curl, ifconfigandunzipcommands when installing the OMT Installer. -
Save the file.
-
Repeat the process for each remaining master and worker node.
Configuring the OS on the ArcSight Database Cluster Nodes
To prepare ArcSight Database nodes for installation as a non-root user, you must configure the operating system on the database cluster nodes so that the non-root user can run the sudo command with the correct permissions.
-
Create the non-root user for all nodes in the cluster.
-
Give
/optownership to non-root user for all nodes:chown <non-root>:<non-root> /opt
-
Enable the non-root user to be able to run
sudocommands. Append the following line to/etc/sudoerson all nodes:<non_root_userid> ALL=(ALL) ALL
-
(Optional) Disable root ssh remote login on all nodes:
-
In
/etc/ssh/sshd_config, changePermitRootLogintono:PermitRoot Login no
-
Run the following command to restart
sshd:systemctl restart sshd
-