Skip to content

Latest commit

 

History

History
105 lines (86 loc) · 3.1 KB

1.0-env-prepare.md

File metadata and controls

105 lines (86 loc) · 3.1 KB

Prerequisites Installation for the Microservices Class


0. Demo

  • The VM is provided for every student.
  • The VM has everything needed for the class labs.
  • The following is for reference purposes only.

1. Verify Java

java -version

OpenJDK Runtime Environment Corretto-17.0.11.9.1

If not there, install Java JDK 17

  • Download:

  • Installation:

    • Windows: Run the downloaded installer and follow the setup instructions.
    • macOS: Open the .dmg file and drag the JDK package to the Applications folder.
    • Linux: Use your package manager:
      sudo apt update
      sudo apt install openjdk-17-jdk
  • Set JAVA_HOME:

    • Windows:
      1. Open Environment Variables (System Properties > Advanced > Environment Variables).
      2. Add a new system variable with Name: JAVA_HOME and Value as the JDK installation path.
    • macOS/Linux:
      • Add the following to your shell configuration file (~/.bashrc, ~/.zshrc, etc.):
        export JAVA_HOME=/usr/lib/jvm/java-17-openjdk
        export PATH=$JAVA_HOME/bin:$PATH
      • Run source ~/.bashrc or source ~/.zshrc to apply changes.
  • Verify Installation:

    java -version
    
    

2. Install MySQL

Download and Install

  • Download MySQL from MySQL Downloads and follow the instructions for your operating system:
    • Windows/macOS: Run the installer and set up a root password.
    • Linux:
      sudo apt update
      sudo apt install mysql-server

Secure Installation (Linux only)

  • Run the following command and follow the prompts to set the root password and secure MySQL:
    sudo mysql_secure_installation

Start MySQL Service

  • Windows: MySQL typically starts automatically. Use Services to manage.
  • macOS: Use System Preferences or run:
    brew services start mysql
  • Linux:
    sudo systemctl start mysql

Verify MySQL Access

  • Open a terminal and enter:
    mysql -u root -p
  • When prompted, enter the password you set for the root user.

3. Install Docker

Download and Install Docker Desktop

  • Download Docker Desktop for your operating system from Docker’s website.
  • Follow the installation instructions:
    • Windows/macOS: Run the installer and start Docker Desktop.
    • Linux:
      sudo apt update
      sudo apt install docker.io

Configure Docker (Linux only)

  • Add your user to the Docker group to run Docker without sudo:
    sudo usermod -aG docker $USER
  • Log out and log back in to apply the change.

Verify Docker Installation

  • Open a terminal and enter:
    docker --version
  • You should see output like Docker version x.xx.x, confirming Docker is installed.