×



NetBeans is an open-source IDE using which you can easily develop applications based on Java, C++, PHP, and few other programming languages. It can run on any java supporting OS like Linux, MacOS, Windows, and BSD.

Here at LinuxAPT, as part of our Server Management Services, we regularly help our Customers to perform related System Software Installation queries.

Previously, we described the installation of NetBeans on Ubuntu

In this context, we shall look into how to install NetBeans on CentOS 8.


How to Install NetBeans on CentOS ?

Before proceeding with this Installation procedure, ensure that you are using a user with sudo access.

To install NetBeans on CentOS, there are following two methods:

  • Installation via installer script.
  • Installation via snap.


1. NetBeans Installation via Installer Script

Here, we will install NetBeans using the installer script available at Apache NetBeans's official website. Using this installation method, you can have the latest version of NetBeans. For NetBeans, you will also require JDK installed on your CentOS machine. The complete steps for the installation of NetBeans via installer script are as follows.

i. First, you will need to install JDK on your CentOS system. Use the command below to install it:

$ sudo dnf install java-11-openjdk java-11-openjdk-devel

Enter sudo password and hit y when prompted with y/N.

ii. Next, you will need to download Apache NetBeans on your system. Visit Apache NetBeans official website and download the latest available version of the installer script version for Linux. The latest version available at the NetBeans site is 12.4, but here we are going to download the version 12.0.

You can also use the command below in your Linux Terminal to download the NetBeans installer script version 12.0.

$ wget https://downloads.apache.org/netbeans/netbeans/12.0/Apache-NetBeans-12.0-bin-linux-x64.sh

You can find the downloaded script in your current directory. 

iii. Now run the downloaded script. However, before that, we will need to first make it executable. Use the command below to do so:

$ sudo chmod +x Apache-NetBeans-12.0-bin-linux-x64.sh

Note: Make sure in the above command you mention the correct version of the script you have downloaded. You can also type initial letters like Apache-NetBeans and use the tab to auto complete the name.

iv. After making the script executable, we can run it as follows:

$ sudo ./Apache-NetBeans-12.0-bin-linux-x64.sh

After running the script, the installer wizard will appear on your screen. Click Next to start the installation process.

Then accept the Terms and conditions by checking the box and click Next.

Then choose the installation directory or leave the default directory selected and click Next.

In the next window, check the box named Check for Updates and then hit Install button.

Next, the installation of Apache NetBeans will be started.

After the installation of Apache NetBeans is completed successfully, you will see the below window. Click Finish to complete the setup.


2. NetBeans Installation via Snap

The snap package for NetBeans is also available for installation on CentOS. This method also installs the latest version of Apache NetBeans on your system.

The complete steps are as follows.

i. You must first enable the EPEL repository in order to install snapd. Here is the command to do so:

$ sudo yum install epel-release

Provide sudo password and hit y when prompted with y/N.

ii. You can now use the yum command to install snapd as follows:

$ sudo yum install snapd

Provide sudo password and hit y when prompted with y/N.

iii. After installing snapd, you will have to enable the snapd.socket:

$ sudo systemctl enable --now snapd.socket

iv. Then create a symlink for enabling classic snap support:

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

v. Now, you can install Apache NetBeans as follows:

$ sudo snap install netbeans --classic


How to Launch NetBeans ?

When the installation of NetBeans is completed, you can launch it from application menu (GUI). Go to the Activities tab in the top left corner of the desktop. Then in the search area, type netbeans. From the results, click the NetBeans icon to open it.


How to Uninstall NetBeans from CentOS 8 machine ?

If you want to remove NetBeans from your system, you can do so using the following methods:

If you have installed NetBeans using the installer script, you can uninstall it as follows:

Move inside the NetBeans installation directory located under the Home directory:

$ cd netbeans-12.0/

Then run the uninstall script as follows:

$ uninstall.sh

After running the above command, a window will appear showing you the components which will be uninstalled. Click Uninstall and once it is done, click Finish.

If you have installed NetBeans using the snap, you can uninstall it as follows:

$ sudo snap remove netbeans

Enter sudo password, after which it will be removed from your system.


[Need assistance in Installing Software Packages on Linux System ? We can help you. ]


Conclusion


More Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on IbmiMedia.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com