Difference between revisions of "How To Set Up A Minecraft Server On CentOS 7"

From Pediascape
Jump to: navigation, search
m
m
Line 1: Line 1:
<p> This guide will walk you through setting up a Minecraft (version 1.16.5) server on CentOS 7 64bit with nifty startup and shutdown scripts for easy management.</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 software:</p><br /><br /><p> Now, we create and enter the directory that the server will reside in:</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 is to create a handy script which allows us to launch the server without needing to remember any screen CLI or Java syntax.</p><br /><br /><p> Depending on the size and configuration of your server, you may need to adjust "Xmx", "Xms" and other values. These are the amount of RAM allocated to the Minecraft server instance. Mojang recommends 1GB RAM for Minecraft server instances. You can use less if you have very few users. To modify the startcraft command, use "nano".</p><br /><br /><p> Now we can make "startcraft” practical:</p><br /><br /><p> Let's now see if this half of our setup works. [https://www.openlearning.com/u/mathiesenharder-rghcu7/blog/NewMinecraftServers minecraft servers] </p><br /><br /><p> Sample Output</p><br /><br /><p> You should now see some text detailing that the server is starting/has started. To disconnect from the screen, use Control +A then D.</p><br /><br /><p> We will now close the default Minecraft port on our firewall. This is the final step in the basic setup.</p><br /><br /><p> To gracefully stop the server process, we 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). To stop the server, simply type "stop". The screen session will end when it completes the shutdown process. To run the server once again, just type "startcraft"</p><br /><br /><p> Alternatively, we can setup a simple script to inject the "stop" command into the screen session:</p><br /><br /><p> To stop the server now, simply run "stopcraft" anytime:</p><br /><br /><p> You can now easily start or stop the server by using single commands.</p><br /><br /><p> Don't forget your username OP status. This can be done with the following command, which you don't need to touch the screen:</p><br /><br /><p> Replace "USERNAME” in front of your username. Once you have it you can use any commands including "/op" while playing. Depending on your circumstances, you might need to log in to the Minecraft server before you can OP.</p><br /><br /><p> This command can be used to activate the "startcraft" script when the server is started.</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>
+
<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!