How to Install Java on CentOS 7

How to install Java on CentOS 7How to install Java on CentOS 7

Java is the popular programming language owned by Oracle. Java is used to build cross-platform applications. Over 3 billion devices run on Java. In this tutorial, we are going to install Java on CentOS 7 using different methods.

Java has following three editions:

  1. Standard Edition(SE).
  2. Micro Edition(ME).
  3. Enterprize Edition(EE).

Following two implementations available for Java:

  1. Oracle Java.
  2. OpenJDK Java.

In this tutorial we are going to install Standard Edition (SE). There is no more difference in Oracle Java and OpenJDK Java as Oracle Java provides some additional enterprise features.

Prerequisites

Before you start to install Java on CentOS 7. You must have the non-root user account on your system with sudo privileges.

You should have curl package installed on your system. We are going to use curl package to download Oracle JRE/JDK from their official website. Install it by using following command.

sudo yum install curl

Install OpenJDK 8

Currentally, OpenJDK 8 is the latest LTS version of OpenJDK. Here we are going to install it with yum package manager.

Install OpenJDK 8 JRE

To install OpenJDK 8 JRE package run following command.

NOTE : If you have installed OpenJDK 8 JDK then we do not need to install OpenJDK 8 JRE As JRE is the subset of JDK.

sudo yum install java-1.8.0-openjdk

Install OpenJDK 8 JDK

Run the following command to install OpenJDK 8 using yum package manager:

sudo yum install java-1.8.0-openjdk-devel

Confirm the installation and check the version typing following command.

java -version

Install OpenJDK 7

Install OpenJDK 7 JDK

Run the following command to install OpenJDK 7 using yum package manager:

sudo yum install java-1.8.0-openjdk-devel

Install OpenJDK 7 JRE

To install OpenJDK 7 JRE package run following command.

NOTE : If you have installed OpenJDK 7 JDK then we do not need to install OpenJDK 8 JRE As JRE is the subset of JDK.

sudo yum install java-1.8.0-openjdk

Install Oracle Java 8

At the time writing this tutorial Oracle Java 8 is the latest LTS version of Oracle Java. Now to install Oracle Java 8 follow the instractions given below.

Install Oracle JRE 8

To download and install Oracle JRE 8 run following commands:

curl -L -b “oraclelicense=a” -O http://download.oracle.com/otn-pub/java/jdk/8u162-b12/0da788060d494f5095bf8624735fa2f1/jre-8u162-linux-x64.rpmsudo yum localinstall jre-8u162-linux-x64.rpm

Install Oracle JDK 8

Now to install Oracle JDK 8 you can run following commands:

curl -L -b “oraclelicense=a” -O http://download.oracle.com/otn-pub/java/jdk/8u162-b12/0da788060d494f5095bf8624735fa2f1/jdk-8u162-linux-x64.rpmsudo yum localinstall jdk-8u162-linux-x64.rpm

Install Oracle Java 9

If you want to install Oracle Java 9 then you can use following instractions.

Install Oracle JRE 9

To download and install Oracle JRE 9 run following commands:

curl -L -b “oraclelicense=a” -O http://download.oracle.com/otn-pub/java/jdk/9.0.4+11/c2514751926b4512b076cc82f959763f/jre-9.0.4_linux-x64_bin.rpmsudo yum localinstall jre-9.0.4_linux-x64_bin.rpm

Install Oracle JDK 9

Now to download and install Oracle JDK 9 you can run following commands:

curl -L -b “oraclelicense=a” -O http://download.oracle.com/otn-pub/java/jdk/9.0.4+11/c2514751926b4512b076cc82f959763f/jdk-9.0.4_linux-x64_bin.rpmsudo yum localinstall jdk-9.0.4_linux-x64_bin.rpm

Setting up default Java Version

If you have installed multiple versions of Java on your system then you can change the default version running following command.

Check Current Java Version running following command.

java -version

Now to change default Java version run following command.

sudo alternatives –config java

The output should be:

There is 1 choice for the alternative java (providing /usr/bin/java).

