NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

GUIDE: Setting Up And Monitoring A Linux MineCraft Server

Hello, I'm lDucks and this is my guide on how to run a Linux MineCraft server. I ran a server for about 8 months, I've been creating plugins for about 13 months, and I administrated a server for over a year. This guide may have some errors in it since even after rereading it and having other people reread it countless times, I still have to change little errors I find. I hope that this will help others who don’t know how to manage servers.



All the information in this guide are things I have picked up in my experiences and learned through my love for CS. Enjoy.



This guide will teach you how set up and maintain a physical server. This guide doesn't address the running of a community, or running a website. This is just how to setup and monitor your server and make sure the backend is running smoothly. You can either run a server on your own computer or rent a Minecraft host to host your friends. If you want to run one on an even larger scale, however, you will need more work. I will explain it in this guide.



Prerequisites for Linux Server (These commands are for CentOS only, but they can be used with other Linux distributions). Knowledge of Filezilla or another FTP Client Knowledge of basic command-line navigation (Windows or Linux)



What you should download: The latest craftbukkit builds



This guide will help you set up your server in the correct order. It starts with step 1, and ends up with additional information that you will require after setup to ensure your server runs properly.



Picking a Server First of all, if you are opening up a Minecraft server you should expect to put some money into it. Running a server off your own personal computer, even a computer on your network, is not a good idea. You will need an internet service provider to run a server and a proper server setup. If you want to start a Minecraft server, I recommend you do so with a Minecraft host.



What is a Minecraft Host? Well, Minecraft has become big enough where there are hundreds of hosting companies out there dedicated to Minecraft hosting. I won’t go into the details of how to run a server with them. They don’t have much functionality, and most use MCMyAdmin. If you have a server that doesn’t require constant maintenance (paintballs, hunger games etc.), then it is not necessary to use MCMyAdmin. This is all you need to know. You can get a host at $30 per month that will do everything and more. If you need to create CRON jobs and edit core files, install software or have a faster processing speed, you will need a dedicated server host. You will eventually need a dedicated host server. The prices for renting a dedicated server host are usually higher than renting one, especially if you have more RAM than the MC host can provide. If you have more than 30 players on your server, and you are able to bring in $100+ per monthly in donations, it's time to expand.



For those of you looking for good Minecraft hosts, I have had some good experiences with https://allgamer.net/ - I have supplied a list of Minecraft hosts at the end of this guide.



This is where you start looking for dedicated servers. A dedicated server isn't made for Minecraft. It is a complete physical server that can be rented from a datacenter. You can use it as often as you like. This guide will only cover how to operate a Linux-operated server. Anyone looking to host a Minecraft server would benefit greatly from a dedicated Linux host. This is a personal preference. There is no reason to choose Linux over a Windows server. This guide is intended for Linux users only. You can stop reading if you don't own a Linux box.



Many people worry about RAM when choosing a server. I have read that you need 1GB RAM for every 10-20 servers slots. This is a pretty good estimate to go by, but you have to remember that RAM is not the only thing that you need to worry about. Your HDD must be large enough. You also need to ensure your processor is powerful enough and your internet speed is sufficient.



I had a nice box when I was running a server: i73770 4 Core @ 3.4 Ghz 32 GB RAM 64 GB SSD, 32GB HHDD.



This is more than enough to manage a server that can hold 200+ people. This is something to consider when renting a box. Choopa is a good host. Before you choose a host to use, I recommend you do some research. I have provided a list with hosts at the bottom of this guide.



I recommend getting a box with 16GB of RAM, 16 - 32GB HDD, and 16GB SSD. There are many processors available, so any one you receive will likely do the job. These numbers are inflated and you don't need as much. If you are on a budget, you may be able to go lower. I would only recommend these numbers so you have some working space.



Setting Up Your Server Now that you have your box you may be wondering how to start it. You don't have the option to open your Windows Explorer and run run.bat from Bukkit's Wiki. Lion Is The King Of The Jungle Sadly, it is a bit more complicated than that. First upload your craftbukkit file to your server. I usually used the directory /home/SERVERNAME.



Create a new file called start.sh.



You should put this code on that page: DO NOT COPY THIS CODE EXACTLY Code: java -server -Xms10G -Xmx16G -jar craftbukkit.jar



Every box is different, so you're going to need to change the amount of allocated RAM that you will provide to your server. As you can see, we have allocated the server 10GB extended memory and 16GB maximum heap size. DO NOT ALLOCATE ALL THE RAM. If you have an 8GB storage device, you should give it the following: -Xms4G or -Xmx6G. If you have a 16GB storage device, you should give it the following: -Xms8G or -Xmx12G. Play around with the numbers, make sure you have at least 2GB not allocated, and keep Xmx bigger than Xms. Other things are going to be running on your box besides the Minecraft server, so leave some extra space. There are a bunch of other options that you can add depending on how you want your processor to handle the server and what not. That isn't important but you can do some research if you need things changed.



