Prerequisites

Java

Mojang recomends running Minecraft with the offical Oracle JVM, which I prefer to install through apt so it gets updated along with the rest of the server. I use the PPA repository provided by WebUpd8, who have published instructions for adding the repository and installing Java 8 here. Manually installing the Java 8 JVM will also work, and may be the only option if you are using a Linux distribution that does not support PPA repositories. Once Java is installed you can test it by running:

ubuntu@ip-10-0-0-16:~$ java -version
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
As long as the first line says java version "1.8.something" Java is installed correctly.

Perl

Perl is my preferred language for system adminstration, and the Server Setup section of these instructions includes several perl scripts to simplify controlling the Minecraft server. Ubuntu Server generally includes Perl, but if you are using another edition or distribution you may need to install it. You can check if Perl is installed by running:

ubuntu@ip-10-0-0-16:~$ perl -v

This is perl 5, version 22, subversion 1 (v5.22.1) built for x86_64-linuxb-gnu-thread-multi
(with 69 registered patches, see perl -V for more detail)

Copyright 1987-2015, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
If you get an error instead of the version information above you will need to install Perl. On Ubuntu you can do so by running:
sudo apt-get install perl
Once Perl is installed, the Minecraft::RCON module is needed to allow Perl scripts to connect to the Minecraft server. The easiest way to install it is using CPAN, but you will need to have the make program installed before CPAN modules can be installed. On Ubuntu make, along with other programs needed to build modules, can all be installed by running:
sudo apt-get install build-essential
On other Linux distributions make should be all that is needed, and can be installed from your distribution's package manager or manually. Then you can install the Minecraft::RCON module by running:
cpan install Minecraft::RCON
The first time cpan is run it will ask if you want it to configure itself automatically, which is fine, and then ask what approach you want to install modules, which I prefer to choose sudo.

Service Account

The server will run under its own service account, so you don't have to be logged in while it's running, and the service account will own all the server files, so no other users that might exist on the server can access them. Before you create the account you will need to choose the account name and a folder to store the server files. I usually name the account minecraft and store the server files in the /srv/minecraft folder. Once you have chosen a name and folder you can create them by running:

ubuntu@ip-10-0-0-16:~$ sudo adduser --system --home /srv/minecraft minecraft
Adding system user `minecraft' (UID 112) ...
Adding new user `minecraft' (UID 112) with group `nogroup' ...
Creating home directory `/srv/minecraft' ...
the --system option to the adduser command prevents direct logins by this user, so you don't have to specify a password.

Optional: Web Server

This step is optional, and only required if you want to have a default resource pack for you server automatically sent to players. If you do not use resource packs, or if your Linux distribution already has a web server installed, you can skip to the Server Install section. If you plan to add Minecraft mods to your server, a web server where your players can download the correct versions of all mods is also useful.

For serving simple, static files I like the NGINX web server as it is simple to setup and fast and lightweight to run. On Ubuntu server you can install it by running:

sudo apt-get install nginx
For other Linux distributions, or if you prefer a different web server, any one that can serve static files will work just as well.

Now that all the pre-requisites are installed you can move on to the Server Install section.