Monday, 25 May 2020

How to install Rundeck Server on CentOS/Rocky Linux 8

Install Rundeck Server on CentOS 8

In this article, you will learn how to install Rundeck server on CentOS/Rocky Linux 8 with MySQL as backend database. We will also create our first project by using the same Rundeck server.


This Article Provides:


What is Rundeck ?:

Rundeck is a free and open-source software used for the automation of administration of servers (Linux, Windows and MacOS) by means of scheduled jobs.

Rundeck is build around the idea to manage all the servers in a computer network from a single administration server. Rundeck provides a web interface for performing these administration tasks.

Rundeck is written in Java programming language and it is released under the Apache Software 2.0 license.

Rundeck is available in Enterprise (Commercial) and Community (Free) editions. Rundeck Enterprise offers more features than Rundeck Community edition but with the license cost.

Install Rundeck Server on CentOS 8

Rundeck Features:

The core features of Rundeck are:

  • Web API
  • Pluggable execution system (SSH by default)
  • Distributed command execution
  • Multi-step workflows
  • Graphical web console for command and job execution
  • Role-based access control policy
  • Job execution with on demand or scheduled runs
  • Command line interface tools
  • History and auditing logs


Environment Specification:

We are using a CentOS 8 KVM virtual machine with following specifications.

  • CPU - 3.4 Ghz (2 cores)
  • Memory - 2 GB
  • Storage - 20 GB
  • Operating System - CentOS 8.1
  • Hostname –
  • IP Address - /24


Install Software Upgrades on CentOS 8:

Connect with as root user by using a SSH tool.

Upgrade all the installed packages in CentOS 8 by using dnf command.

# dnf update -y
Last metadata expiration check: 0:00:41 ago on Fri 22 May 2020 01:47:06 AM PKT.
Dependencies resolved.
Nothing to do.

Our CentOS 8 server is already up-to-date, therefore there is nothing to do for the Linux package manager.


Install Java on CentOS 8:

Rundeck is written in Java programming language, therefore it requires JRE (Java Runtime Environment) for execution.

Therefore, we are installing OpenJDK on CentOS 8 from standard yum repositories as follows.

# dnf install -y java-1.8.0-openjdk

To verify the installation of Java Runtime Environment, check the version of java command.

# java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)


Install Rundeck Yum Repository on CentOS 8:

Rundeck software is distributed via its official yum repository. So, we need to the add the Rundeck yum repository in our CentOS 8 server.

Rundeck provides a RPM package to install yum repository on CentOS 8. Therefore, we are installing it by using the dnf command.

# dnf install -y

Build cache for Rundeck repo.

# dnf makecache
CentOS-8 - AppStream                            5.1 kB/s | 4.3 kB     00:00
CentOS-8 - Base                                  10 kB/s | 3.9 kB     00:00
CentOS-8 - Extras                               2.6 kB/s | 1.5 kB     00:00
Rundeck - Release                               485 kB/s | 2.8 MB     00:05
Metadata cache created.

Rundeck yum repository has been installed.


Install RunDeck on CentOS 8:

Now, we can install Rundeck software using dnf command.

# dnf install -y rundeck

Enable and start rundeckd service.

# systemctl enable --now rundeckd.service
rundeckd.service is not a native service, redirecting to systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable rundeckd

Verify the status of rundeckd service.

# systemctl status rundeckd.service
â rundeckd.service - SYSV: rundeckd, providing rundeckd
   Loaded: loaded (/etc/rc.d/init.d/rundeckd; generated)
   Active: active (running) since Fri 2020-05-22 02:09:40 PKT; 3s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2279 ExecStart=/etc/rc.d/init.d/rundeckd start (code=exited, status=>
 Main PID: 2291 (runuser)
    Tasks: 0 (limit: 5916)
   Memory: 1.9M
   CGroup: /system.slice/rundeckd.service
           ⣠2291 runuser -s /bin/bash -l rundeck -c java -Drundeck.jaaslogin=t>

May 22 02:09:40 systemd[1]: Starting SYSV: rundeckd, p>
May 22 02:09:40 rundeckd[2279]: Starting rundeckd: [  >
May 22 02:09:40 systemd[1]: Started SYSV: rundeckd, pr>

Allow the Rundeck service port: 4440 in CentOS firewall.

# firewall-cmd --permanent --add-port=4440/tcp
# firewall-cmd --reload

If you access the Rundeck web interface from another computer, you may observe some errors. To workaround it, we need to edit Rundeck configuration file.

# vi /etc/rundeck/

Find and updating the grails.serverURL parameter as follows. Please ensure that the hostname is resolvable across the network, you can use a DNSSEC name server for this purpose.


Restart rundeckd service to reload the process with new configurations.

# systemctl restart rundeckd.service


Configure MySQL Database Backend for Rundeck:

By default, Rundeck uses an H2 database as its repository. But use of H2 database is not recommended for production environments. Therefore, we are configuring MySQL as the database backend for Rundeck.

Connect to the MySQL database server. If you do not have a running MySQL database server, then you need to install MySQL Server on CentOS 8.

# mysql -u root -p123
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 16
Server version: 10.3.17-MariaDB MariaDB Server

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>

Create a database for Rundeck server.

MariaDB [(none)]> create database rundeck;
Query OK, 1 row affected (0.002 sec)

Create a database user and grant necessary privileges on the rundeck database.

MariaDB [(none)]> grant ALL on rundeck.* to 'rundeckuser'@'localhost' identified by 'ahmer123';
Query OK, 0 rows affected (0.003 sec)

Reload privilege tables.

MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.002 sec)

Exit from MySQL shell.

MariaDB [(none)]> exit

Now edit Rundeck configuration file.

# vi /etc/rundeck/

Locate and update following parameters in this file. (If you do not find any parameter,  then add it there)

dataSource.url = jdbc:mysql://

Restart the rundeckd service to apply changes.

# systemctl restart rundeckd.service

If you have difficulty starting the rundeckd service, then you should look for the errors in the Rundeck log files located within /var/log/rundeck/ directory.


Create your First Rundeck Project:

Browse URL in a browser such as Google Chrome.


Login to Rundeck web interface by using default username: admin and password: admin.


Click on the New Project + button to create a new project.


Provide the necessary details about the Project and click on Create.


Our project has been created and now we are at the Edit Nodes page.

You may observe that a node "Local" has already been added in Rundeck inventory. It is our Rundeck server machine, which is automatically added when we created this project.

We can also add more nodes from this page. However, our "Local" node is quite enough to demonstrate the execution of commands.

Click on the Commands at the left side menu.


We have executed a command on the "Local" node. We can execute the same command on others nodes that are under management of the Rundeck server.

Similarly, we can also create some jobs that will execute a set of commands on a group of nodes at a scheduled time.

Our Rundeck server has been installed and configured successfully. For information on usage of Rundeck web interface, you can refer to Rundeck Documentation.

If you find this article useful? Don't you mind support us by Buy Me A Coffee

No comments:

Post a Comment

© 2022 CentLinux. All Rights Reserved.