Login/Register

How to: Create a MineCraft Bukkit Server on a CentOS 6.5 VPS/Dedicated Server

created by BasicSysAdmin

Tags: CentOS 6.5, Linux, Minecraft, Bukkit, CentOS

May 28, 2016

Introduction

In this tutorial, I will be showing you how you can install and set up a Minecraft Bukkit Server on CentOS 6.5. To do this, you will need to either have access to a VM or a Dedicated Server by ssh or be sitting in front of one.

Prerequisites

In order to follow this tutorial, you will need the following

  • Clean CentOS 6.5 Installation

  • Sudo Permissions


  • Installing required Packages

    yum -y update

    Now that your server is up to date, you will need to install Java, nano and screen.
    yum install -y java-1.6.0-openjdk nano screen

    Setting up users and permissions

    Now that we have done this, we will create a user to run control this minecraft server.
    useradd mcadmin

    We can now set a password for this user by typing
    passwd mcadmin

    We can now log in to this user to continue with this tutorial
    su mcadmin

    We now need to switch to the home directory for this user and create a directory for our server.
    cd /home/mcadmin; mkdir minecraft; cd minecraft;


    Setting up the Server

    Now that yoou have done this, you should go over to dl.bukkit.org to find the version of bukkit you would like to download. Once you have found the url for this download, you will want to download this on the server. You make need to remove the s from the https if you have any certificate issues.
    wget http://dl.bukkit.org/downloads/craftbukkit/get/02638_1.7.9-R0.3/craftbukkit-dev.jar -O bukkit.jar

    Now we have to make sure that the file is executable.
    chmod +x bukkit.jar

    To correctly use screen, we will now need to close our ssh connection and reconned to mcadmin rather than root. Once logged back in, move back to the correct directory and then we can create a screen session.
    We should now just create a new session of Screen so that we can access our MC server at a later date.
    cd minecraft; screen -S bukkit

    We are now ready to start up our minecraft server
    java -Xmx1024M -Xms1024M -jar bukkit.jar nogui

    The two occasions where 1024M comes up is the amount of memory we are providing to the server. This can be changed to whatever you like.
    If we ever need to close the ssh connection, next time we connect, all we have to do is type
    screen -r bukkit

    To connect to our old minecraft connection and should be allowed to make any minecraft commands.
    If you would like to close the make any non minecraft commands without creating a new ssh connection, we can just press Ctrl + A and then D

    How to Uploading Plugin

    If we want to upload any plugins to our server, we will need to connect to it via sftp. To do this, we will need FileZilla. Download and Install this. You can then go ahead and open this. To connect to the server, we will need to create a new Site using the Site Manager. We can do this by clicking the image shown in the picture below.

    A window like this should appear

    If you click the New Site Button, we should be able to enter the Host and the Port. You will need to make sure you set the protocol to sftp.

    You can then continue to enter the login information. Make sure to set the Logon Type to Normal so we can enter your username (make sure to use mcadmin) and password. Once you have done this, you can go ahead and Connect.

    When you connect, you should be able to navigate to minecraft/plugins. This is where you will need to upload your plugin jar files to. If you then stop and start your server, your new plugins should work.