Minecraft server spigot linux

Setting Up a Spigot Server for Minecraft on Ubuntu 14.04

Estamos traduciendo nuestros guías y tutoriales al Español. Es posible que usted esté viendo una traducción generada automáticamente. Estamos trabajando con traductores profesionales para verificar las traducciones de nuestro sitio web. Este proyecto es un trabajo en curso.

This guide has been deprecated and is no longer being maintained.

This guide shows you how to setup your own Minecraft server on a Linode running Ubuntu 14.04/14.10. You can play online with your friends or host a public server.

We’ll compile the Spigot Minecraft server (1.8.3 at the time of publication) so you can use the whole expanse of Bukkit plugins available.

Preparation

sudo apt update && sudo apt upgrade 
sudo apt install git openjdk-7-jre-headless 

If your Linode is running Ubuntu 14.10 or higher, you can choose to install openjdk-8-jre-headless instead.

java version "1.7.0_75" OpenJDK Runtime Environment (IcedTea 2.5.4) (7u75-2.5.4-1~trusty1) OpenJDK 64-Bit Server VM (build 24.75-b04, mixed mode) 
sudo iptables -A INPUT -p tcp --dport 25565 -j ACCEPT 

Create a Minecraft user

Install SpigotMC

mkdir build cd build wget https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar java -jar BuildTools.jar 
mkdir ../server cd ../server mv ../build/spigot-1.*.jar spigot.jar 
chmod +x /home/minecraft/server/wrapper.sh 
java -Xms512M -Xmx900M -jar spigot.jar 
INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info. 

Configure SpigotMC to start on boot

sudo su -l minecraft -c "screen -dmS minecraft /home/minecraft/server/wrapper.sh" 

Customization

Server Properties

Customize the server by editing values in /home/minecraft/server/server.properties .

    Enable command blocks: Values available are true and false .

Plugins

Plugins can be found from the Spigot Resources or Bukkit Plugins pages.

    To add plugins, download the .jar file to the /home/minecraft/server/plugins directory:

wget -P /home/minecraft/server/plugins/ --content-disposition

When downloading plugins from Spigot, the wget flag —content-disposition will help ensure the plugin is downloaded with the correct filename.

su -l minecraft -c "screen -dmS minecraft /home/minecraft/server/wrapper.sh" 

This page was originally published on Tuesday, April 21, 2015.

Read other comments or post your own below. Comments must be respectful, constructive, and relevant to the topic of the guide. Do not post external links or advertisements. Before posting, consider if your comment would be better addressed by contacting our Support team or asking on our Community Site.

The Disqus commenting system for Linode Docs requires the acceptance of Functional Cookies, which allow us to analyze site usage so we can measure and improve performance. To view and create comments for this article, please update your Cookie Preferences on this website and refresh this web page. Please note: You must have JavaScript enabled in your browser.

Читайте также:  Сертификат совместимости astra linux

Источник

How to Install Spigot Minecraft Server on Ubuntu

If you are fond of video games, there is a high chance that you have heard the name “Minecraft”. Since coming out back in 2011, Minecraft has become one of the most popular and the most played games in the world. In 2020, it was estimated that about 131 million people in the world had played it.

You can play the game in both the single and multiplayer modes. For the multiplayer mode, you need to create online servers to play. Once servers are created, other players can join in, and you can have fun playing with your friends or other people online. There are multiple server softwares available, with Spigot being one of the most popular.

Spigot is an open-source server based on CraftBukkit. Some of the added advantages of Spigot servers include multiple plug-ins available that can make your server unique and improve the experience. There are also a variety of pre-built servers that you can use to host games.

If you are a user of Ubuntu or other Linux distros and wish to install Spigot Minecraft server to enhance your gaming experience, look no further. This is a comprehensive step-by-step guide to help you achieve just that.

Step 1: Install Java and Git.

For Spigot to work, you need to have Java and Git on your system, so, your first step is to install both programs. But before that, update your system to repositories, so you get the latest versions of the packages you are installing.

Use the following commands on the terminal to install Java and Git.

$ sudo apt install openjdk-17-jre-headless