Selection Path Priority Status
—————————————————————————————
0 /usr/lib/jvm/java-8-oracle/jre/bin/java 1081 auto mode
1 /usr/lib/jvm/java-8-oracle/jre/bin/java 1081 manual mode
* 2 /usr/local/oracle-java-10/jdk-10.0.2/bin/java 1500 manual mode

Press to keep the current choice[*], or type selection number:

NOTE: To change version just enter the number in the selection column and hit ENTER

Conclusion

You have successfully learned How to install Java on CentOS 7. If you have any queries regarding this then please don’t forget to comment below.

Source

Seven Kingdoms: Ancient Adversaries, the classic open source RTS has a new release

Just before the end of 2018, the open source classic RTS Seven Kingdoms: Ancient Adversaries had a fresh release out.

While perhaps not as popular as titles like OpenRA for classic Red Alert, Seven Kingdoms: Ancient Adversaries is still a great classic RTS worth trying out that plays rather differently to a lot of other strategy games.

The latest release isn’t big on features, but it will make the experience more stable. It includes multiple fixes for desync issues and an issue with multiplayer save files going out of sync. There’s also improved cross-compilation and platform support and lots of other little fixes.

Great to see one of my first ever RTS games still seeing updates many years on. See their news post here.

You can find the source on GitHub (build instructions are here). Older versions are usually available in your distribution repository to install from your local package manager.

Source

EU Offers Bug Bounties For 14 Open Source Projects | Linux.com

As the bug bounty programs begin to roll out in January, security experts worry that the programs miss the mark on truly securing open source projects.

The European Commission in January is funding 14 bug bounty programs in hopes of sniffing out vulnerabilities in the free open source projects that EU institutions rely on.

The bug bounty programs span 14 open source software projects and offers a total of almost $1 million for all bounties combined. The bug bounty programs have varying rewards, start and end dates, and platforms. The first bug bounty programs – for Filezilla, Apache Kafka, Notepad++, PuTTy, and VLC Media Player – begin next week on Jan. 7.

The initiative stems back to the Free and Open Source Software Audit project (FOSSA), first created by European Parliament member Julia Reda.

Source

Linux commands for measuring disk activity

Linux distributions provide quite a few useful commands for gauging disk activity. Here’s a look at a few of them.

Linux systems provide a handy suite of commands for helping you see how busy your disks are, not just how full. In this post, we examine five very useful commands for looking into disk activity. Two of the commands (iostat and ioping) may have to be added to your system, and these same two commands require you to use sudo privileges, but all five commands provide useful ways to view disk activity.

Probably one of the easiest and most obvious of these commands is dstat.

dtstat

In spite of the fact that the dstat command begins with the letter “d”, it provides stats on a lot more than just disk activity. If you want to view just disk activity, you can use the -d option. As shown below, you’ll get a continuous list of disk read/write measurements until you stop the display with a ^c. Note that after the first report, each subsequent row in the display will report disk activity in the following time interval, and the default is only one second.

$ dstat -d
-dsk/total-
read writ
949B 73k
65k 0 <== first second
0 24k <== second second
0 16k
0 0 ^C

Including a number after the -d option will set the interval to that number of seconds.

$ dstat -d 10
-dsk/total-
read writ
949B 73k
65k 81M <== first five seconds
0 21k <== second five second
0 9011B ^C

Notice that the reported data may be shown in a number of different units — e.g., M (megabytes), k (kilobytes), and B (bytes).

Without options, the dstat command is going to show you a lot of other information as well — indicating how the CPU is spending its time, displaying network and paging activity, and reporting on interrupts and context switches.

$ dstat
You did not select any stats, using -cdngy by default.
–total-cpu-usage– -dsk/total- -net/total- —paging– —system–
usr sys idl wai stl| read writ| recv send| in out | int csw
0 0 100 0 0| 949B 73k| 0 0 | 0 3B| 38 65
0 0 100 0 0| 0 0 | 218B 932B| 0 0 | 53 68
0 1 99 0 0| 0 16k| 64B 468B| 0 0 | 64 81 ^C

