Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- download java ex jdk-8u171-linux-x64.tar.gz
- scp -i /Users/chandrakumar/pmay/chanduaws.pem jdk-8u171-linux-x64.tar.gz ec2-user@host-name:
- ssh -i /Users/chandrakumar/pmay/chanduaws.pem ec2-user@host-name
- mkdir /usr/java create dir java in usr
- cd /usr/java
- cp /home/ec2-user/temp/jdk-8u171-linux-x64.tar.gz .
- . means copy to current directory
- tar xzf jdk-8u171-linux-x64.tar.gz
- chown -R root:root jdk1.8.0_171
- alternatives --install /usr/bin/java java /usr/java/jdk1.8.0_171/bin/java 1
- alternatives --config java
- There are 2 programs which provide 'java'.
- Selection Command
- -----------------------------------------------
- *+ 1 /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java
- 2 /usr/java/jdk1.8.0_171/bin/java
- Enter to keep the current selection[+], or type selection number: 2
- alternatives --config java
- There are 2 programs which provide 'java'.
- Selection Command
- -----------------------------------------------
- * 1 /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java
- + 2 /usr/java/jdk1.8.0_171/bin/java
- Enter to keep the current selection[+], or type selection number:
- ---- SET JAVA HOME --
- cd /etc/profile.d
- vi java.sh
- export JAVA_HOME='/usr/java/jdk1.8.0_171'
- ----install keytool ----
- update-alternatives --install /usr/bin/keytool keytool /usr/java/jdk1.8.0_171/bin/keytool 100
Add Comment
Please, Sign In to add comment