16.7 C
Texas
angeloma
Senior Writer and partner

How to install Foreman on Ubuntu 18.04?

Managing servers on many occasions can become a difficult task for engineers. Especially because it doesn’t necessarily have to be one but several. With this, multiple circumstances increase significantly. So, today, I will teach you how to install Foreman an extraordinary application to help you with this task.

Foreman is a complete lifecycle management tool for physical and virtual servers. One of its most powerful features is to provide the opportunity to manage multiple servers from a single web interface. In addition, you can perform multiple tasks on several occasions. That is, task automation

Moreover, it is configurable through plugins and an extensive API development. So, let’s install Foreman.

1. Edit /etc/hosts file

First of all, it is necessary to update the /etc/hosts file so that it points to the hostname of the server.

- Advertisement -
:~$ sudo nano /etc/hosts

1.- Editing the /etc/hosts file
1.- Editing the /etc/hosts file

Next, set the correct hostname.

:~$ sudo hostnamectl set-hostname foreman.osradar.local

2.- Setting the hostname
2.- Setting the hostname

Now, you can continue.

2. Install some required packages

Before starting the Foreman installation it is necessary to install some necessary packages.

:~$ sudo apt install ca-certificates wget

3.- Installing some required packages
3.- Installing some required packages

Among the installed packages is wget that I will use to download the file to add the Foreman repository.

3. Install Foreman from an external repository

Now the next step is to install Foreman, however, I will do it adding an external repository to do it later from APT.

First, add the puppet repository.

:~$ wget https://apt.puppetlabs.com/puppet5-release-bionic.deb

4.- Getting the repository file
4.- Getting the repository file

Then, install the package.

:~$ sudo dpkg -i puppet5-release-bionic.deb

5.- Installing the repository package
5.- Installing the repository package

Now, you can add the Foreman repository.

:~$ echo "deb http://deb.theforeman.org/ bionic 1.20" | sudo tee /etc/apt/sources.list.d/foreman.list
:~$ echo "deb http://deb.theforeman.org/ plugins 1.20" | sudo tee -a /etc/apt/sources.list.d/foreman.list
:~$ wget -q https://deb.theforeman.org/pubkey.gpg -O- | sudo apt-key add -

6.- Adding the Foreman repository
6.- Adding the Foreman repository

Then, install Foreman installer package.

:~$ sudo apt install foreman-installer

7.- Installing some package
7.- Installing some package

Finally, run the installer.

:~$ sudo foreman-installer

8.- Install Foreman on Ubuntu
8.- Install Foreman on Ubuntu

It will take a while because it will download several packages and perform the entire installation process. If all goes well, you will find the credentials to access along with the address to which you should go from the web browser.

9.- Foreman log in screen
9.- Foreman log in screen

You will see this.

10.- Foreman main screen
10.- Foreman main screen

If your Foreman host is not listed, then run this command.

:~$ sudo /opt/puppetlabs/bin/puppet agent --test

And that’s it.

Conclusion

As you can notice, the installation of Foreman is something not very complex to do in Ubuntu 18.04. It is an extraordinary tool to manage multiple servers and services.

Any modern server is able to run this application without problems, however, take into account the number of dependencies needed. I would tell you that 16Gb of Ram should suffice.

If you want to broaden your knowledge, I recommend you visit Foreman’s official documentation to take full advantage of this great tool.

 

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article