The dstat command provides valuable insights into overall Linux system performance, pretty much replacing a collection of older tools, such as vmstat, netstat, iostat, and ifstat, with a flexible and powerful command that combines their features. For more insight into the other information that the dstat command can provide, refer to this post on the dstat command.

iostat

The iostat command helps monitor system input/output device loading by observing the time the devices are active in relation to their average transfer rates. It’s sometimes used to evaluate the balance of activity between disks.

$ iostat
Linux 4.18.0-041800-generic (butterfly) 12/26/2018 _x86_64_ (2 CPU)

avg-cpu: %user %nice %system %iowait %steal %idle
0.07 0.01 0.03 0.05 0.00 99.85

Device tps kB_read/s kB_wrtn/s kB_read kB_wrtn
loop0 0.00 0.00 0.00 1048 0
loop1 0.00 0.00 0.00 365 0
loop2 0.00 0.00 0.00 1056 0
loop3 0.00 0.01 0.00 16169 0
loop4 0.00 0.00 0.00 413 0
loop5 0.00 0.00 0.00 1184 0
loop6 0.00 0.00 0.00 1062 0
loop7 0.00 0.00 0.00 5261 0
sda 1.06 0.89 72.66 2837453 232735080
sdb 0.00 0.02 0.00 48669 40
loop8 0.00 0.00 0.00 1053 0
loop9 0.01 0.01 0.00 18949 0
loop10 0.00 0.00 0.00 56 0
loop11 0.00 0.00 0.00 7090 0
loop12 0.00 0.00 0.00 1160 0
loop13 0.00 0.00 0.00 108 0
loop14 0.00 0.00 0.00 3572 0
loop15 0.01 0.01 0.00 20026 0
loop16 0.00 0.00 0.00 24 0

Of course, all the stats provided on Linux loop devices can clutter the display when you want to focus solely on your disks. The command, however, does provide the -p option, which allows you to just look at your disks — as shown in the commands below.

$ iostat -p sda
Linux 4.18.0-041800-generic (butterfly) 12/26/2018 _x86_64_ (2 CPU)

avg-cpu: %user %nice %system %iowait %steal %idle
0.07 0.01 0.03 0.05 0.00 99.85

Device tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sda 1.06 0.89 72.54 2843737 232815784
sda1 1.04 0.88 72.54 2821733 232815784

Note that tps refers to transfers per second.

You can also get iostat to provide repeated reports. In the example below, we’re getting measurements every five seconds by using the -d option.

$ iostat -p sda -d 5
Linux 4.18.0-041800-generic (butterfly) 12/26/2018 _x86_64_ (2 CPU)

Device tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sda 1.06 0.89 72.51 2843749 232834048
sda1 1.04 0.88 72.51 2821745 232834048

Device tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sda 0.80 0.00 11.20 0 56
sda1 0.80 0.00 11.20 0 56

If you prefer to omit the first (stats since boot) report, add a -y to your command.

$ iostat -p sda -d 5 -y
Linux 4.18.0-041800-generic (butterfly) 12/26/2018 _x86_64_ (2 CPU)

Device tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sda 0.80 0.00 11.20 0 56
sda1 0.80 0.00 11.20 0 56

Next, we look at our second disk drive.

$ iostat -p sdb
Linux 4.18.0-041800-generic (butterfly) 12/26/2018 _x86_64_ (2 CPU)

avg-cpu: %user %nice %system %iowait %steal %idle
0.07 0.01 0.03 0.05 0.00 99.85

Device tps kB_read/s kB_wrtn/s kB_read kB_wrtn
sdb 0.00 0.02 0.00 48669 40
sdb2 0.00 0.00 0.00 4861 40
sdb1 0.00 0.01 0.00 35344 0

iotop

The iotop command is top-like utility for looking at disk I/O. It gathers I/O usage information provided by the Linux kernel so that you can get an idea which processes are most demanding in terms in disk I/O. In the example below, the loop time has been set to 5 seconds. The display will update itself, overwriting the previous output.

