Friday, June 26, 2020

How to Install Apache Spark on Linux Ubuntu

First of all, you need to have Java already installed; if you don't I recommend this article to install Java. Then you will need to install Scala:

Once done installing Scala, you will need to download the Apache Spark binaries archive and install it:

Afterward and in order to avoid moving to Spark's bin directory every time you want to interact with it, add Spark's bin directory to the PATH system's variable. To do so open .bashrc script vim .bashrc and add the following lines in the bottom of the file:

That's it, you only have to apply the last modifications running source ~/.bashrc

Monday, June 22, 2020

How to Install MongoDB on Linux Ubuntu 18.04

1- Import the MongoDB public GPG Key:
2- Create the /etc/apt/sources.list.d/mongodb-org-4.2.list file for Ubuntu 18.04 (Bionic):
3- Reload the local package database:
4- Install MongoDB:
5- Start MongoDB service:
6- Start a Mongo shell:
8- Create users database:
9- Create an adminstrator user:
10- Exit the Mongo shell:
11- Open the MongoDB configuration file sudo vim /etc/mongod.conf and edit the following parameters:
12- Restart MongoDB process:

How to Install Apache Kafka on Linux Ubuntu

In order to install Apache Kafka you should have Java installed and JAVA_HOME environment variable set; if not follow the first instructions of this article.
1- Download Zookeeper:

2- Extract the archive content:

3- Create Zookeeper configuration file from the sample provided:

4- Open the startup script file vim ~/.bashrc and add the following content:

5- activate the new path settings:

6- Start zookeeper service:

7- Download Kafka:

8- Create an installation folder for Kafka:

9- Extract the archive content:

10- Open the startup script file vim ~/.bashrc and add the following content:

11- activate the new path settings:

12- Create a shortcut to Kafka configuration file:

13- Edit listners parameter within Kafka configuration file i.e.:
listeners=PLAINTEXT://thedevopsnerdworld.com:9092
14- Start Kafka service:

Saturday, June 20, 2020

The Best Way to Install Java JDK and Eclipse IDE on Linux Ubuntu Desktop

In order to install Java on your ubuntu, I assume you are working from home directory cd ~ or cd $HOME which in my case is "/home/omar" or use sudo su - to switch to root user and avoid typing sudo everytime you need root privilege. To start, open a new terminal Ctrl+Alt+T and run the following command: then run the command below to find JDK installation directory: Afterward, open the startup script file vim ~/.bashrc and add the following lines in the bottom: then run the following command to activate the new path settings immediately: Now that you have java installed, go to Eclipse IDE download page: https://www.eclipse.org/downloads/download.php?file=/oomph/epp/2020-06/R/eclipse-inst-linux64.tar.gz and download the Eclipse installer archive. Once downloaded, extract the archive content by running the command below: After extracting the installer, open vim ~/eclipse-installer/eclipse-inst.ini file and append the following configuration: then launch the installer: cd ~/eclipse-installer/ && ./eclipse-inst and choose Eclipse IDE for Enterprise Java Developers. Once you have Eclipse installed, open its configuration file vim ~/eclipse/jee-2020-06/eclipse/eclipse.ini and add the following: now, create a shortcut for eclipse by creating a new file vim ~/eclipse.desktop and inserting the following content into it: then install the shortcut: That's it, congratulation! from now on you can find your Eclipse among Ubuntu applications.

Bonus: 

 You can also install Lombok utility within eclipse; all you have to do is go to Lombok download page: https://projectlombok.org/download and download the jar. Once the jar downloaded, launch it by running java -jar lombok.jar and specify the eclipse.ini file location /home/omar/eclipse/jee-2020-06/eclipse/eclipse.ini