Guest User

Untitled

a guest
Jun 21st, 2018
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. download java ex jdk-8u171-linux-x64.tar.gz
  2. scp -i /Users/chandrakumar/pmay/chanduaws.pem jdk-8u171-linux-x64.tar.gz ec2-user@host-name:
  3. ssh -i /Users/chandrakumar/pmay/chanduaws.pem ec2-user@host-name
  4.  
  5. mkdir /usr/java create dir java in usr
  6. cd /usr/java
  7. cp /home/ec2-user/temp/jdk-8u171-linux-x64.tar.gz .
  8. . means copy to current directory
  9. tar xzf jdk-8u171-linux-x64.tar.gz
  10. chown -R root:root jdk1.8.0_171
  11. alternatives --install /usr/bin/java java /usr/java/jdk1.8.0_171/bin/java 1
  12. alternatives --config java
  13.  
  14. There are 2 programs which provide 'java'.
  15.  
  16. Selection Command
  17. -----------------------------------------------
  18. *+ 1 /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java
  19. 2 /usr/java/jdk1.8.0_171/bin/java
  20.  
  21. Enter to keep the current selection[+], or type selection number: 2
  22.  
  23.  
  24. alternatives --config java
  25. There are 2 programs which provide 'java'.
  26.  
  27. Selection Command
  28. -----------------------------------------------
  29. * 1 /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java
  30. + 2 /usr/java/jdk1.8.0_171/bin/java
  31.  
  32. Enter to keep the current selection[+], or type selection number:
  33.  
  34. ---- SET JAVA HOME --
  35.  
  36. cd /etc/profile.d
  37.  
  38. vi java.sh
  39.  
  40. export JAVA_HOME='/usr/java/jdk1.8.0_171'
  41.  
  42.  
  43. ----install keytool ----
  44.  
  45. update-alternatives --install /usr/bin/keytool keytool /usr/java/jdk1.8.0_171/bin/keytool 100
Add Comment
Please, Sign In to add comment