Java is a programming language used to build Android apps and real life web applications like Gmail and Google Docs. This ubiquitous language can be installed onto an Ubuntu server and its what we’ll be teaching in this tutorial today.Continue reading “Install Oracle Java 8 on Ubuntu 18.04”
What is Java?
Java is considered one of the most popular programming languages. Java is a typed object-oriented programming language developed by Sun Microsystems (and subsequently acquired by Oracle). Development is mainly performed by a community organized through the Java Community Process. The language and the main technologies that implements it are distributed under the GPL but the trademark rights are owned by Oracle Corporation. Code written in Java (using the JVM – Java Virtual Machine) is transformed into bytecode and due to this, programs can run on any system where the JVM is installed. Therefore, Java is often called a cross-platform language. Most often, Java is used to develop backend programs and android applications.Continue reading “How to Install Java on Ubuntu, Windows, and MacOS”
- These instructions are intended specifically for installing Oracle Java 8 on Ubuntu 12.04 LTS.
- I’ll be working from a Liquid Web Core Managed Ubuntu 12.04 LTS server with Apache and PHP installed, and I’ll be logged in as non-root user. If you need more information then visit our tutorial on How to Add a User and Grant Root Privileges on Ubuntu 12.04 LTS.
- These instructions are intended specifically for installing Oracle Java 8 on Ubuntu 14.04 LTS.
- I’ll be working from a Liquid Web Core Managed Ubuntu 14.04 LTS server with Apache and PHP installed, and I’ll be logged in as a non-root user. If you need more information then visit our tutorial on How to Add a User and Grant Root Privileges on Ubuntu 14.04 LTS.
Apache Cassandra is a NoSQL database intended for storing large amounts of data in a decentralized, high availability server cluster. NoSQL refers to a database with a data model other than the tabular relations used in relational databases such as MySQL, PostgreSQL, and Microsoft SQL.
- These instructions are intended for installing Cassandra 2 on a single CentOS 6 node.
- I’ll be working from a Liquid Web Core Managed CentOS 6.4 server, and I’ll be logged in as root.
- You may be able to skip to Step #2 if you already have a stable version of Java 7 (preferably the Oracle/Sun JVM). Check to see if your server already has Java installed by running the following command: java -version
Step #1: Download Oracle Java SE Runtime Environment 8
Head over to Oracle’s website and download the latest version of Oracle Java SE Runtime Environment 8. Then, transfer the file up to your server into a directory of your choice. (We suggest using /usr/src/java8/ or something to that effect.
Next, run the installation by using the command rpm -ivh <filename>, or in this case:
root@host [/usr/src/javaSE8]# rpm -ivh jre-8u251-linux-x64.rpm
Note: Your command may be slightly different if you downloaded a different version of Oracle Java SE Runtime Environment. Simply replace jre-xxxx-linux-x64.rpm with the actual filename.
Then install the Java Native Access (JNA) which can improve Cassandra’s memory usage:
yum install jna
Add a symbolic link to the Oracle Java SE Runtime Environment 8 installation so that your server uses the Oracle JRE instead of the OpenJDK JRE:
alternatives --install /usr/bin/java java /usr/java/jre1.8.0_45/bin/java 20000
Note: Your command will be slightly different if you downloaded a different version of Oracle Java SE Runtime Environment 8. Simply replace jrex.x.x_## with the actual version you’ve installed.
Then use the alternatives command to verify that the Oracle Java SE Runtime Environment 8 is selected. If not, simply choose the appropriate Selection after you run the command:
The results of your command should look similar to the information below:
root@host [/usr/src/javaSE8]# alternatives --config java There is 1 program that provides 'java'. Selection Command ----------------------------------------------- + 1 java-1.8.0-openjdk.x86_64 (/usr/lib/jvm/java-1.8.0-openjdk-18.104.22.168.b09-2.el7_8.x86_64/jre/bin/java) *+ 2 /usr/java/jre-8u251-linux-x64.rpm/bin/java Enter to keep the current selection[+], or type selection number: 2 root@host [/usr/src/javaSE8]# java -version java version "1.8.0_55" Java(TM) SE Runtime Environment (build 1.8.0_55-b13) Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)
Utilize the following command to double check the correct version of Oracle Java SE Runtime Environment 7 is being used:
Step #2: Add the DataStax Community Repository
For a refresher on editing files with vim see: New User Tutorial: Overview of the Vim Text Editor
Add the following information to the file you’ve created, using i to insert:
[datastax] name = DataStax Repo for Apache Cassandra baseurl = http://rpm.datastax.com/community enabled = 1 gpgcheck = 0
Then exit and save the file with the command :wq (see the example below):
Step #3: Install Apache Cassandra 2
At this point, installing Cassandra is as simple as running just one command:
yum install dsc20
Step #4: Configure the Apache Cassandra 2 Environment
Just two more simple environment tweaks that enable Cassandra to run correctly:
export JAVA_HOME=/usr/java/jre1.7.0_45/ export PATH=$PATH:/usr/java/jre1.7.0_45/bin/
Note: Your commands will be slightly different if you downloaded a different version of Oracle Java SE Runtime Environment 7. Simply replace jre1.7.0_45 with the actual version you’ve installed.
Step #5: Get Cassandra Running
service cassandra start
Check Cassandra Service Status
service cassandra status
Enter the Cassandra Command Line
The cqlsh interface should look similar to the image below:
Check Cassandra Node Status
service cassandra stop
There are many, many more things we could say about Cassandra, but those will be detailed in follow-up articles in the Liquid Web Knowledge Base! Look for articles on: How To Install Cassandra 2 and run a Multi-Node Server Cluster on CentOS 6, Recommended Production Settings for Cassandra on CentOS 6 and more!