Non Docker Environment
Install K2 Agents on Node/VM/EC2 in non docker environment.
Prerequisites
In case of a restricted environment, please allow following access on the host:
Access to https://k2io.net through your firewall.
Create (if does not exist) a user and group on your host which will be used to run the K2 Agents.
The non-docker installer performs installation in the following manner,
Systemd based deployment
Process based deployment
The installer checks if user level systemd is enabled and functional, and if so, it creates services for the respective agent. Otherwise, it switches to process based installation, where it starts processes for the respective agents, and along with that, it also configures a cron-job to maintain the processes. So, in case a process gets stopped for any reason, the cron-job will start it at the next check.
To setup user level systemd management is as follows, Please follow steps from below page.
User Manager Systemd ServiceConfiguration
Download K2 Installer for Node/VM/EC2 from Installation view in K2 SaaS Portal by signing in with your username and password
We recommend not to select PRODUCTION as your environment if you have enabled exploit detection/dynamic scanning on K2 Portal.
Download K2 Installer from Installation view in K2 SaaS Portal by signing in with your username and password
Download the zip of VM installation files from installation section of your k2 manager account
Unzip the file using the following command.
Configure the permissions of VM installation files.
After extracting the zip file please change the owner & group of the directory using the user & group created (as asked in the prerequisites).
Replace the user_name & group_name with your user & group.
Change the permissions of the extracted k2install directory, using the below command.
Add the user and group in env.properties file which is to be used to run k2 agents (as asked in prerequisites) Edit the env.properties file and add the user name and user group as shown below.
Installation
Install K2 Agent
Install K2 Agent
Enable vulnerability scanning (Only available for version 1.10.0 or above)
The .agent.properties contain the default configuration associated with the K2 agents. Please do not update the configuration unless necessary.
Verify Installation
If K2 Agents Installed As A Root User
Ensure that the K2 Prevent-Web agent is running on the host system.
Use the systemctl status prevent-web-agent command to get information about the K2 Prevent-Web agent. If the output shows the running status of the service, as in the following output, you have K2 Prevent-Web agent running.
If the machine does not have a K2 Prevent-Web agent running, it will show the below output.
If K2 Agents Installed As A Non-Root User
Use the service prevent-web-agent status command to get information about the Prevent-Web agent. If the output shows the running status of the service, as in the following output, you have Prevent-Web agent running.
OR
If the machine does not have a Prevent-Web agent running, it will show the below output.
OR
What Next ?
Congratulations, You have successfully installed K2 Platform on your premises.
Install Language Agents
Please download and attach the language agent based on your application type.
Java
Node/VM/EC2Node
Node/VM/EC2Ruby
Node/VM/EC2PHP
Node/VM/EC2Last updated
Was this helpful?