redhat:other-redhat:foreman-server-redhat

How to Install and Configure Foreman on CentOS 7

Foreman is a free and open source configuration management and provisioning tool for physical and virtual servers. Foreman performs the repetitive and other configuration tasks using the tools like puppet, chef and Ansible. For provisioning, Foreman make the use of DHCP, DNS, TFTP and kickstart file.Though in this article we are going to use puppet tool with Foreman.

Foreman provides a dashboard from where system administrator can perform all configuration and audit task, we can also get the reports like how many nodes are managed by foreman and what configuration has been pushed on the nodes.

In this post i am going to demonstrate how to install and configure foreman with puppet on CentOS 7

Below are details of my server on which i will install and configure Foreman.

  • OS(Operating System) = CentOS 7.x
  • IP Address = 192.168.1.5
  • Hostname = foreman.example.com
  • SeLinux = Disabled
  • Firewall = Enabled

I have my own local DNS server for the domain example.com, in case you don’t have the DNS server then you have to put entries in the /etc/hosts file for name to ip resolution.

Open the terminal and run the following commands one after the other.

# rpm -ivh http://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm
# yum -y install epel-release

# yum -y install foreman-installer

To start the foreman installation , run the command foreman-installer , it will be non-interactive installation. In case you want the interactive installation use -i option in the command like foreman-installer -i

Once the foreman installation is completed we will get the output like below

We can see that initial credentials have been created for the foreman dashboard and moreover puppetmaster is also installed which is running in 8140 port.

Before Accessing the dashboard, it is recommended to open the required ports in the OS firewall. Execute the beneath commands one after the other.

# firewall-cmd --permanent --add-port=53/tcp
# firewall-cmd --permanent --add-port=67-69/udp
# firewall-cmd --permanent --add-port=80/tcp
# firewall-cmd --permanent --add-port=443/tcp
# firewall-cmd --permanent --add-port=3000/tcp
# firewall-cmd --permanent --add-port=3306/tcp
# firewall-cmd --permanent --add-port=5910-5930/tcp
# firewall-cmd --permanent --add-port=5432/tcp
# firewall-cmd --permanent --add-port=8140/tcp
# firewall-cmd --permanent --add-port=8443/tcp

# firewall-cmd --reload
  • redhat/other-redhat/foreman-server-redhat.txt
  • Last modified: 2017/07/05 11:44
  • by michael