$ sudo iotop -d 5
Total DISK READ: 0.00 B/s | Total DISK WRITE: 1585.31 B/s
Current DISK READ: 0.00 B/s | Current DISK WRITE: 12.39 K/s
TID PRIO USER DISK READ DISK WRITE SWAPIN IO> COMMAND
32492 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.12 % [kworker/u8:1-ev~_power_efficient]
208 be/3 root 0.00 B/s 1585.31 B/s 0.00 % 0.11 % [jbd2/sda1-8]
1 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % init splash
2 be/4 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [kthreadd]
3 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [rcu_gp]
4 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [rcu_par_gp]
8 be/0 root 0.00 B/s 0.00 B/s 0.00 % 0.00 % [mm_percpu_wq]

ioping

The ioping command is an altogether different type of tool, but it can report disk latency — how long it takes a disk to respond to requests — and can be helpful in diagnosing disk problems.

$ sudo ioping /dev/sda1
4 KiB <<< /dev/sda1 (block device 111.8 GiB): request=1 time=960.2 us (warmup)
4 KiB <<< /dev/sda1 (block device 111.8 GiB): request=2 time=841.5 us
4 KiB <<< /dev/sda1 (block device 111.8 GiB): request=3 time=831.0 us
4 KiB <<< /dev/sda1 (block device 111.8 GiB): request=4 time=1.17 ms
^C
— /dev/sda1 (block device 111.8 GiB) ioping statistics —
3 requests completed in 2.84 ms, 12 KiB read, 1.05 k iops, 4.12 MiB/s
generated 4 requests in 3.37 s, 16 KiB, 1 iops, 4.75 KiB/s
min/avg/max/mdev = 831.0 us / 947.9 us / 1.17 ms / 158.0 us

atop

The atop command, like top provides a lot of information on system performance, including some stats on disk activity.

ATOP – butterfly 2018/12/26 17:24:19 37d3h13m—— 10ed
PRC | sys 0.03s | user 0.01s | #proc 179 | #zombie 0 | #exit 6 |
CPU | sys 1% | user 0% | irq 0% | idle 199% | wait 0% |
cpu | sys 1% | user 0% | irq 0% | idle 99% | cpu000 w 0% |
CPL | avg1 0.00 | avg5 0.00 | avg15 0.00 | csw 677 | intr 470 |
MEM | tot 5.8G | free 223.4M | cache 4.6G | buff 253.2M | slab 394.4M |
SWP | tot 2.0G | free 2.0G | | vmcom 1.9G | vmlim 4.9G |
DSK | sda | busy 0% | read 0 | write 7 | avio 1.14 ms |
NET | transport | tcpi 4 | tcpo stall 8 | udpi 1 | udpo 0swout 2255 |
NET | network | ipi 10 | ipo 7 | ipfrw 0 | deliv 60.67 ms |
NET | enp0s25 0% | pcki 10 | pcko 8 | si 1 Kbps | so 3 Kbp0.73 ms |

PID SYSCPU USRCPU VGROW RGROW ST EXC THR S CPUNR CPU CMD 1/1673e4 |
3357 0.01s 0.00s 672K 824K — – 1 R 0 0% atop
3359 0.01s 0.00s 0K 0K NE 0 0 E – 0% <ps>
3361 0.00s 0.01s 0K 0K NE 0 0 E – 0% <ps>
3363 0.01s 0.00s 0K 0K NE 0 0 E – 0% <ps>
31357 0.00s 0.00s 0K 0K — – 1 S 1 0% bash
3364 0.00s 0.00s 8032K 756K N- – 1 S 1 0% sleep
2931 0.00s 0.00s 0K 0K — – 1 I 1 0% kworker/u8:2-e
3356 0.00s 0.00s 0K 0K -E 0 0 E – 0% <sleep>
3360 0.00s 0.00s 0K 0K NE 0 0 E – 0% <sleep>
3362 0.00s 0.00s 0K 0K NE 0 0 E – 0% <sleep>

If you want to look at just the disk stats, you can easily manage that with a command like this:

