Giter Site home page Giter Site logo

minecraft-server-lesson's Introduction

Minecraft Lesson

This is a lesson that teaches basic operating system and networking skills using a Minecraft server on a Linux machine.

Setting up and connecting to a Minecraft server on a Linux machine takes many different skills including:

  • Basic networking
  • Basic OS knowledge
  • Basic Linux command line

And most importantly:

  • Troubleshooting using online resources.

General order of topics:

  • What is an OS?
  • Why use Linux instead of Windows?
  • What is Ubuntu vs Linux?
  • Distribution pretty much equals Operating System
  • Basic Linux command line (ls, cd, sudo, chmod/chown).
  • How do we get answers to our questions using the internet?
  • What is a server?
  • Download minecraft server binary.
  • Download tools to run binary (jre).
  • Run server binary.
  • Basic networking (Local/Public IPs and ports.
  • Nmap service scan on port 25565 on host running the server.
  • Connect to the server using the minecraft client.

The instructions below are intentionally left vague without links so that students are encouraged to find their own solutions online.

Instructions for Students:

  1. Start downloading the latest Minecraft server jarfile.
  2. While you're at it, start downloading the Minecraft client, including the latest version.

Annotated Instructions for Instructors:

  1. Start downloading the latest Minecraft server jarfile. Server download
  2. While you're at it, start downloading the Minecraft client, including the latest version. Client download.
  3. Press the window key/home button and search for the Terminal.
  4. Make sure that the terminal looks something like:
<username>@<hostname>:~$

Explain what a terminal is and how it differs from a GUI

  1. Create a directory called minecraft using the command
mkdir minecraft
  • What is a filesystem?
  • Directories vs files
  1. Run
cd Downloads
  • Current working dir
  • cd command

and look at the contents of minecraft by running

ls
  • ls command
  1. Move the server.jar file to the minecraft folder using
mv ./server.jar ../Downloads/server.jar
  • Relative paths vs absolute paths
  • Maybe cp vs mv and how mv is for renaming too
  1. A .jar file is a program that can be run by running the following command.
java -jar <program>.jar

Meant to fail

If you got something like

-bash: java: command not found

That's completely fine! It just means we have to get java on your computer, which means installing the default JRE (Java Runtime Environment). When you're dealing with Java, you'll see a lot of acronyms starting j. Don't worry about learning those for now.

  • Might be a good idea to ask if a .jar looks like a regular file, directory, or executable
  1. Just like most operating systems, each Linux distribution comes with a standardized way of distributing new software. For Windows, it's the Windows store. For MacOS and your iPhone it's the Apple App Store. For Linux, this is called a Package Manager. For the distribution we're using, this package manager is called apt or Advanced Package Tool.

If we want to learn more information about apt, a could place to look is the manual pages. These can be accessed using:

man apt

There's a lot of confusing terms, so instead, let's just look up how to install a package using apt on the internet. We're not going to give you the command here, so you'll have to figure it out yourself.

Don't run the command yet.

  • sudo apt install
  1. But wait! What is that sudo part of the command? In Linux, there are a lot of actions that require elevated privileges to make sure that users on the system don't do anything they're not supposed to do. Look at your command line prompt. The format of the prompt is
<user>@<computer name>:~$

-Ask "What is your user name?" to students -Ask "Why would it be useful to restrict access to certain actions?"

These elevated privileges are called root privileges. With root privileges, you gain access to the sudo command. sudo means Super User DO, and for one command only, makes the computer think that you are a super user, or a user that can do anything to the computer.

  1. Run the command to install the package default-jre.

  2. Run

java -Xmx1024M -Xms1024M -jar minecraft_server.1.20.1.jar nogui 

to start the server. We found this command on the download page for the server. It will run for about and ask you to agree to a EULA before continuing. If you already know terminal based text editors, you can use that. If you don't, use the file explorer to open the EULA.txt in the minecraft folder.

Change eula=false to eula=true. If it automatically opened LibreOffice, a software similar to Microsoft Word, make sure to click Use Text Format, not Use ODF Format.

  1. Use the up arrow in the terminal to rerun the command, or copy and paste it again from the website.

After a while, you should see it start out map generation information

minecraft-server-lesson's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.