Psychz - Shrirang
Votes: 0Posted On: Jun 08, 2017 07:29:01
The following steps will guide you on how to host your own dedicated Minecraft server.
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:
1. 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
2. Now you need to assign root privileges to this user in order to set up the installation
Open the sudoers file with the following command:
sudo /usr/sbin/visudo
Adding the user’s name and the same permissions as root under 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 currently 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 MINECRAFT SERVER
1. First create a new directory named "minecraft"
mkdir minecraft
2. switch to the directory
cd minecraft
3. Now, in that directory, you need to download the latest version of Minecraft Server Software
wget https://s3.amazonaws.com/Minecraft.Download/versions/1.10.2/minecraft_server.1.10.2.jar
4. Once the file is downloaded you may rename it.
mv minecraft_server.1.10.2.jar minecraft_server.jar
5. Now we can start the server
java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui
6.The first run has 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
7.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.