Atlantic.Net Blog

How to Install Rundeck on CentOS 8

Hitesh Jethva
by Atlantic.Net (198posts) under Dedicated Server Hosting
0 Comments

Rundeck is a free and open-source tool used for managing multiple servers from a single server. Written in Java programming language, Rundeck provides a web-based interface to perform all administrative tasks. It uses a MySQL/MariaDB database to store the job definitions and execution history. Rundeck comes with a lot of tools that make it easier for you to scale up your automation efforts.

In this tutorial, we will show you how to install Rundeck on CentOS 8.

Prerequisites

  • A fresh CentOS 8 VPS on the Atlantic.Net Cloud Platform
  • A root password configured on your server

Step 1 – Create an Atlantic.Net Cloud Server

First, log in to your Atlantic.Net Cloud Server.  Create a new server, choosing CentOS 8 as the operating system with at least 2GB RAM. Connect to your Cloud Server via SSH and log in using the credentials highlighted at the top of the page.

Once you are logged in to your CentOS 8 server, run the following command to update your base system with the latest available packages.

dnf update -y

Step 2 – Install Java

Rundeck is written in Java, so Java must be installed in your system. If not installed, you can install it with the following command:

dnf install java -y

After installing Java, you can verify the installed version of Java using the following command:

java -version

You should see the following output:

openjdk version "1.8.0_262"
OpenJDK Runtime Environment (build 1.8.0_262-b10)
OpenJDK 64-Bit Server VM (build 25.262-b10, mixed mode)

Step 3 – Install and Configure MySQL

Rundeck uses a MySQL database to store the job and other history, so you will need to install MySQL on your server. You can install it with the following command:

dnf install mysql-server -y

Once installed, start the MySQL service and enable it to start at system reboot with the following command:

systemctl start mysqld
systemctl enable mysqld

Next, you will need to create a database and user for Rundeck. First, log into the MySQL shell with the following command:

mysql

Once logged in, create a database and user with the following command:

create database rundeck;
create user 'rundeckuser'@'localhost' identified by 'rundeckpassword';

Next, grant all the privileges to the Rundeck database with the following command:

grant ALL on rundeck.* to 'rundeckuser'@'localhost';

Next, flush the privileges and exit from MySQL with the following command:

flush privileges;
exit;

Step 4 – Install Rundeck

By default, Rundeck is not available in the CentOS 8 default repository, so you will need to add Rundeck repository to your system.

First, import the Rundeck GPG key with the following command:

rpm --import http://rundeck.org/keys/BUILD-GPG-KEY-Rundeck.org.key

Next, add the Rundeck repository with the following command:

dnf install -y http://repo.rundeck.org/latest.rpm

Next, install Rundeck by running the following command:

dnf install rundeck -y

Once Rundeck is installed, you can proceed to the next step.

Step 5 – Configure Rundeck

Next, you will need to define your server address and database details in the Rundeck configuration file. Edit the Rundeck default configuration file as shown below:

nano /etc/rundeck/rundeck-config.properties

Change the following lines:

grails.serverURL=http://your-server-ip:4440
dataSource.dbCreate = update
dataSource.url = jdbc:mysql://localhost/rundeck?autoReconnect=true&useSSL=false&serverTimezone=UTC
dataSource.username=rundeckuser
dataSource.password=rundeckpassword
dataSource.driverClassName=com.mysql.jdbc.Driver

Save and close the file when you are finished, then start the Rundeck server and enable it to start at system reboot with the following command:

systemctl enable rundeckd
systemctl start rundeckd

You can now verify the status of the Rundeck service with the following command:

systemctl status rundeckd

You should get the following output:

Step 6 – Access Rundeck Web Interface

At this point, Rundeck is started and listening on port 4440. Now, open your web browser and type the URL http://your-server-ip:4440. You will be redirected to the Rundeck login page:

Provide the default username as admin and password as admin and click on the Log In button. You should see the Rundeck dashboard in the following page:

Next, click on the New Project button to create a new project. You should see the following page:

Provide your project name, label, and description and click on the Create button. You should see the following page:

Click on the Commands in the left pane. You should see the following page:

Type the command “free -m” and click on the “Run on 1 Node“. This will execute the command on the localhost and display the output of the command as shown in the following page:

Conclusion

In this guide, we learned how to install Rundeck and integrate it with the MySQL database on CentOS 8. We have also created a new project and execute commands with Rundeck. For more information about Rundeck, visit the Rundeck documentation. If you’re ready to try Rundeck, get started on dedicated server hosting from Atlantic.Net.

Get A Free To Use Cloud VPS

Free Tier Includes:
G3.2GB Cloud VPS Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


Looking for a Hosting Solution?

We Provide Cloud, Dedicated, & Colocation.

  • Seven Global Data Center Locations.
  • Flexible Private, Public, & Hybrid Hosting.
  • 24x7x365 Security, Support, & Monitoring.
Contact Us Now! Med Tech Award FTC
SOC Audit HIPAA Audit HITECH Audit

Recent Posts

Get started with 12 months of free cloud VPS hosting

Free Tier includes:
G3.2GB Cloud VPS Server Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year


New York, NY

100 Delawanna Ave, Suite 1

Clifton, NJ 07014

United States

San Francisco, CA

2820 Northwestern Pkwy,

Santa Clara, CA 95051

United States

Dallas, TX

2323 Bryan Street,

Dallas, Texas 75201

United States

Ashburn, VA

1807 Michael Faraday Ct,

Reston, VA 20190

United States

Orlando, FL

440 W Kennedy Blvd, Suite 3

Orlando, FL 32810

United States

Toronto, Canada

20 Pullman Ct, Scarborough,

Ontario M1X 1E4

Canada

London, UK

14 Liverpool Road, Slough,

Berkshire SL1 4QZ

United Kingdom

Resources