Psychz - Sharad
Votes: 0Posted On: Feb 12, 2015 09:27:31
Setting up Minecraft server on Dedicated server
If you avail dedicated Server from Psychz Networks and wish to setup minecraft server on it, you can be worry free as the minimum memory it comes along is 4GB which is pretty good.
Following content will help you in setting up a Minecraft server on Ubuntu 12.0
Now, it is highly recommended to set up the server under different username rather than "root". But you can still set up under "root", however it is not secure.
optional:
To add a new user in Ubuntu, use the adduser command (You must login as "root")
sudo adduser new_user_name
Type in the password and confirm
Press enter followed by Y. Your new user has been created
Now you need to assign root previledges to this user in order to set up the installation
Open the sudoers file with following command:
sudo /usr/sbin/visudo
Adding the user’s name and the same permissions as root under the the user privilege specification will grant them the sudo privileges.
# User privilege specification
root ALL=(ALL:ALL) ALL
new_user_name ALL=(ALL:ALL) ALL
Press ‘cntrl + x’ to exit the file and then ‘Y’ to save it.
Installing pre-requisites
Run a quick update on "apt-get". This is to download all of the server requirements.
sudo apt-get update
Install the Java on the server
java -version (this will give you the version currenty installed. In case you don’t have Java installed, you will get a message that says "java: command not found".
You can, then, download java through apt-get:
sudo apt-get install default-jdk
Installing Mincraft Server
First create a new directory named "minecraft"
mkdir minecraft
switch to the directory
cd minecraft
Now in that directory you need to download latest version of Minecraft Server Software
wget https://s3.amazonaws.com/Minecraft.Download/versions/1.10.2/minecraft_server.1.10.2.jar
Once the file is downloaded you may rename it
mv minecraft_server.1.10.2.jar minecraft_server.jar
Now we can start the server
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
The first run have created eula.txt file which we now need to edit to accept EULA(End User Legal Agreement). Type following command
sed -i.orig 's/eula=false/eula=true/g' eula.txt
Now you may run it again
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
The server should start now and you can type the IP address of your server to connect