$ atop | grep DSK
$ atop | grep DSK
DSK | sda | busy 0% | read 122901 | write 3318e3 | avio 0.67 ms |
DSK | sdb | busy 0% | read 1168 | write 103 | avio 0.73 ms |
DSK | sda | busy 2% | read 0 | write 92 | avio 2.39 ms |
DSK | sda | busy 2% | read 0 | write 94 | avio 2.47 ms |
DSK | sda | busy 2% | read 0 | write 99 | avio 2.26 ms |
DSK | sda | busy 2% | read 0 | write 94 | avio 2.43 ms |
DSK | sda | busy 2% | read 0 | write 94 | avio 2.43 ms |
DSK | sda | busy 2% | read 0 | write 92 | avio 2.43 ms |
^C

Being in the know with disk I/O

Linux provides enough commands to give you good insights into how hard your disks are working and help you focus on potential problems or slowdowns. Hopefully, one of these commands will tell you just what you need to know when it’s time to question disk performance. Occasional use of these commands will help ensure that especially busy or slow disks will be obvious when you need to check them.

Source

2019 and the Strength of Open Source | Linux.com

Now that the various challenges and successes of 2018 are behind us, let’s look back at some of the year’s highlights and see what’s in store for 2019 here on Linux.com.

Wins for 2018

2018 saw amazing growth for open source generally and for The Linux Foundation specifically, with huge tech acquisitions and widespread industry adoption stemming from more than 20 years of steady open source development and innovation.

At The Linux Foundation, this growth was reflected in the formation of many new projects, such as:

It was also reflected in record-breaking events, such as the sold-out KubeCon + CloudNativeCon; in the unprecedented number of new members joining The Linux Foundation last year; and in training milestones, such as surpassing the one million mark for the number of people enrolled in Linux Foundation training and certification courses on edX.

This interest in learning and training was seen on Linux.com as well, where tutorials were consistently the most popular articles on the website. For 2019, our goal is to feed that interest with articles that educate and inform and that provide a firm foundation from which to explore the array of tools, projects, and opportunities within the open source ecosystem. You can look forward to previews of the best Linux distributions, in-depth command-line tutorials, information on LF training courses, ebooks, and webinars, highlights from industry-leading events, and much more.

A word for 2019

I read an essay by Melinda Gates in which she said that, rather than making a list of resolutions, she picks a word for the year and uses to that word to inform her goals and shape her actions.

When pressed to choose a word for 2019, I choose strength. In doing so, I think about the various projects, teams, and individuals I work with and how we are more effective when we collaborate, learn from, and advocate for one another. I think about advances in terms of inclusion and acceptance and how diversity and civility can strengthen our community. I think about the opportunities we have to improve open source practices, expand them into new areas, and apply them to create solutions to new and existing problems.

Open source is a powerful catalyst; its strength lies in the bonds formed through open development and shared knowledge which combine to make a stronger and more resilient whole. Let’s carry that strength into 2019 and become stronger together.

Source

How To Install Atom Text Editor on CentOS 7

Atom is an open source cross-platform code editor developed by GitHub. It has a built-in package manager, embedded Git control, smart autocompletion, syntax highlighting and multiple panes.

Under the hood Atom is a desktop application built on Electron using HTML, JavaScript, CSS, and Node.js.

In this tutorial, we will install Atom Text Editor on CentOS from their official repositories.

Prerequisites

The user you are logged in as must have sudo privileges to be able to install packages.

Installing Atom on CentOS

Follow the steps below to install Atom on CentOS 7:

  1. Start by importing the Atom repository’s GPG key:

    sudo rpm –import https://packagecloud.io/AtomEditor/atom/gpgkey

  2. Create the following repo file to enable the Atom repository:

    sudo nano /etc/yum.repos.d/atom.repo

    Paste the following content into the file:

    /etc/yum.repos.d/vscode.repo

    [Atom]
    name=Atom Editor
    baseurl=https://packagecloud.io/AtomEditor/atom/el/7/$basearch
    enabled=1
    gpgcheck=0
    repo_gpgcheck=1
    gpgkey=https://packagecloud.io/AtomEditor/atom/gpgkey

    Save and close the file.

  3. Once the repository is enabled, install the latest version of Atom with:

    Yum will prompt you to import the repository GPG key. Type y and hit Enter.

