{"id":13379,"date":"2022-01-03T15:18:54","date_gmt":"2022-01-03T15:18:54","guid":{"rendered":"https:\/\/linuxways.net\/?p=13379"},"modified":"2022-01-03T15:18:54","modified_gmt":"2022-01-03T15:18:54","slug":"how-to-install-rundeck-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/linuxways.net\/de\/ubuntu\/how-to-install-rundeck-on-ubuntu-20-04\/","title":{"rendered":"How to Install Rundeck on Ubuntu 20.04"},"content":{"rendered":"<p>If you are searching for easy and open source software for automation service then Rundeck might be a best option. It is very useful to create simple to complex tasks on a local machine or in a remote machine. Rundeck comes with command line tools, WebApi and command line tools. Rundeck is available in commercial and community edition.<\/p>\n<p>Rundeck is built around the concept of managing servers in a computer network using a single centralized management server. The administrative tasks can be performed by using a web interface.<\/p>\n<p>In this article, we will learn how to install Rundeck on Ubuntu 20.04.<\/p>\n<h2>Update the Ubuntu system<\/h2>\n<p>Before performing the installation, update and upgrade the Ubuntu system to its latest index repository.<\/p>\n<pre>$ sudo apt update<\/pre>\n<pre>$ sudo apt upgrade<\/pre>\n<h2>Install Java<\/h2>\n<p>Rundeck is a Java based application and to run the application we need a java 8 or java 11. Install JDK 11 using the following command<\/p>\n<pre>$ sudo apt install openjdk-11-jre<\/pre>\n<pre>$ java \u2013version<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"877\" height=\"82\" class=\"wp-image-13380\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-541.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-541.png 877w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-541-300x28.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-541-768x72.png 768w\" sizes=\"auto, (max-width: 877px) 100vw, 877px\" \/><\/p>\n<h2>Install Database (Mysql\/Mariadb)<\/h2>\n<p>Rundeck can be installed with database MySQL\/MariaDB, MS SQL, PostgreSQL and Oracle to store the data. In this example, we are going to use MariaDB.<\/p>\n<p>Install dependency and MariaDB packages using the command below.<\/p>\n<pre>$ sudo apt install software-properties-common mariadb-server mariadb-client<\/pre>\n<p>Enable and start mariadb service<\/p>\n<pre>$ sudo systemctl enable mariadb.service<\/pre>\n<pre>$ sudo systemctl status mariadb.service<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"904\" height=\"389\" class=\"wp-image-13381\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-542.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-542.png 904w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-542-300x129.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-542-768x330.png 768w\" sizes=\"auto, (max-width: 904px) 100vw, 904px\" \/><\/p>\n<p>Once the MySQL\/MariaDB is installed, run the following command to secure the database system.<\/p>\n<pre>$ sudo mysql_secure_installation<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"790\" height=\"422\" class=\"wp-image-13382\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-543.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-543.png 790w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-543-300x160.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-543-768x410.png 768w\" sizes=\"auto, (max-width: 790px) 100vw, 790px\" \/><\/p>\n<p>Now create a database and database user for Rundeck.<\/p>\n<pre>$ mysql -u root -p<\/pre>\n<pre>MariaDB [(none)]&gt; CREATE DATABASE rundeck_db;<\/pre>\n<pre>MariaDB [(none)]&gt; CREATE USER 'rundeck_user'@'localhost' IDENTIFIED BY 'my-strong-password';<\/pre>\n<pre>MariaDB [(none)]&gt; GRANT ALL PRIVILEGES ON *.* TO 'rundeck_user'@'localhost' WITH GRANT OPTION;<\/pre>\n<pre>MariaDB [(none)]&gt; FLUSH PRIVILEGES;<\/pre>\n<pre>MariaDB [(none)]&gt; exit<\/pre>\n<p>Replace <strong>my-strong-password<\/strong> with your database password which will be used by the Rundeck application.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1007\" height=\"390\" class=\"wp-image-13383\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-544.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-544.png 1007w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-544-300x116.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-544-768x297.png 768w\" sizes=\"auto, (max-width: 1007px) 100vw, 1007px\" \/><\/p>\n<h2>Install Rundeck on Ubuntu 20.4<\/h2>\n<p>The Rundeck application package is not available in Ubuntu 20.04 by default. We need to Create a repository file and append the following content in the file.<\/p>\n<pre>$ sudo nano \/etc\/apt\/sources.list.d\/rundeck.list<\/pre>\n<pre>deb https:\/\/packages.rundeck.com\/pagerduty\/rundeck\/any\/ any main<\/pre>\n<pre>deb-src https:\/\/packages.rundeck.com\/pagerduty\/rundeck\/any\/ any main<\/pre>\n<p>Save the file and exit.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"854\" height=\"125\" class=\"wp-image-13384\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-545.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-545.png 854w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-545-300x44.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-545-768x112.png 768w\" sizes=\"auto, (max-width: 854px) 100vw, 854px\" \/><\/p>\n<p>Once the repository file is created, run the following command to import the repo signing key.<\/p>\n<pre>$ curl -L https:\/\/packages.rundeck.com\/pagerduty\/rundeck\/gpgkey | sudo apt-key add -<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"997\" height=\"120\" class=\"wp-image-13385\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-546.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-546.png 997w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-546-300x36.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-546-768x92.png 768w\" sizes=\"auto, (max-width: 997px) 100vw, 997px\" \/><\/p>\n<p>Update the Ubuntu system to reflect the changes<\/p>\n<pre>$ sudo apt update<\/pre>\n<p>Now install rundeck using the following command.<\/p>\n<pre>$ sudo apt install rundeck<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1095\" height=\"288\" class=\"wp-image-13386\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-547.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-547.png 1095w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-547-300x79.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-547-1024x269.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-547-768x202.png 768w\" sizes=\"auto, (max-width: 1095px) 100vw, 1095px\" \/><\/p>\n<h2>Update the configuration file<\/h2>\n<p>Once the installation is completed, some configuration files need to be changed. Edit the file rundeck-config.properties using any text editor and make the following changes.<\/p>\n<pre>$ sudo nano \/etc\/rundeck\/rundeck-config.properties<\/pre>\n<pre>grails.serverURL=http:\/\/RUNDECK_SERVER_IP:4440<\/pre>\n<pre>dataSource.driverClassName = org.mariadb.jdbc.Driver<\/pre>\n<pre>dataSource.url = jdbc:mysql:\/\/localhost\/rundeck_db?autoReconnect=true&amp;useSSL=false<\/pre>\n<pre>dataSource.username = rundeck_user<\/pre>\n<pre>dataSource.password = my_strong_password<\/pre>\n<p>Replace the following things with your environment.<\/p>\n<ul>\n<li>grails.serverURL =&gt; Replace with your Rundesk server domain or IP with port<\/li>\n<li>dataSource.ur =&gt; Replace localhost with your database hostname, rundeck_db with your rundeck database name<\/li>\n<li>dataSource.username =&gt; Database username<\/li>\n<li>dataSource.password =&gt; Database password<\/li>\n<\/ul>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"936\" height=\"222\" class=\"wp-image-13387\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-548.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-548.png 936w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-548-300x71.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-548-768x182.png 768w\" sizes=\"auto, (max-width: 936px) 100vw, 936px\" \/><\/p>\n<p>Enable and start the rundeck service as:<\/p>\n<pre>$ sudo systemctl enable rundeckd.service<\/pre>\n<pre>$ sudo systemctl start rundeckd.service<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1083\" height=\"319\" class=\"wp-image-13388\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-549.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-549.png 1083w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-549-300x88.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-549-1024x302.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-549-768x226.png 768w\" sizes=\"auto, (max-width: 1083px) 100vw, 1083px\" \/><\/p>\n<h3>Allow the port in firewall<\/h3>\n<p>If ufw is running on the ubuntu system, we need to allow the rundeck port for incoming traffic. Run the following command to open the rundeck port.<\/p>\n<pre>$ sudo ufw allow 4440\/tcp<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"607\" height=\"112\" class=\"wp-image-13389\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-550.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-550.png 607w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-550-300x55.png 300w\" sizes=\"auto, (max-width: 607px) 100vw, 607px\" \/><\/p>\n<h2>Access the Rundeck webui<\/h2>\n<pre><a href=\"http:\/\/rundeck_server_ip:8080\">http:\/\/rundeck_server_ip:<\/a>4440<\/pre>\n<p>Use the following credentials<\/p>\n<p>Username: admin<\/p>\n<p>Password : admin<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"769\" height=\"361\" class=\"wp-image-13390\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-551.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-551.png 769w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-551-300x141.png 300w\" sizes=\"auto, (max-width: 769px) 100vw, 769px\" \/><\/p>\n<p>Dashboard after login<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" width=\"1087\" height=\"415\" class=\"wp-image-13391\" src=\"http:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-552.png\" srcset=\"https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-552.png 1087w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-552-300x115.png 300w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-552-1024x391.png 1024w, https:\/\/linuxways.net\/wp-content\/uploads\/2021\/12\/word-image-552-768x293.png 768w\" sizes=\"auto, (max-width: 1087px) 100vw, 1087px\" \/><\/p>\n<h2>Conclusion<\/h2>\n<p>In this article, we learned how to install Rundeck on Ubuntu 20.04 for task automations. Also we covered how to allow the port in the firewall and access Rundeck webui in the browser.<\/p>\n<pre><\/pre>","protected":false},"excerpt":{"rendered":"<p>If you are searching for easy and open source software for automation service then Rundeck might be a best option. It is very useful to create simple to&hellip;<\/p>","protected":false},"author":1,"featured_media":13551,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[806,100],"class_list":["post-13379","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ubuntu","tag-rundeck","tag-ubuntu-20-04"],"_links":{"self":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/13379","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/comments?post=13379"}],"version-history":[{"count":0,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/posts\/13379\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media\/13551"}],"wp:attachment":[{"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/media?parent=13379"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/categories?post=13379"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linuxways.net\/de\/wp-json\/wp\/v2\/tags?post=13379"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}