{"id":7888,"date":"2021-07-10T12:07:42","date_gmt":"2021-07-10T12:07:42","guid":{"rendered":"https:\/\/linuxways.net\/?p=7888"},"modified":"2021-07-10T12:07:42","modified_gmt":"2021-07-10T12:07:42","slug":"how-to-install-puppet-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/ubuntu\/how-to-install-puppet-on-ubuntu-20-04\/","title":{"rendered":"How to Install Puppet on Ubuntu 20.04"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p>Puppet is a fully accessible automated admin platform for remote server administration and managerial chores. This system operates on Linux, Unix, &amp; Windows systems. We&#8217;ll go through how to deploy Puppet using Ubuntu 20.04 on both the master as well as client units in this guide.<\/p>\n<h2>Update system<\/h2>\n<p>You need to update your system apt package for better performance. Hence, try out the update query with sudo privileges in the shell as below. It requires adding a sudo password to proceed with the update. Add the password, and get started.<\/p>\n<pre><strong>$ sudo apt-get update -y<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"475\" height=\"58\" class=\"wp-image-7889\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-31.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-31.png 475w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-31-300x37.png 300w\" sizes=\"auto, (max-width: 475px) 100vw, 475px\" \/><\/p>\n<p>Now, we have to update the \/etc\/hosts document on both the master and client node. Firstly we will update the master node using nano editor. You have to again add the password for your account.<\/p>\n<pre><strong>$ sudo nano \/etc\/hosts<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"397\" height=\"34\" class=\"wp-image-7890\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-32.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-32.png 397w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-32-300x26.png 300w\" sizes=\"auto, (max-width: 397px) 100vw, 397px\" \/><\/p>\n<p>Now the file has been opened, write out the below lines in this file.<\/p>\n<pre><strong>puppet-master-ip puppetmaster puppet<\/strong>\r\n\r\n<strong>puppet-client-ip puppetclient<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"535\" height=\"236\" class=\"wp-image-7891\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-33.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-33.png 535w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-33-300x132.png 300w\" sizes=\"auto, (max-width: 535px) 100vw, 535px\" \/><\/p>\n<h2>Install Puppet Server:<\/h2>\n<p>Now, it\u2019s for the Puppet server to be installed. For this purpose, add the package repository of the puppet server by downloading it. Try out the below wget query to do so.<\/p>\n<pre><strong>$ wget https:\/\/apt.puppetlabs.com\/puppet6-release-focal.deb<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"721\" height=\"255\" class=\"wp-image-7892\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-34.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-34.png 721w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-34-300x106.png 300w\" sizes=\"auto, (max-width: 721px) 100vw, 721px\" \/><\/p>\n<p>Now you have to install the downloaded file using the dpkg command in the shell as below. Make sure to use sudo privileges to do so.<\/p>\n<pre><strong>$ sudo dpkg \u2013i puppet6-release-focal.deb<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"662\" height=\"110\" class=\"wp-image-7893\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-35.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-35.png 662w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-35-300x50.png 300w\" sizes=\"auto, (max-width: 662px) 100vw, 662px\" \/><\/p>\n<p>You need to install puppetserver first. Try out the below query within your console as follows:<\/p>\n<pre><strong>$ sudo apt install puppetserver -y<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"495\" height=\"71\" class=\"wp-image-7894\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-36.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-36.png 495w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-36-300x43.png 300w\" sizes=\"auto, (max-width: 495px) 100vw, 495px\" \/><\/p>\n<p>It may take up to 12 minutes while installation. Hence, you have to relax for some time while it&#8217;s been completed. After the installation, you can go ahead.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"611\" height=\"76\" class=\"wp-image-7895\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-37.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-37.png 611w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-37-300x37.png 300w\" sizes=\"auto, (max-width: 611px) 100vw, 611px\" \/><\/p>\n<p>Now the Puppet server has been installed on Ubuntu 20.04, it\u2019s time to change its default size on your system. You have to open the default puppet server file and update it using the beneath query.<\/p>\n<pre><strong>$ sudo nano \/etc\/default\/puppetserver<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"524\" height=\"38\" class=\"wp-image-7896\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-38.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-38.png 524w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-38-300x22.png 300w\" sizes=\"auto, (max-width: 524px) 100vw, 524px\" \/><\/p>\n<p>Now the file is opened, change the \u201cJAVA_ARGS\u201d file as shown in the image below. Press Ctrl+S to save the changes. Come back to the terminal to continue again.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"724\" height=\"42\" class=\"wp-image-7897\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-39.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-39.png 724w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-39-300x17.png 300w\" sizes=\"auto, (max-width: 724px) 100vw, 724px\" \/><\/p>\n<p>Start your puppet server using the systemctl command with the keyword \u201cstart\u201d along with the name of the puppetmaster.<\/p>\n<pre><strong>$ sudo systemctl start puppetserver<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"511\" height=\"40\" class=\"wp-image-7898\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-40.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-40.png 511w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-40-300x23.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-40-501x40.png 501w\" sizes=\"auto, (max-width: 511px) 100vw, 511px\" \/><\/p>\n<p>After the system has been started, you have to enable it as:<\/p>\n<pre><strong>$ sudo systemctl enable puppetserver<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"716\" height=\"108\" class=\"wp-image-7899\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-41.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-41.png 716w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-41-300x45.png 300w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\" \/><\/p>\n<p>You can see the puppet server status by using the below systemctl command in the shell. You can see that the puppet server is active and running perfectly.<\/p>\n<pre><strong>$ sudo systemctl status puppetserver<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"719\" height=\"222\" class=\"wp-image-7900\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-42.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-42.png 719w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-42-300x93.png 300w\" sizes=\"auto, (max-width: 719px) 100vw, 719px\" \/><\/p>\n<p><strong>Install Puppet Agent:<\/strong><\/p>\n<p>Now it\u2019s time to mount the puppet agent in the client node. Hence login from the client node first and then add the below query to download the puppet file.<\/p>\n<pre><strong>$ wget https:\/\/apt.puppetlabs.com\/puppet6-release-focal.deb<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"719\" height=\"257\" class=\"wp-image-7901\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-43.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-43.png 719w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-43-300x107.png 300w\" sizes=\"auto, (max-width: 719px) 100vw, 719px\" \/><\/p>\n<p>Now install the download package using the dpkg package.<\/p>\n<pre><strong>$ sudo dpkg \u2013I puppet6-release-focal.deb<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"657\" height=\"95\" class=\"wp-image-7902\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-44.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-44.png 657w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-44-300x43.png 300w\" sizes=\"auto, (max-width: 657px) 100vw, 657px\" \/><\/p>\n<p>You have to install the puppet agent on your client node with the apt-get command:<\/p>\n<pre><strong>$ sudo apt-get install puppet-agent-y<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"716\" height=\"218\" class=\"wp-image-7903\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-45.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-45.png 716w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-45-300x91.png 300w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\" \/><\/p>\n<p>Now the puppet agent has been installed properly, you have to update its configuration file. Open this file in nano editor using the sudo command as follows:<\/p>\n<pre><strong>$ sudo nano \/etc\/puppetlabs\/puppet\/puppet.conf<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"587\" height=\"23\" class=\"wp-image-7904\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-46.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-46.png 587w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-46-300x12.png 300w\" sizes=\"auto, (max-width: 587px) 100vw, 587px\" \/><\/p>\n<p>Now the file has been opened, add the below lines in it as shown in the image as well. Save the file and close it using Ctrl+S followed by Ctrl+X.<\/p>\n<ul>\n<li><strong>[main]<\/strong><\/li>\n<li><strong>Certname = puppetclient<\/strong><\/li>\n<li><strong>Server = puppetmaster<\/strong><\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"684\" height=\"341\" class=\"wp-image-7905\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-47.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-47.png 684w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-47-300x150.png 300w\" sizes=\"auto, (max-width: 684px) 100vw, 684px\" \/><\/p>\n<p>Now, again run the same systemctl commands to first start, and then enable the puppet.<\/p>\n<pre><strong>$ sudo systemctl start puppet<\/strong><\/pre>\n<pre><strong>$ sudo systemctl enable puppet<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"444\" height=\"38\" class=\"wp-image-7906\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-48.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-48.png 444w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-48-300x26.png 300w\" sizes=\"auto, (max-width: 444px) 100vw, 444px\" \/><\/p>\n<p>Now you can check the status of the puppet using the same status command. You can see it is actively running.<\/p>\n<pre><strong>$ sudo systemctl status puppet<\/strong><\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"716\" height=\"377\" class=\"wp-image-7907\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-49.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-49.png 716w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/07\/word-image-49-300x158.png 300w\" sizes=\"auto, (max-width: 716px) 100vw, 716px\" \/><\/p>\n<h2>Conclusion:<\/h2>\n<p>This was all about the installation of a puppet server on both master and client nodes and how to connect them. Make sure to not miss any step. After these, make sure to sign the puppet agent node certificate for both the master and client-side.<\/p>","protected":false},"excerpt":{"rendered":"<p>Introduction Puppet is a fully accessible automated admin platform for remote server administration and managerial chores. This system operates on Linux, Unix, &amp; Windows systems. We&#8217;ll go through&hellip;<\/p>","protected":false},"author":1,"featured_media":8243,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[400,100],"class_list":["post-7888","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu","tag-puppet","tag-ubuntu-20-04"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/7888","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=7888"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/7888\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/8243"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=7888"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=7888"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=7888"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}