Starting Atom

Now that Atom is installed on your CentOS system you can launch it either from the command line by typing code or by clicking on the Atom icon (Applications -> Programming -> Atom).

When you start the Atom editor for the first time, a window like the following should appear:

You can now start installing themes and extensions and configuring Atom according to your preferences.

Upgrading Atom

To upgrade your Atom installation when new releases are published, you can use the yum package manager normal upgrade procedure:

Conclusion

You have successfully installed Atom on your CentOS 7 machine. To learn more about how to use Atom, from beginner basics to advanced techniques, visit their official documentation page.

If you have any question, please leave a comment below.

Source

Canonical shares the Top 10 Linux Snaps of 2018 — Spotify, Slack, Plex, VLC, and more!

As 2018 comes to a close, I find myself doing much reflecting. Linux consumes much of my thinking, and sadly, this was not the year that it overtakes Windows on the desktop. You know what, though? Windows 10 was an absolute disaster this year, while the Linux-based Chrome OS has slowly become more and more mature. Other desktop Linux distributions, such as Ubuntu, Mint and Fedora, continue to get better, and Android remains the undisputed king of mobile. As we all know, Linux powers many servers around the globe too. So yeah, maybe it isn’t the year of the Linux desktop, but the open source kernel still had a superb 2018 — I raise my glass to it.

One of the most refreshing aspects of Linux in 2018 was the popularity of Snaps. Canonical revealed that the containerized packages have been a smashing success. Today, the Ubuntu-maker highlights what it feels are the top 10 Snaps of 2018. No, it is not based on popularity or voting, but seemingly, just Canonical’s opinion.

ALSO READ: Lubuntu kicks 32-bit Linux users to the curb

“With 2018 drawing to a close, and many of us spending with family during the holiday season, I thought we’d take a look back over some of our favourite Linux applications in the Snap Store. Some have been in the store for over a year, and a few landed only recently, but they’re all great,” says Alan Pope, Canonical.

ALSO READ: Ubuntu Linux 18.04 LTS comes to Dell Precision 5530 and 3530 mobile workstations

Pope further says, “Whether you’re a professional app developer, bedroom coder or enthusiastic Linux user, there’s something for everyone. Beyond these 10, there’s thousands more quality apps in the Snap Store, so have a browse, and find something new to install today.”

Canonical shares the Top 10 Snaps below.

  1. Spotify
  2. Slack
  3. VLC
  4. Nextcloud
  5. Android Studio
  6. Discord
  7. Plex Media Server
  8. Xonotic
  9. Notepad++
  10. Shotcut

While all the Snaps listed are excellent, the top three are undeniably some of the best. Look, if you want to attract people to Linux, that trio — Spotify, Slack, and VLC — will do a great job. Discord is absolutely indispensable for online gamers, who should also love playing Xonotix. To the glee of many media creators, Shotcut solves one of Linux’s biggest deficiencies — video editing.

ALSO READ: Linux on DeX Beta can turn your Samsung Galaxy smartphone or tablet into an Ubuntu desktop

My only real issue with the list is the inclusion of Notepad++. Don’t get me wrong, that is one off my favorite programs for Windows, but when it comes to Linux, I try to be a purist — I don’t let WINE on my system. Yes, the Notepad++ Snap is the Windows version hacked to work on Linux. I’ll pass, but surely some folks will be happy to have it.

Do you agree with Canonical’s list? Do you feel there is something more worthy? Please tell me in the comments below.

Photo credit: Alberto Garcia Guillen / Shutterstock

Source

CentOS Install OpenJDK – Linux Hint

When it’s necessary to build your apps or do some programming on Java, it’s always important to have all the necessary tools ready, for example, the compiler (also known as JDK – Java Development Kit) and the runtime (also known as JRE – Java Runtime Environment). Note that by default, JDK comes up with JRE, so you don’t have to manually install JRE again.

