Difference between revisions of "How To Set Up A Minecraft Server On CentOS 7"
Wheelcrown5 (talk | contribs) m |
m |
||
Line 1: | Line 1: | ||
− | <p> This guide will | + | <p> This guide will help you set up Minecraft (version 1.16.5), on CentOS7 64bit. It includes handy shutdown and startup scripts to make management easy.</p><br /><br /><p> A CentOS 7 64-bit server, if you do not have a server then spin up a super fast Minecraft server today!</p><br /><br /><p> Setting up a Minecraft Server on CentOS 7</p><br /><br /><p> First, we install our prerequisite program:</p><br /><br /><p> Now we need to create and enter the directory where the server will reside:</p><br /><br /><p> Next, we download the actual Minecraft server application and make it executable:</p><br /><br /><p> You have read the EULA and agree to it.</p><br /><br /><p> Next, we will create a handy script to allow us to start the server from scratch without having to remember any screen CLI syntax or Java.</p><br /><br /><p> Depending on how large your server is, you might want to adjust the values of "Xmx" or "Xms". These are the amount of RAM allocated to the Minecraft server instance. Mojang recommends 1GB RAM for Minecraft server instances. If you have few users, you can use less. You can edit the startcraft command with "nano" if the server is to be upgraded in the future.</p><br /><br /><p> Now we can make "startcraft” practical:</p><br /><br /><p> Now let's test that this half of the setup is working:</p><br /><br /><p> Sample output</p><br /><br /><p> Now you should see text indicating that the server is currently starting/has begun. To disconnect from the screen, use Control +A then D.</p><br /><br /><p> For the final step of the basic setup, we open up the default Minecraft port on the firewall:</p><br /><br /><p> To stop the server process gracefully, we would need to enter the screen session:</p><br /><br /><p> Although we are not at a prompt, we can still type Minecraft server commands here (/give, /op, etc). Simply type "stop" to stop the server. Once the shutdown is complete, the screen session will be terminated. To run the server once again, just type "startcraft"</p><br /><br /><p> You can also create a simple script which will insert the "stop” command to the screen session. [https://vimeo.com/deskbongo84 Let's talk about games] </p><br /><br /><p> To stop the server immediately, you can simply run "stopcraft" at any time:</p><br /><br /><p> You can now easily start or stop the server by using single commands. [https://www.pcb.its.dot.gov/PageRedirect.aspx?redirectedurl=https://s-games.net/ Let's talk about games] </p><br /><br /><p> Remember to change your username's OP status. This can be done by simply touching the screen using the following command</p><br /><br /><p> Replace "USERNAME" with your username. [https://500px.com/p/burchxrceaton Let's talk about games] Once you have it, you will be able to use any command including /op in-game. Depending on your circumstances, you might need to log in to the Minecraft server before you can OP.</p><br /><br /><p> You can run this command to make the "startcraft” script run on server startup.</p><br /><br /><p> The next step you will likely want to take is to point a DNS record to your server's IP for easy connecting/distribution. You can read about using our cloud DNS manager here: https://www.atlantic.net/community/howto/manage-cloud-dns-records/</p><br /><br /><p> Finished! This page details all of the options you can modify in your "/Minecraft/server.properties" file: http://minecraft.gamepedia.com/Server.properties</p><br /><br /><p> Happy crafting! Contact us for all your VPS hosting requirements!</p> |
Revision as of 08:16, 14 August 2022
This guide will help you set up Minecraft (version 1.16.5), on CentOS7 64bit. It includes handy shutdown and startup scripts to make management easy.
A CentOS 7 64-bit server, if you do not have a server then spin up a super fast Minecraft server today!
Setting up a Minecraft Server on CentOS 7
First, we install our prerequisite program:
Now we need to create and enter the directory where the server will reside:
Next, we download the actual Minecraft server application and make it executable:
You have read the EULA and agree to it.
Next, we will create a handy script to allow us to start the server from scratch without having to remember any screen CLI syntax or Java.
Depending on how large your server is, you might want to adjust the values of "Xmx" or "Xms". These are the amount of RAM allocated to the Minecraft server instance. Mojang recommends 1GB RAM for Minecraft server instances. If you have few users, you can use less. You can edit the startcraft command with "nano" if the server is to be upgraded in the future.
Now we can make "startcraft” practical:
Now let's test that this half of the setup is working:
Sample output
Now you should see text indicating that the server is currently starting/has begun. To disconnect from the screen, use Control +A then D.
For the final step of the basic setup, we open up the default Minecraft port on the firewall:
To stop the server process gracefully, we would need to enter the screen session:
Although we are not at a prompt, we can still type Minecraft server commands here (/give, /op, etc). Simply type "stop" to stop the server. Once the shutdown is complete, the screen session will be terminated. To run the server once again, just type "startcraft"
You can also create a simple script which will insert the "stop” command to the screen session. Let's talk about games
To stop the server immediately, you can simply run "stopcraft" at any time:
You can now easily start or stop the server by using single commands. Let's talk about games
Remember to change your username's OP status. This can be done by simply touching the screen using the following command
Replace "USERNAME" with your username. Let's talk about games Once you have it, you will be able to use any command including /op in-game. Depending on your circumstances, you might need to log in to the Minecraft server before you can OP.
You can run this command to make the "startcraft” script run on server startup.
The next step you will likely want to take is to point a DNS record to your server's IP for easy connecting/distribution. You can read about using our cloud DNS manager here: https://www.atlantic.net/community/howto/manage-cloud-dns-records/
Finished! This page details all of the options you can modify in your "/Minecraft/server.properties" file: http://minecraft.gamepedia.com/Server.properties
Happy crafting! Contact us for all your VPS hosting requirements!