install

Spigot Minecraft Server on Ubuntu

Next, we move on to configuring the firewall.

Step 2: Configuring the Firewall.

On your Ubuntu system, you have the UFW firewall (Uncomplicated FireWall). You need to enable it before running Spigot. Follow these steps to configure UFW.

Use this command to check whether UFW is working or not.

You will see such an output in case it is not enabled.

Spigot Minecraft Server on Ubuntu

Allow your SSH port so that the UFW does not break the enabling connection.

Next, you need to open port 25565.

allow

The final step is to enable the UFW firewall.

You will see this message when you enter the command.

sudo

Step 3: Install Spigot.

The next step of how to install Spigot Minecraft server on Ubuntu is to download the Spigot server on your system. Follow these steps.

First, you will add the BuildTools.jar application. You can do this through this command.

$ wget -O BuildTools.jar https://hub.spigotmc.org/jenkins/job/BuildTools/lastSuccessfulBuild/artifact/target/BuildTools.jar

Spigot Minecraft Server on Ubuntu

Next, using BuildTools, create a Spigot server using the following command.

$ java -jar BuildTools.jar --rev latest

This process could take a while so be patient while the server is being built.

Spigot Minecraft Server on Ubuntu

Make a note of the Spigot file that is created. You can do this using the $ls command. After noting the filename, put your Spigot server into a new directory.

$ mkdir Spigot && cd Spigot $ mv ~/source directory ~/Spigot

With this, you are done with installing Spigot. The next step is to start the Spigot server.

Читайте также:  Linux resize partition lvm

Step 4: Starting the Spigot Server.

To initialize and use the Spigot server, it’s required to make sure that it can accept various Java parameters. For this, we will make edits to the startup script of Spigot. Enter the following command in your Terminal:

When the file opens, the following code is to be pasted there. After adding the code, save and exit the file.

#!/bin/sh java -Xms3G -Xmx3G -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -jar spigot.jar nogui

Spigot Minecraft Server on Ubuntu

Spigot Minecraft Server on Ubuntu

Next, using the $chmod command, make the Spigot startup script executable.

There are different combinations and ways you can use the $chmod command in Linux. You can click the link to go through a comprehensive guide on the $chmod command.

Now, we make an important edit to the “ eula.txt ” file. Run the following command in your Terminal.

Change the value of “eula” to true. Once you are done with this, you won’t have any problem starting the Spigot server. However, to use Minecraft and Spigot simultaneously, you need to make Spigot run in the background as well. This can be done in the next step.

Step 5: Run Spigot as a Service.

The first step involves creating a Spigot service file. You can do that by running the following command.

$ sudo nano /etc/systemd/system/spigot.service

Once it is opened, the following code is to be pasted there.

[Unit] Description=SpigotMC After=network.target [Service] Type=forking User=minecraft Group=minecraft ExecStart=/usr/bin/screen -d -m -S minecraft /home/minecraft/server/spigotstart.sh ExecStop=/usr/bin/screen -S minecraft -p 0 -X stuff "stop$(printf \\r)" WorkingDirectory=/home/minecraft/server [Install] WantedBy=multi-user.target

Once you are done with this, run the following commands to reload, enable and start the Spigot service

$ sudo systemcl-daemon reload $ sudo systemcl enable spigot $ sudo systemcl start spigot

After running all of the above commands, you can now use Spigot servers with Minecraft.

Now we’ve reached the end of our guide on how to install Spigot Minecraft server on Ubuntu and other Linux distros. We looked at the different necessary steps to successfully create a Spigot server. There are various things you need to set up and enable first before starting the Spigot server, so make sure you follow all the steps clearly.

We hope that we were able to help you out so you can finally enjoy the Spigot Minecraft experience. For further queries, please let us know in the comments.

If this guide helped you, please share it 😊

Author

Well-versed with most things Linux, and motivated to share whatever I’ve learned with the rest of the world.

Источник

Создаем свой сервер на системе Ubuntu [Guide]

Создаем свой сервер на системе Ubuntu [Guide]