Of course, Java programs require a special environment to work on. When you compile a Java program, it generates a “jar” package that contains a universal binary form of the app. When you wish to run it, it’s the task of the JRE to read the universal binary and run it smoothly on the current system.

Linux is my favorite platform for programming, especially Java. You can work with both the Oracle Java and the OpenJDK. For Linux, I prefer the OpenJDK one as it’s more convenient on the Linux platform and almost all the major Linux distros integrate with OpenJDK easier than the Oracle counterpart.

CentOS is the open-source and community edition of the well-known and respected RHEL (Red Hat Enterprise Linux). I just got my CentOS machine ready, now I need to set OpenJDK.

Let’s go and enjoy OpenJDK!

There’re 2 separate ways of setting OpenJDK on CentOS – from the default CentOS repository (OpenJDK 8) and manually downloading and setting the OpenJDK (OpenJDK 11). Don’t forget to check out the latest features of Java 11!

Installing from CentOS repo

Fire up a terminal and make sure that everything is up-to-date –

Now, run the following command –

yum install java-1.8.0-openjdk

Installing OpenJDK manually

Note that this is not the recommended way of enjoying OpenJDK. Use the previous method unless you REALLY need the latest OpenJDK.

Using this method, you can also

Download the latest OpenJDK

Extract the downloaded OpenJDK –

tar -xfvz openjdk-11.0.1_linux-x64_bin.tar.gz –directory /usr/lib/jvm

Don’t forget to verify the extraction –

/usr/lib/jvm/jdk-11.0.1/bin/java -version

It’s time to make the switch to the newer JDK.

