Posts

Showing posts with the label linux

Install Java JDK on Linux or MacOS

This article explains the steps involved to install Java JDK on Linux or MacOS. Get the architecture of the Machine from Terminal using: uname -m Create a directory for installation: mkdir -p $HOME/tools/java Download latest java LTS binary: Download java 25 binary for Linux / Mac OS operating system with the correct architecture type to directory $HOME/tools/java Download URL https://adoptium.net/en-GB/temurin/releases?mode=filter&os=any&arch=any Extract and rename java binary: find $HOME/tools/java -type f -name OpenJDK25*.tar.gz | xargs -I {} mv {} $HOME/tools/java/OpenJDK25.tar.gz tar -xvzf $HOME/tools/java/OpenJDK25.tar.gz -C $HOME/tools/java find $HOME/tools/java -type d -name jdk-25* | xargs -I {} mv {} $HOME/tools/java/jdk-25 Make the extracted binaries as executables: chmod a+rwx -R $HOME/tools/java/* Identify the shell used in the Terminal using: echo $SHELL Configure PATH: Add the following lines to $HOME/.bash_profile or $HOME/.bashrc or $HOME/.zprofile based on ...

Maven - Manual installation on Linux or MacOS

This article explains the steps to manually install a specific version of maven downloaded directly from maven website or internal artificatory of an organisation. Create a directory for installation: mkdir -p $HOME/tools/maven Download the binary: From https://maven.apache.org/download.cgi download latest static binary eg: apache-maven-3.9.11-bin.tar.gz to $HOME/tools/maven directory Extract and rename the binary: find $HOME/tools/maven -type f -name apache-maven-*.tar.gz | xargs -I {} mv {} $HOME/tools/maven/apache-maven-bin.tar.gz tar -xvzf $HOME/tools/maven/apache-maven-bin.tar.gz -C $HOME/tools/maven find $HOME/tools/maven -type d -name apache-maven-* | xargs -I {} mv {} $HOME/tools/maven/apache-maven Make files executable: chmod a+rwx -R $HOME/tools/maven/* Identify the shell type: echo $SHELL Configure PATH: Add the following lines to $HOME/.bash_profile or $HOME/.bashrc  or  $HOME/.zprofile  and restart system for the changes to take effect export MAVEN_HOME=$...

Install Docker Engine and Compose on Linux machines (for developers)

Install docker: Know the linux architecture type using uname -m mkdir -p $HOME/tools/docker_engine Download latest static binary from https://download.docker.com/linux/static/stable/ to $HOME/tools/docker_engine sudo groupadd docker sudo gpasswd -a ${USER} docker newgrp docker find $HOME/tools/docker_engine -type f -name docker-*.tar.gz | xargs -I {} mv {} $HOME/tools/docker_engine/docker-engine.tar.gz tar -xvzf $HOME/tools/docker_engine/docker-engine.tar.gz -C $HOME/tools/docker_engine chmod a+rwx -R $HOME/tools/docker_engine/* ls -1 $HOME/tools/docker_engine/docker | xargs -I{} sudo ln -sfn $HOME/tools/docker_engine/docker/{} /usr/bin/{} Start docker service manually in the foreground sudo dockerd press Ctrl+C to stop/kill the docker engine Start docker service manually in the background sudo su nohup dockerd > /dev/null 2>&1 & exit Kill the docker service running in the background sudo ps -Aef | grep dockerd | grep -v grep | tr -s ' ' | cut -d' ' -f2 |...

Bash Script Example

calculate.sh