This tutorial will take you through how to install Rundeck on Rocky Linux. Rundeck is an opensource runbook automation tool. It enables the creation of automated workflows from existing tools or scripts. Such workflows can be triggered from the Web GUI, API, CLI, or by schedule.
Install Rundeck on Rocky Linux
- Hardware Requirements
Ensure that your system has at least 2 CPUs, 4GB of RAM and 20GB of disk space.
- Install Java 8 or Java 11
Rundeck is a Java-Servlet based server and therefore requires the Java runtime. We are using Java 11 in this setup.
Check how to install Java 11 in the guide below;
Install Java 11 on Rocky Linux
java --version
openjdk 11.0.15 2022-04-19 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.15+9-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.15+9-LTS, mixed mode, sharing)
Set JAVA_HOME environment variable if not already set;
echo $JAVA_HOME
/usr/lib/jvm/java-11-openjdk-11.0.15.0.9-2.el8_5.x86_64/bin/java
- Install MySQL Database for Rundeck
MySQL 8 is the recommended version for Rundeck, as of this writing. Follow through this guide to learn how to install MySQL 8 on Rocky Linux
Install MySQL 8 on Rocky Linux 8
Create database and database User for Rundeck. The names of database/user used here are not standard. Use any names!
mysql -u root -p
create database rundeckdb;
create user [email protected] identified by 'ChangeME';
grant all on rundeckdb.* to [email protected];
flush privileges;
quit
- Install Rundeck on Rocky Linux
Install Rundeck YUM Repository on Rocky Linux
cat > /etc/yum.repos.d/rundeck.repo << 'EOL' [rundeck] name=rundeck baseurl=https://packages.rundeck.com/pagerduty/rundeck/rpm_any/rpm_any/$basearch repo_gpgcheck=1 gpgcheck=0 enabled=1 gpgkey=https://packages.rundeck.com/pagerduty/rundeck/gpgkey sslverify=1 sslcacert=/etc/pki/tls/certs/ca-bundle.crt metadata_expire=300 EOL
Next, install Rundeck on Rocky Linux;
dnf install rundeck -y
- Configure Rundeck server url;
vim /etc/rundeck/framework.properties
# ---------------------------------------------------------------- # Rundeck server connection information # ---------------------------------------------------------------- framework.server.name = rundeck framework.server.hostname = rundeck.kifarunix-demo.com framework.server.port = 4440 framework.server.url = http://rundeck.kifarunix-demo.com:4440 ...
vim /etc/rundeck/rundeck-config.properties
# change hostname here
#grails.serverURL=http://localhost:4440
grails.serverURL=http://rundeck.kifarunix-demo.com:4440
- Configure MySQL Database Backend
Open the Rundeck configuration file and update the database connection details;
#dataSource.dbCreate = none #dataSource.url = jdbc:h2:file:/var/lib/rundeck/data/rundeckdb;DB_CLOSE_ON_EXIT=FALSE;NON_KEYWORDS=MONTH,HOUR,MINUTE,YEAR,SECONDS grails.plugin.databasemigration.updateOnStart=true dataSource.driverClassName = org.mariadb.jdbc.Driver dataSource.url = jdbc:mysql://localhost/rundeckdb?autoReconnect=true&useSSL=false dataSource.username = rundeckadmin dataSource.password = ChangeME ...
- Running Rundeck on Rocky Linux
Start and enable Rundeck on Rocky Linux;
systemctl start rundeckd
systemctl enable rundeckd
Check the status;
systemctl status rundeckd
● rundeckd.service - SYSV: rundeckd, providing rundeckd Loaded: loaded (/etc/rc.d/init.d/rundeckd; generated) Active: active (running) since Wed 2022-05-11 16:47:18 EDT; 11s ago Docs: man:systemd-sysv-generator(8) Main PID: 17022 (runuser) Tasks: 0 (limit: 11256) Memory: 1.6M CGroup: /system.slice/rundeckd.service ‣ 17022 runuser -s /bin/bash -l rundeck -c java -Drundeck.jaaslogin=true -Djava.security.auth.login.config=/etc/rundeck/jaas-loginmodule.conf > May 11 16:47:17 localhost.localdomain systemd[1]: Starting SYSV: rundeckd, providing rundeckd... May 11 16:47:18 localhost.localdomain rundeckd[17012]: Starting rundeckd: [ OK ] May 11 16:47:18 localhost.localdomain systemd[1]: Started SYSV: rundeckd, providing rundeckd.
You can also check the logs;
tail -f /var/log/rundeck/rundeck.log
Accesing Rundeck Web User Interface
Rundeck listens on port 4440/tcp for HTTP and 4443 for HTTPS web services.
ss -altnp | grep 44
LISTEN 0 50 *:4440 *:* users:(("java",pid=1482,fd=131))
Open this port on firewall to allow external access to Rundeck;
iptables -A INPUT -p tcp --dport 4440 -j ACCEPT
or
firewall-cmd --add-port=4440/tcp --permanent
firewall-cmd --reload
Default username as admin and password as admin.
You can change the password in the /etc/rundeck/realm.properties
file.
Rundeck dashboard;
And that is it on how to install Rundeck on Rocky Linux.
Read more on Rundeck User Guide;
Other tutorials
Install Rundeck on Ubuntu 22.04