How VPS - How to use/setup VPS
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System CentOS

Installing BungeeCord for Minecraft on CentOS 6/7

How VPS by How VPS
October 1, 2019
in CentOS
0
0
SHARES
19
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Requirements
  2. Installation
  3. (Optional) Init script
  4. Want to contribute?


BungeeCord is a free, easy, and reliable way to connect multiple Minecraft servers together. If you would like to string multiple game modes together on your server, BungeeCord is the right solution for you. Learn more about it on the official site.

Requirements

  • CentOS 6/7 x86/x64
  • Minimum 512MB of RAM
  • Java 7+
  • Screen (optional)

Installation

First of all, you will need to login to your server.

Download the latest version from their website.

mkdir BungeeCord
cd BungeeCord
wget http://ci.md-5.net/job/BungeeCord/lastSuccessfulBuild/artifact/bootstrap/target/BungeeCord.jar

Start BungeeCoord with Java:

cd ~
cd BungeeCord
java -Xms512M -Xmx512M -jar BungeeCord.jar

… or with Screen:

cd ~
cd BungeeCord
screen -S BungeeCord
screen -r BungeeCord
[[email protected] ~screen]$ java -Xms512M -Xmx512M -jar BungeeCord.jar

BungeeCord is setup at this point. You can use the init script below to have it run on boot and perform service commands against it.

(Optional) Init script

Create an init.d script.

nano /etc/init.d/BungeeCord

Copy and paste the init script below. Edit the MCPATH='/root/BungeeCord' to the proper install path.

#!/bin/bash
 # /etc/init.d/BungeeCord
 # version 0.3.9 2012-08-13 (YYYY-MM-DD)

 ### BEGIN INIT INFO
 # Provides:   BungeeCord
 # Required-Start: $local_fs $remote_fs
 # Required-Stop:  $local_fs $remote_fs
 # Should-Start:   $network
 # Should-Stop:    $network
 # Default-Start:  2 3 4 5
 # Default-Stop:   0 1 6
 # Short-Description:    BungeeCord
 # Description:    BungeeCord
 ### END INIT INFO

 #Settings
 SERVICE='BungeeCord.jar'
 USERNAME='root'
 MCPATH='/root/BungeeCord'
 INVOCATION="java -server -Xmx512M -Dfile.encoding=UTF-8 -jar $SERVICE"

 ME=`whoami`
 as_user() {
   if [ $ME = $USERNAME ] ; then
     bash -c "$1"
   else
     su - $USERNAME -c "$1"
   fi
 }

 mc_start() {
   if  pgrep -u $USERNAME -f $SERVICE > /dev/null
   then
     echo "$SERVICE is already running!"
   else
     echo "Starting $SERVICE..."
     cd $MCPATH
     as_user "cd $MCPATH && screen -dmS BungeeCord $INVOCATION"
     sleep 7
     if pgrep -u $USERNAME -f $SERVICE > /dev/null
     then
       echo "$SERVICE is now running."
     else
       echo "Error! Could not start $SERVICE!"
     fi
   fi
 }


 mc_stop() {
   if pgrep -u $USERNAME -f $SERVICE > /dev/null
   then
     echo "Stopping $SERVICE"
     as_user "screen -p 0 -S BungeeCord -X eval 'stuff /"alert PROXY STOP IN 10 SECONDS./"/015'"
     sleep 10
     as_user "screen -p 0 -S BungeeCord -X eval 'stuff /"end/"/015'"
     sleep 7
   else
     echo "$SERVICE was not running."
   fi
   if pgrep -u $USERNAME -f $SERVICE > /dev/null
   then
     echo "Error! $SERVICE could not be stopped."
   else
     echo "$SERVICE is stopped."
   fi
 }

 mc_update() {
      if pgrep -u $USERNAME -f $SERVICE > /dev/null
   then
     echo "Stopping $SERVICE"
     as_user "screen -p 0 -S BungeeCord -X eval 'stuff /"say Proxy SERVER GO TO UPDATE.. RESTARTING IN 10 SECONDS.... /"/015'"
     sleep 10
     as_user "screen -p 0 -S BungeeCord -X eval 'stuff /"stop/"/015'"
     sleep 10
     as_user "cd $MCPATH && rm -rf BungeeCord.jar"
         sleep 6
     as_user "cd $MCPATH && wget http://ci.md-5.net/job/BungeeCord/lastSuccessfulBuild/artifact/bootstrap/target/BungeeCord.jar"
   else
     echo "$SERVICE was not running."
   fi
   if pgrep -u $USERNAME -f $SERVICE > /dev/null
   then
     echo "Error! $SERVICE could not be UPDATED."
   else
     echo "$SERVICE is update."
   fi
 }
 #Start-Stop here
 case "$1" in
   start)
     mc_fupdate
     mc_start
     ;;
   stop)
     mc_stop
     ;;
   restart)
     mc_stop
     mc_fupdate
     mc_start
     ;;
   update)
     mc_update
     mc_start
     ;;
   status)
     if pgrep -u $USERNAME -f $SERVICE > /dev/null
     then
       echo "$SERVICE is running."
     else
       echo "$SERVICE is not running."
     fi
     ;;

   *)
   echo "Usage: $0 {start|stop|update|status|restart}"
   exit 1
   ;;
 esac

 exit 0

