Install and Configure IntelliJ on RHEL 9 | CentOS 9

Install IntelliJ on RHEL 9

Learn how to install and configure IntelliJ IDEA on RHEL 9 | CentOS 9. Follow this step-by-step guide with CLI examples, optimization tips, and performance tweaks for an efficient development environment.

Table of Contents

Introduction

IntelliJ IDEA is a powerful, feature-rich integrated development environment (IDE) designed for Java and other programming languages. Developed by JetBrains, it provides advanced coding assistance, debugging, and integration with various development tools. If you are using RHEL 9 or CentOS 9 and need a professional-grade IDE, IntelliJ IDEA is an excellent choice.

In this guide, we will walk you through the installation and configuration of IntelliJ IDEA on RHEL 9 and CentOS 9. This article is crafted with an SEO-focused approach to ensure it ranks high in search engine results.

Prerequisites

Before proceeding with the installation, ensure your system meets the following requirements:

RequirementDescription
OSRHEL 9 / CentOS 9
User PrivilegesSudo/root access
MemoryMinimum 2GB RAM (Recommended: 4GB or more)
Disk SpaceAt least 3GB free space
Java RuntimeOpenJDK 11 or newer

Install IntelliJ on RHEL 9 | CentOS 9: Step-by-Step Instructions

Step 1: Update System Packages

First, update your system’s security packages and reboot it:

				
					sudo dnf update -y && sudo systemctl reboot
				
			
Install IntelliJ on RHEL 9

Photo by admingeek from Infotechys

Step 2: Install IntelliJ IDEA

There are two main ways to install IntelliJ IDEA on RHEL 9 | CentOS 9: using Snap or via the tar.gz archive.

Method 1: Installing IntelliJ IDEA via Snap

Snap is a package management system that makes installation easier. First, enable Snap on RHEL/CentOS 9:

Install EPEL on RHEL 9
				
					sudo dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
				
			
EPEL on CentOS 9
				
					sudo dnf install -y epel-release
				
			
Install and Enable Snap
				
					sudo dnf install snapd -y
				
			
				
					sudo systemctl enable --now snapd.socket
				
			

Once Snap is installed, install IntelliJ IDEA Community Edition:

				
					sudo snap install intellij-idea-community --classic
				
			

For the Ultimate Edition:

				
					sudo snap install intellij-idea-ultimate --classic
				
			
Troubleshooting Snap Install Error

If you received the following error(s) (image below) during the install …

Install IntelliJ on RHEL 9

Photo by admingeek from Infotechys

Run the following commands:

				
					sudo ln -s /var/lib/snapd/snap /snap
				
			

Then, try installing (community or ultimate) IntelliJ IDEA again:

				
					sudo snap install intellij-idea-community --classic
				
			

Method 2: Installing IntelliJ IDEA via Tarball

If you prefer to install IntelliJ IDEA manually, download the latest IntelliJ IDEA package:

				
					wget https://download.jetbrains.com/idea/ideaIC-2023.1.tar.gz -O intellij.tar.gz
				
			

Extract the archive:

				
					sudo tar -xvzf intellij.tar.gz -C /opt/
				
			

Move into the extracted directory:

				
					cd /opt/idea-IC-*/bin/
				
			

Launch IntelliJ:

				
					./idea.sh
				
			
Install IntelliJ on RHEL 9

Photo by admingeek from Infotechys

To run IntelliJ IDEA from anywhere, create a symbolic link:

				
					sudo ln -s /opt/idea-IC-*/bin/idea.sh /usr/local/bin/intellij
				
			

Now, you can start IntelliJ IDEA with the command:

				
					intellij
				
			

Step 3: Enable New UI

You may be prompted to enable a new UI once Intellij is launched. Click the Enable new UI button and the Restart button to launch the new UI:

Install IntelliJ on RHEL 9

Photo by admingeek from Infotechys

Step 4: Configure IntelliJ

Set up Java Software Development Kit (SDK)

  • Open IntelliJ and click on New Project.
  • Next to JDK, select add JDK from the drop-down.
  • Enter the path where your JDK folder is located. If you haven’t download the JDK yet, you can do so directly from IntelliJ IDEA by selecting the Download JDK option from the drop-down menu and clicking the Download button.  The latest version (jdk-23.0.2 at the time of publication) will be downloaded to your home directory under the .jdks folder.
  • Click the Create or Cancel button to proceed. Each time you start a new project, and navigate to the JDK section, you’ll notice it is automatically detected.
Install IntelliJ on RHEL 9

Photo by admingeek from Infotechys

Step 5: Customize IntelliJ 

  • Open IntelliJ and navigate to Customize. 
  • On the right-side of the welcome screen, you can choose and customize options like Color themes and Keymaps.
Customize Option in IntelliJ IDEA

Photo by admingeek from Infotechys

Enabling Plugins

Enhance your development experience by installing essential plugins:

  • Select Plugins from the welcome screen (left sidebar).
  • Search or scroll the list for necessary plugins (e.g., Python, Docker, Kotlin) and install, enable, or disable them.
  • Click Install and re-launch IntelliJ IDEA.
Enabling Plugins in IntelliJ IDEA

Photo by admingeek from Infotechys

Step 6: Optimize IntelliJ Performance

To ensure IntelliJ IDEA runs smoothly on RHEL 9 | CentOS 9, apply these optimizations:

Increase Memory Allocation

Edit the IntelliJ JVM options file:

				
					vim ~/.idea.vmoptions
				
			

Modify the following values:

				
					-Xms1024m
-Xmx4096m
-XX:ReservedCodeCacheSize=512m
				
			

Save and exit the file.

Create a Desktop Icon

For easier access to IntelliJ IDEA and better desktop integration, you can create a desktop icon or shortcut that allows user access from the system’s Activities Menu:

  • Open IntelliJ and click the gear ⚙️ icon (settings) at the bottom left corner of the welcome screen. 
  • Select “Create Desktop Entry” from the menu.
Create a Desktop Icon for IntelliJ IDEA

Photo by admingeek from Infotechys

  • Click the checkbox next to “Create the entry for all users (requires user privilege)” – If there will be multiple users requiring access.
  • Enter your superuser credentials and click the OK button to proceed.
  • You should now be able to access IntelliJ IDEA from the Activities Menu and add it to your favorites as you wish.
Activities Menu - IntelliJ IDEA Desktop Icon

Photo by admingeek from Infotechys

Step 7: Uninstall IntelliJ IDEA

If you need to remove IntelliJ IDEA:

For Snap:

				
					sudo snap remove intellij-idea-community
				
			

For Manual Installation:

				
					sudo rm -rf /opt/idea-IC-* /usr/local/bin/intellij
				
			

Conclusion

Installing and configuring IntelliJ IDEA on RHEL 9 and CentOS 9 is straightforward with Snap or manual installation methods. By setting up the Java SDK, optimizing performance, and enabling essential plugins, you can create an efficient development environment tailored to your needs. Whether you are a Java developer or working with other languages, IntelliJ IDEA provides an excellent platform for coding, debugging, and project management.

Did you find this article useful? Your feedback helps us improve! Share your thoughts in the comments and spread the word with others who may find it helpful.

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *