{"id":74684,"date":"2023-06-05T13:11:44","date_gmt":"2023-06-05T17:11:44","guid":{"rendered":"https:\/\/jumpcloud.com\/?post_type=support&p=74684"},"modified":"2024-03-15T15:15:55","modified_gmt":"2024-03-15T19:15:55","slug":"install-the-linux-agent","status":"publish","type":"support","link":"https:\/\/jumpcloud.com\/support\/install-the-linux-agent","title":{"rendered":"Install the Linux Agent"},"content":{"rendered":"\n
Your environment may require you to manually install Linux to monitor your devices. Learn how to manually install Linux on your device using a variety of methods, and verify installation. <\/p><\/div> For information on installing the JumpCloud agent, see Install the Agent from the User Portal<\/a>.<\/p>\n <\/div><\/div><\/div><\/div>\n\n\n\n <\/p><\/div> New remote employees? No problem. You can enable remote installation of the JumpCloud agent from the User Portal, making it easy for new remote employees to install the agent on their work computers from home. See Enable Users to Install the Agent<\/a>.<\/p>\n <\/div><\/div><\/div><\/div>\n\n\n\n Prerequisites<\/strong><\/p>\n\n\n\n To install the Linux agent manually<\/strong>: <\/p>\n\n\n\n To install the Linux agent using Puppet, run the following manifest<\/strong>: <\/p>\n\n\n\n package { [‘curl’, ‘bash’] : To install the Linux agent using Chef, run the following recipe<\/strong>: <\/p>\n\n\n\n package ‘curl’ Note<\/strong>: For third-party Ansible roles, go to: https:\/\/github.com\/shrikeh\/ansible-jumpcloud<\/a>. – hosts: all To verify or change status in Linux from terminal, run the following command as root<\/strong>:<\/p>\n\n\n\n [root@host ~]# service jcagent status Here is what the process should look like:<\/p>\n\n\n\n [root@host ~]# ps -aufx | grep jumpcloud To check the agent\u2019s service status: <\/p>\n\n\n\n service jcagent status<\/p>\n<\/div><\/div>\n\n\n\n For newer devices with systemd, you can also use systemctl:<\/p>\n\n\n\n systemctl status jcagent<\/p>\n<\/div><\/div>\n\n\n\n To verify the Linux Agent installation from the Admin Portal<\/strong>: <\/p>\n\n\n\n On hosts that are fully up to date, installing the JumpCloud agent should take less than a minute. However, in the case of small\/micro instances, where network bandwidth is limited, or where a system is out of date, you can take steps to reduce agent install time significantly.<\/p>\n\n\n\n Make sure to run on Ubuntu\/Debian or RHEL\/Cent\/Amazon Linux, respectively:<\/p>\n\n\n\n apt-get update<\/p>\n<\/div><\/div>\n\n\n\n or<\/p>\n\n\n\n yum check-update<\/p>\n<\/div><\/div>\n\n\n\n After making sure the system is up to date, preinstall agent dependencies. A list of dependencies is maintained in Agent Compatibility, System Requirements, and Impacts<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":" Your environment may require you to manually install Linux to monitor your devices. Learn how to manually install Linux on […]<\/p>\n","protected":false},"author":206,"featured_media":0,"template":"","meta":{"_acf_changed":false,"_oasis_is_in_workflow":0,"_oasis_original":0,"_oasis_task_priority":"","inline_featured_image":false,"footnotes":""},"support_category":[2923,2852,2926],"support_tag":[],"coauthors":[2842],"acf":[],"yoast_head":"\n
Before using the Linux agent, learn about supported Linux versions and installation prerequisites. For a complete list of supported versions, see Agent Compatibility, System Requirements, and Impacts<\/a>.<\/p>\n\n\n\n\n
Manually Installing the Linux Agent<\/strong><\/h2>\n\n\n\n
\n
\n
Installing the JumpCloud Agent Using Puppet<\/strong><\/h2>\n\n\n\n
ensure => present,
} ->
exec { ‘agent_install’ :
command => “curl -sS -H ‘x-connect-key: your-connect-key-goes-here’ https:\/\/kickstart.jumpcloud.com\/Kickstart| bash”,
path => [ ‘\/sbin’, ‘\/bin’, ‘\/usr\/sbin’, ‘\/usr\/bin’ ],
timeout => 600,
creates => ‘\/opt\/jc’
}<\/p>\n<\/div><\/div>\n\n\n\nInstalling the JumpCloud Agent Using Chef<\/strong><\/h2>\n\n\n\n
package ‘sudo’
package ‘bash’
execute ‘agent_install’ do
command “curl –tlsv1.2 –silent –show-error –header ‘x-connect-key: your-connect-key-goes-here’ ‘https:\/\/kickstart.jumpcloud.com\/Kickstart ‘ | sudo bash”
path [ ‘\/sbin’, ‘\/bin’, ‘\/usr\/sbin’, ‘\/usr\/bin’ ]
timeout 600
creates ‘\/opt\/jc’
end<\/p>\n<\/div><\/div>\n\n\n\nInstalling the JumpCloud Agent Using Ansible<\/strong><\/h2>\n\n\n\n
To install the Linux agent using Ansible, run the following playbook<\/strong>:<\/p>\n\n\n\n
sudo: yes
tasks:
– name: Install curl package (Debian based)
action: apt pkg=’curl’ state=installed
when: “‘$ansible_pkg_mgr’ == ‘apt'”
– name: Install curl package (RedHat based)
action: yum name=’curl’ state=installed
when: “‘$ansible_pkg_mgr’ == ‘yum'”
– name: Check if JumpCloud is already installed
shell: “[ -d \/opt\/jc ] && echo ‘Found’ || echo ””
register: jc_installed
– name: Update time
shell: “ntpdate -u pool.ntp.org”
when: “not jc_installed.stdout”
– name: Install JumpCloud
shell: “curl –header ‘x-connect-key: your-connect-key-goes-here’ https:\/\/kickstart.jumpcloud.com\/Kickstart | sudo bash”
when: “not jc_installed.stdout”<\/p>\n<\/div><\/div>\n\n\n\nVerifying Linux Agent Installation from Terminal<\/h2>\n\n\n\n
jcagent.service – JumpCloud Agent
Loaded: loaded (\/usr\/lib\/systemd\/system\/jcagent.service; enabled; vendor preset: disabled)
Active: inactive (dead) since Thu 2016-09-01 13:27:16 MDT; 3h 26min ago
Docs: http:\/\/support.jumpcloud.com\/knowledgebase
Main PID: 890 (code=exited, status=0\/SUCCESS)<\/p>\n<\/div><\/div>\n\n\n\n
root 2272 0.0 0.1 3840 1292 ? Sl 13:27 0:00 \/opt\/jc\/bin\/agent-monitor -exec=\/opt\/jc\/bin\/jumpcloud-agent -conf=\/opt\/jc\/jcagent.conf
root 2275 0.0 1.6 682980 16400 ? Sl 13:27 0:03 \\_ \/opt\/jc\/bin\/jumpcloud-agent -conf=\/opt\/jc\/jcagent.conf<\/p>\n<\/div><\/div>\n\n\n\nVerifying Linux Agent Installation from the Admin Portal<\/strong><\/h2>\n\n\n\n
\n
Reducing Agent Install Time on Linux<\/h2>\n\n\n\n