- sudo -i
- yum update
- yum list available java*
- yum install java-11-openjdk
- alternatives –config java
- choose the one you want
Back to blog
Installing Java on CentOS 7 & Red Hat Enterprise Linux 7
Installing Java 11 (OpenJDK) on CentOS 7 and RHEL 7 with yum, plus picking an alternative version — a short step-by-step guide.
javalinux
More posts
All posts$ javac Main.java $ java Main Hello, World!
What's New in Java 21: Virtual Threads, Records and Pattern Matching
The Java 21 LTS features that change day-to-day code the most — virtual threads, records, switch pattern matching, record patterns, sealed classes and sequenced collections.
$ ssh deploy@server $ systemctl status app $ journalctl -u app -f $ df -h
SSH Config, Key Management and Tunneling
Generating ed25519 keys, ssh-agent, shortcuts with ~/.ssh/config, jump hosts, port forwarding (-L, -R, -D) and server-side hardening.
$ ssh deploy@server $ systemctl status app $ journalctl -u app -f $ df -h
Writing a Linux Service with systemd
Running an app as a systemd service — unit files, restart policies, environment variables, reading logs with journalctl, and scheduled jobs with timers.