Upload the start.sh file to the /home/SERVERNAME. You can do this with Filezilla, I'm assuming that if you're setting up a server you know how to use Filezilla (or any other FTP client) so I am not going to get into detail about that.



How do I run the script? Well, let me explain. I'm going to teach you how to use PuTTy. The reason I am using this method is because it is much easier than teaching you how to connect through a terminal. PuTTY is ideal for any task you want to do on a server box.



Download PuTTy here: http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html



Open PuTTy and type the hostname. We will use 108.61.45.74 to illustrate. You will need to enter the IP address of your Minecraft server. If you don't know the IP of your Minecraft server, you can log into your account at the server host's website. Or contact your serverhost. If you use a URL to access your Minecraft server you can enter that URL instead.



Next, you must enter the port. If you haven't changed the port it should be port 22. Next, you will need to click the "SSH” option. Note, this is NOT the port of your Minecraft server. It is the SSH port.



You can now open the connection. Click "Open"



When you do that, you will be prompted to login. If you weren't already told, your login name must be root. If you don’t know your host’s name, you can contact it. After typing root, press enter. Then enter the password which you should also have gotten from your host. Then click the enter key. Your password will not show up as you type it.



Now, you need to make sure that you have certain things on your box. You will need Java, MySQL and iptraf. I will explain how to do this in this guide.



Installing Programs: This is the command line to install all programs you need. It is important to keep in mind that not all Linux boxes use exactly the same format. These commands work on a CentOS box. I realize that Ubuntu is the most popular OS, but at the time of writing this I was still using CentOS. The commands for installing is not much different. You can use the following command line if you are using CentOS. You can use the "apt–get" command to install Ubuntu. For the correct commands, I recommend researching your distribution.



To make sure that you are able to use the rpm extension, first enter the following command code: Code yum-install rpm



32bit systems will require you to search for the RPMs yourself. The iptraffa and htop links I provide are for 64bit boxes.



iptraf: Code: yum install http://scriptmantra.info/sources/iptraf-3.0.0-5.el5.x86_64.rpm



htop: Code: yum install http://205.196.123.160/j785fw1gc80g/al1aaacqodltr1i/Htopbuild0056.yashua.rf.x86_64.rpm



You can find the guides for installing MySQL and Java by doing a quick Google search. I won't waste my time rewriting them.



JAVA: http://www.wikihow.com/Install-Java-on-Linux MYSQL: http://www.thegeekstuff.com/2008/07/howto-install-mysql-on-linux/



Starting MySQL To start MySQL you want to enter the following command line: Code: /etc/init.d/mysqld start



Turning on the Server Now I assume you are ready to turn it on and install plugins. You will need to open an instance (screen) to do this.

However, screen does not come preinstalled and you will need to install it. Type: Code yum install screen

If the command above doesn't work, you can try the next step. Move on to the next step if you have it installed.



This link will take you to the version you wish to distribute. Next, enter these lines into your terminal.



Code: yum -y install ncurses-devel texinfo pam-devel libtool yum install URL_TO_RPM



Screen is now installed.



To open a window, you will need the following command line code: screen –S SERVERNAME



You will need to replace servername with the server name. It is important that your screen name matches the name of your server. This is to make it easy to remember which server is running on each individual instance. Once you do this a page should open up like this. For now, I'm going with "WARCHICKEN", as that is what my screen looks like.



Now, you are on the screen. You are now ready to run your start-script. You must first open the file.



Type: Code cd /home/SERVERNAME



We chose this path because it is what we used earlier in the guide.



Now type: Code



This will start your server. If you get the following message:



This means that you didn't chmod your start.sh to 770. Please use the following command to do this:



Code: chmod 770 /home/SERVERNAME/start.sh



After the server is on, you can use this screen to enter commands as the server. Hold CTRL+A+D to detach.



You can also type Code: screen screen -r WARCHICKEN -rdWARCHICKEN if you wish to reconnect



-r stands for "to connect" -rd stands for "to kick and connect anyone else who is attached off." One person can view a screen simultaneously



You can also use Code: screen-list



To list all open screens, type: Code: kill -9 To kill a screen, type: Code kill -9



The PID is the number to the left of the screen name.



This number will change every time you reopen the screen. If your server crashes you will need to close the screen and then open it again.


My Website: https://lionsroar.name/
     
 
what is notes.io
 

Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 14 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.