Register the service.

chmod a+x /etc/init.d/BungeeCord
chkconfig --add BungeeCord

You’re all set, you can use the following commands to control the service.

service BungeeCord start
service BungeeCord stop
service BungeeCord restart
service BungeeCord update
service BungeeCord status

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
How VPS

How VPS

Related Posts

Failed to download metadata for repo 'appstream' on Centos 8
CentOS

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Install BoltWire CMS on CentOS 7
CentOS

How to Install BoltWire CMS on CentOS 7

February 14, 2020
Showterm.io – A Terminal/Shell Recording, Upload and Share Tool for Linux
CentOS

Setup HTTP Authentication With Nginx on CentOS 7

February 14, 2020
Next Post

Install a Minecraft Server on CentOS 6

Installing Gnome/KDE (GUI) on Ubuntu/CentOS

Backup Multiple MySQL Or MariaDB Databases Automatically

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Follow Us

  • 121 Followers
  • 87.2k Followers

Recommended

CPUTool – Limit and Control CPU Utilization of Any Process in Linux

4 years ago

How to Install Subrion 4.1 CMS on a Fedora 26 LAMP VPS

3 years ago

10 Lesser Known Linux Commands – Part 2

4 years ago

How to Install Shopware CE on Debian 9

3 years ago

Instagram

    Please install/update and activate JNews Instagram plugin.

Categories

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel

Topics

Apache Web Server Bluehost Review 2019 Bluehost Review 2020 Bluehost Review 2021 Centmin Mod CentminMod centos install htop fsck htop install HTTP DoS attack Install Snort on an Ubuntu install Zabbix on CentOS install Zabbix on CentOS 7 Linux Commands linux guide linux install htop linux vps setup guide MariaDB MariaDB Error Mysql mysqld error optimize MariaDB optimize Mysql snort Ubuntu
No Result
View All Result

Highlights

Top Free Web Hosting Control Panels To Manage VPS/Dedicated Servers

Webmin Reviews

Virtualmin Reviews

CentOS Web Panel Reviews

Ajenti Reviews

ISPConfig Reviews

Trending

Failed to download metadata for repo 'appstream' on Centos 8
CentOS

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

by How VPS
February 25, 2022
0

I tried to update some extensions by use yum on centOs which I specified in Dockerfile. After...

How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020
Top Free Web Hosting Control Panels To Manage VPS/Dedicated Servers

Top Free Web Hosting Control Panels To Manage VPS/Dedicated Servers

February 17, 2020
Webmin Reviews

Webmin Reviews

February 17, 2020
How VPS – How to use/setup VPS

We bring you the best Premium WordPress Themes that perfect for news, magazine, personal blog, etc. Visit our landing page to see all features & demos.
LEARN MORE »

Recent News

  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8 February 25, 2022
  • How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”? November 17, 2020
  • How to optimize Mysql or MariaDB November 3, 2020

Categories

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel

[mc4wp_form]

© 2018 JNews - City News Magazine WordPress theme. All rights belong to their respective owners.
JNews is a top selling 2018 WordPress News, Blog, Newspaper & Magazine Theme.

No Result
View All Result
  • Home

© 2023 JNews - Premium WordPress news & magazine theme by Jegtheme.