Just 10 steps to teach you to build MC server on Centos7

  1. Install java, not many online.
  2. Download spigot https://getbukkit.org/download/spigot
  3. Execute java -jar spigot-1.12.2.jar
  4. Execution must be a failure, since eula.txt needs to be agreed.
  • vim eula.txt then set eula=true
  1. Execute the jar package again
  2. If the execution is successful, Done! is displayed. At this time, you need to delete the process and configure it.
  • jps -l to see which PID, then use kill -9 [PID]
  1. vim server.propertis
  1. Firewall allows port 25565
  • firewall-cmd --zone=public --add-port=25565/tcp --permanent
  • firewall-cmd --reload
  1. Let the java process execute in the background, shell script
  • vim start.sh
#!/bin/sh
java -Xmx1G -jar spigot-1.12.2.jar &
  1. start sh start.sh

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324452737&siteId=291194637