M inecraft — одна из самых популярных сетевых игры нашего времени. Вот уже пятый год она объединяет миллионы игроков по всему миру. В этом руководстве мы рассмотрим установку сервера Minecraft и его базовую настройку в ОС Ubuntu 16.04.

  • Сервер с установленной системой Ubuntu 16.04;
  • Рекомендуемая емкость оперативной памяти сервера— 1Gb;
  • Пользователь с sudo-привилегиями.
Читайте также:  Mecool m8s pro linux

Для запуска сервера нам потребуется пакет Java. Если он у вас уже установлен, можете пропустить данный раздел.

Для начала обновим список пакетов:

Далее обновим пакеты по последних версий:

Если в ходе обновления появится подобное сообщение, просто нажмите Y -> enter.

After this operation, 3,435 kB of additional disk space will be used.

Do you want to continue? [Y/n] Y

Далее установим сам пакет Java:

Установка Screen и создание системного пользователя

Screen — это приложение для работы с несколькими терминалами в одном окне. Оно даст возможность запускать Minecraft в режиме демона.

Создадим репозиторий, где будет храниться Minecraft и его всевозможные настройки:

Добавим нового пользователя:

—home /srv/minecraft — параметр обозначающий домашнюю папку пользователя
—ingroup minecraft — параметр на добавление пользователя в группу minecraft

Установка Minecraft сервера

Перейдем в созданный репозиторий:

Ссылку на последнюю версию вы всегда можете получить на официальном сайте.

ВАЖНО: 1.10.2 Меняете на свою версию.

У нас имеется только 1Gb памяти. Поэтому мы укажем максимальное значение 700Mb (-Xmx700M). Первый параметр указывает начальное значение используемой памяти 256Mb (-Xms256M).

При запуске вы увидите следующее сообщение:

[16:44:56] [Server thread/INFO]: Starting minecraft server version 1.10.2

[16:44:56] [Server thread/INFO]: Loading properties

[16:44:56] [Server thread/WARN]: server.properties does not exist

[16:44:56] [Server thread/INFO]: Generating new properties file

[16:44:56] [Server thread/WARN]: Failed to load eula.txt

[16:44:56] [Server thread/INFO]: You need to agree to the EULA in order to run the server. Go to eula.txt for more info.

[16:44:56] [Server thread/INFO]: Stopping server

[16:44:56] [Server Shutdown Thread/INFO]: Stopping server

Сервер не запустится, но он создаст два файла: eula.txt и server.properties.

Первое хранит согласие на лицензионное соглашение, второй— настройки самого сервера Minecraft.

Откроем файл eula.txt (nano eula.txt) и изменим значение единственной переменной с false на true.

С полным текстом лицензионного соглашения можно ознакомиться здесь.

После этого еще раз запустим сервер:

Процесс генерации ландшафта займет около 30 секунд, после чего будет выведено следующее сообщение:

[16:56:51] [Server thread/INFO]: Preparing spawn area: 62%

[16:56:52] [Server thread/INFO]: Preparing spawn area: 66%

[16:56:53] [Server thread/INFO]: Preparing spawn area: 71%

[16:56:54] [Server thread/INFO]: Preparing spawn area: 76%

[16:56:55] [Server thread/INFO]: Preparing spawn area: 82%

[16:56:56] [Server thread/INFO]: Preparing spawn area: 87%

[16:56:57] [Server thread/INFO]: Preparing spawn area: 92%

[16:56:58] [Server thread/INFO]: Preparing spawn area: 97%

[16:56:58] [Server thread/INFO]: Done (27.145s)! For help, type «help» or «?»

Остановим его с помощью команду stop.

Данный инструмент можно сравнить с вкладками в браузере. Он позволяет создать их в любом количестве и запускать необходимые нам команды параллельно.

Запустим новый терминал в screen с нашим сервером:

После этого вы увидите стандартное сообщение о генерации ландшафта. Далее вы можете выйти из данного терминала, нажав (Ctrl + d -> a). Minecraft продолжит работать в режиме демона, а вы можете выйти из сервера.

Вернуться назад к управлению Minecraft можно с помощью команды:

Источник

Оцените статью
Adblock
detector