I tried to set up Bedrock Server in the previous post, but when I thought about it, I thought that Mac people could not participate, so I switched to the Java version server and decided to cover the Bedrock version with Geyser. did.
I was thinking about it casually for fun, but it became magnificent ...
There are many ways to install the OS on the web, so I will omit it.
Let's do it around.
# dnf -y install java-11-openjdk-headless
$ java --version
openjdk 11.0.9.1 2020-11-04 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.9.1+1-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.9.1+1-LTS, mixed mode, sharing)
Let's create a server execution user first, as we will need it later.
# mkdir /opt/minecraft
# groupadd minecraft
# useradd --system --shell /bin/bash --home /opt/minecraft -g minecraft minecraft
# chown minecraft:minecraft /opt/minecraft
Build by referring to Spigot Wiki.
Install the application required for build
# dnf -y install git wget
Build Spigot
# su - minecraft
$ mkdir survival
$ cd survival
$ wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar
$ java -jar BuildTools.jar
Agree with EULA
$ java -jar spigot-1.16.4.jar
$ vi eula.txt
Change eula = false to eula = true
eula.txt
:
eula=true
Match memory usage to server specs
# vi /opt/minecraft/survival/server.conf
server.conf
MCMINMEM=512M
MCMAXMEM=7168M
I wondered if it was ready to start at least for the time being.
Next, create a startup script by referring to Tutorials/Server startup script.
Install screen to run Spigot inside a virtual terminal
# dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
# dnf -y install screen
Download systemd script
# wget -O /etc/systemd/system/[email protected] https://raw.githubusercontent.com/agowa338/MinecraftSystemdUnit/master/minecraft%40.service
RHEL8 series seems to have to change the permissions of/run/screen
# vi /etc/systemd/system/[email protected]
[email protected]
:
# Uncomment this to fix screen on RHEL 8
ExecStartPre=+/bin/sh -c 'chmod 777 /run/screen'
:
Autorun settings
# systemctl enable minecraft@survival
I will start it for the time being
# systemctl enable minecraft@survival
# systemctl stop minecraft@survival
Select the Download button of GeyserMC site and download "Geyser-Spigot.jar" from "Latest successful build artifacts" on the linked page.
# su - minecraft
$ cd /opt/minecraft/survival/plugins/
$ wget https://ci.opencollab.dev//job/GeyserMC/job/Geyser/job/master/lastSuccessfulBuild/artifact/bootstrap/spigot/target/Geyser-Spigot.jar
Select the Download link of Geyser's Floodgate wiki and download "floodgate-bukkit.jar" from "Latest successful build artifacts" on the linked page.
# su - minecraft
$ cd /opt/minecraft/survival/plugins/
$ wget https://ci.opencollab.dev/job/GeyserMC/job/Floodgate/job/master/lastSuccessfulBuild/artifact/bukkit/target/floodgate-bukkit.jar
Restart Spigot
# systemctl restart minecraft@survival
Allow Bedrock users to connect with only an Xbox Live account
# vi /opt/minecraft/survival/plugins/Geyser-Spigot/config.yml
config.yml
:
auth-type: floodgate
:
Change Bedrock user name prefix (* Does not work well with some plugins, so change to ASCII characters)
# vi /opt/minecraft/survival/plugins/floodgate-bukkit/config.yml
config.yml
:
username-prefix: "BE_"
:
Restart Spigot
# systemctl restart minecraft@survival
I haven't confirmed the operation of the Java version yet, but I wonder if it works like this !?
Recommended Posts