PESolut / my-resume

my-resume-repo
0 stars 0 forks source link

Install the appropriate Java version (Jenkins requires Java 8 or 11) #30

Open PESolut opened 4 hours ago

PESolut commented 4 hours ago

As part of our prerequisite steps to set up a CI/CD pipeline, we need to install the appropriate Java version for Jenkins on our EC2 instance.

Objective

Install the most suitable Java version to ensure optimal performance and compatibility with our Jenkins installation.

Steps:

  1. Verify current Java installation:

    • [ ] Check if Java is already installed: java -version
  2. Remove any outdated Java versions (if necessary):

    • [ ] Uninstall older Java versions if present
  3. Install OpenJDK 17:

    • [ ] Update package index: sudo yum update
    • [ ] Install OpenJDK 17: sudo yum install java-17-amazon-corretto
  4. Verify Java installation:

    • [ ] Check installed version: java -version
    • [ ] Ensure OpenJDK 17 is correctly installed
  5. Set JAVA_HOME environment variable:

    • [ ] Locate Java installation directory
    • [ ] Add JAVA_HOME to /etc/environment
  6. Apply changes:

    • [ ] Source the updated environment file or restart the shell

Verification:

Notes:

This installation ensures the appropriate Java version is set up on our EC2 instance, preparing it for Jenkins installation and integration with AWS services.