sudo sh -c ‘for bin in /usr/lib/jvm/jdk-11.0.1/bin/*; do update-alternatives
–install /usr/bin/$(basename $bin) $(basename $bin) $bin 100; done’

sudo sh -c ‘for bin in /usr/lib/jvm/jdk-11.0.1/bin/*; do update-alternatives
–set $(basename $bin) $bin; done’

Now, we will grab “update-alternatives” and tell the system to change to the newly set OpenJDK –

sudo update-alternatives –config java

Then, select the OpenJDK number that represents the OpenJDK 11 –

Voila! OpenJDK is now present in the system!

Don’t forget to check out the result of the change –

For Java programming, what’s better than a well-packed IDE? Check out Eclipse – one of the finest IDEs for Java programmers!

Source

The latest update on Black Mesa shows some impressive improvements coming to this Half-Life recreation

Black Mesa, the Half-Life fan-made recreation continues progressing towards finally releasing the delayed Xen levels.

The latest update, posted late last month shows off some rather impressive new stuff coming to the game. Using the system they developed for their Dynamic Lights, they’ve now included Screenspace Fog. It’s light on resources and does look rather good:

They’ve also improved the AI for the “Alien Grunts” to make them much more unpredictable and challenging. They will “leap onto different platforms, find a way to outflank you, get in your face, and unleash a devastating secondary “hornet hurricane” attack”—scary!

They also improved the Alien Controller NPC, turning them essentially into “a kind of overlord or mini-boss”. The Vortigaunt NPC was improved as well, flashlight shadows are back, Soft Particles are now working and a few other bits.

Lastly, they note about they progress specifically on the Xen levels and it sounds like progress is really good. Sounds like quite a bit of work still ahead though but it does sound exciting.

You can find Black Mesa on Steam. For Linux gamers, you will likely want to opt into the public beta.

Source

How to install Apache JMeter in Ubuntu – Linux Hint

After developing a new website, it is very important to perform some tests to find out the limitation of the site, and take necessary actions to remove the limitations for making the site more appropriate for the visitors before publishing. One of the important tests for any website is a load test. How many requests the website can handle at a time or how the website performs when a large number of requests appear on the site can find out by load test.

Apache JMeter is the best tool developed by Stefano Mazzocchi of Apache Software Foundation to perform this type of test and check out the performance of any website. It is used to create a large amount of virtual concurrent traffics to the website for doing the load test. It is open-source software. So anyone can download, install and customize this software to do the test. It is mainly designed for testing web application, but now it is also used for database testing, stress testing, distributed testing, and functional testing. How you can install and run this software is shown in this tutorial.

JMeter is a developed by Java. So you require to install the latest version of JRE or JDK to run JMeter. If you have installed Java before then run the following command to check the version of the installed Java.

The following output will appear if Java 9 is installed on the system.

If you didn’t install Java before then you can follow the steps from the following tutorial link to install Java before starting the next step.

https://linuxhint.com/install-java-9-on-ubuntu/

Go to the following URL location to download the latest version of JMeter. You can download the binary or source file of this tool from this location. Click on ‘Apache-JMeter-5.0.zip’ link to download the binary zip file of JMeter.

http://jmeter.apache.org/download_jmeter.cgi

Click on Save File radio button and OK button to start the download.

By default, the file will be downloaded in the Downloads folder. Open the folder, right click on the zip file and click on Extract Here from the pop-up menu.

Run JMeter

Press Alt+Ctrl+T to open the terminal and type the following command to go the location from where you can run JMeter.

$ cd Downloads/apache-jmeter-5.0/bin/

Run the following command to run JMeter and open the JMeter dialog box.

The following dialog box will appear after the successful installation of JMeter.

The following dialog box will appear after the successful installation of JMeter.

Simple Test using JMeter

It is discussed earlier that JMeter can be used for various types of testing. How a simple load test can be done using JMeter is shown in this part of the tutorial. Test name is set to Test Plan by default. If you want you can change the default value. Here, Name is set to Test Plan1 and test1 is set as a comment which is optional. Next, you have to set the variables that you want to use in your test. Here, the site is set as the variable name and tutorials4uhelp.com is set as value. This test will do the load test based on the next configuration of the site tutorial4uhelp.com.

Right-click on Test Plan1 from the left navigation. Click on Add, next Thread (Users) and next Thread Group. It is used to set action, properties, and schedule of Thread Group before starting the test.

In Thread Group, Five types of actions can be taken when any sampler error occurs. These are,

  • Continue
  • Start Next Thread Loop
  • Stop Thread
  • Stop Test
  • Stop Test Now

You can select any of the above actions for your test. Here, the default option is used. Next part of Thread Group is to set Thread Properties. The properties are,

  • Number of Threads (users)
    This property is used to assign the number of virtual visitors that you want for the testing. 15 is set here.
  • Ramp-Up Period (in seconds)
    This property is used to assign the time between two threads. 5 seconds is set here.
  • Loop Count
    This property is used to assign the number of times the thread will run. You can run the thread for unlimited times by selecting Forever checkbox. 1 is set here to run the thread for just one time.

There are other two properties which are “Delay Thread creation until needed” and “Scheduler”. These properties are remained unchecked here. Scheduler Configuration part is used to set the execution time of the test and it will be used in the test if you checked the Scheduler.

Next, you have to set the Sampler type to do the test. Here, HTTP Request is set as Sampler, to hit the server for the resources.

In HTTP Request part, you have to set Web Server, HTTP Request type for the test. You can use HTTP or https as protocol based on your server. By default, HTTP is used. You have to set domain name or IP address of your server in Server Name or IP field. Here, ‘tutorials4uhelp.com’ domain is used as Server Name. Other values remain as the default value.

Next, you have to set Listener type. It is used to view the test results in various format. Here, ‘View Result in Table’ is selected.

Now, you can click on the start button to start the test based on the assigned configurations. You have to wait for some time to complete the thread in this step.

The following screen will appear after completing the test.

Conclusion

JMeter is a popular testing tool now but this software has some limitations. It consumes more memory while doing the test. It is not good for desktop application and it can’t render HTML and JavaScript like the browser. If you are preparing to publish your website then it is very important to check the performance of your site. You can use JMeter for checking the performance of the site by doing different types of test on it. It will help you to detect the problems of your site and take proper actions to solve it.

Source

WP2Social Auto Publish Powered By : XYZScripts.com