Home > Cloud, Ubuntu > Having Fun with the Cloud? Make a Minecraft Server on Ubuntu! Part 3

Having Fun with the Cloud? Make a Minecraft Server on Ubuntu! Part 3

With the 30 day free evaluation of Microsoft’s Cloud, aka Azure, I decided to try and make the cloud fun, so I made a Ubuntu VM which now hosts Minecraft, which my kids love to play on now. Those that know about Minecraft servers, I am actually building a Bukkit server. It is very similar to a Minecraft server, it just has more built in administrative support as well as plugins, user made files that can change the server, which make multiplayer experience easier to manage. This will be a three part series that will cover the following topics.

To get started with your own trial account create an account here:  http://aka.ms/mshosting

Part 1 will list out the tools that will need to be downloaded, as well as signing up for the free Azure account.

Part 2 will step you thru creating the Virtual Machine in the cloud, and creating an endpoint to access what is on the VM that was just created.

Part 3 will step you thru connecting to the server using PuTTY and WinSCP, copying files using WinSCP, installing Java, and finally starting up the Bukkit Server.

 

Connect to the VM using PuTTY and WinSCP

The Ubuntu VM will automatically create an EndPoint to enable management of this VM on port 22 for SSH connectivity. Fire up PuTTY to connect to the DNS Name that you utilized in the VM provisioning process, do not forget to configure PuTTY to use the Private Key that you generated with the PuTTYgen utility. http://www.windowsazure.com/en-us/manage/linux/how-to-guides/ssh-into-linux/

_Putty

Time to configure WinSCP, click new connection then enter the host name that was given to your VM, as well as the user name and password, as well as the Private Key that was generated by the PuTTYgen tool, select the Save button to save the session so it will not have to be recreated, then just click the Ok button.

_WINSCP

Please note with both PuTTY and WinSCP the first time you connect using these tools you might be prompted about using a certificate for the first time, just click ok to ensure the certificate is used and the connection is made.

If you have not already done so download Java 1.7.0_25, and the Bukkit server jar file. These will need to be copied to your Ubuntu VM using the WinSCP utility. Links for those files are below:

Oracle Java SE will need to be downloaded (have to select the Accept License Agreement before you can download the file)
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
Either Linux x86 or Linux x64 the example will be using Linux x64

Bukkit Server Setup http://wiki.bukkit.org/Setting_up_a_server

Coping files to the Ubuntu Server

Start up WinSCP, and select the name of the connection that you created earlier and click the Login button at the bottom of the screen.

winSCP_selectlogon

The commander view, in WinSCP, is the default view, will show a split screen, on the left will be your windows host, on the right hand side will be the Linux host. Select multiple files that you want to copy to the root of your home folder, and drag them to the Linux machine. There will be a confirmation that you want to copy the files to the Linux system, just click ok and the files will be copied. The Bukkit server jar file should be copied as well as the JDK .gz file for the java installation should be copied to the Linux server.

WinSCP in action

Installing Java on the Ubuntu Server

Now you have the file on your Ubuntu server, and you have logged on using PuTTY, you can extract it using the following command in a PuTTY session:

tar -xvf jdk-7u25-linux-x64.gz

This should give you a directory “jdk1.7.0_25″ which we need to move to somewhere sensible such as “/usr/lib/jvm/jdk1.7.0_25″:

sudo mv jdk1.7.0_25 /usr/lib/jvm/jdk1.7.0_25

Now we need to set up a symbolic link so that we can run Java from everywhere:

sudo ln -fs /usr/lib/jvm/jdk1.7.0_25/bin/java /usr/bin/java

Now check that Java is all installed correctly by checking the version using:

java -version

Which in this case should give:
java version “1.7.0_25″

Now you can set up your JAVA_HOME variable at a system level so other applications can use Java by editing “/etc/environment”:

sudo nano /etc/environment

Now add the following line to point to your newly installed Java, so there will be a total of two lines in the file when you are done:

JAVA_HOME=/usr/lib/jvm/jdk1.7.0_25

To ensure that the variable has been set correctly, reboot the VM by issuing this command in PuTTY, once the VM has finished rebooting which should take about a minute connect to the VM again using PuTTY:

sudo shutdown 0

Place your Bukkit Server jar file

I’ve seen several different examples as to where to place the Bukkit Server jar file. This really depends on you, as to where it will be placed. Just keep in mind that you should create a directory for it to have all to its self as it will create files as well as folders for the java application to run properly. In a terminal session run the following code to make a directory in your home directory.

sudo mkdir bukkit

Copy the craftbukkit.jar file to the bukkit directory that was just created. please note, substitute your own user name for the %yourusername% below.

sudo cp craftbukkit.jar /home/%yourusername%/bukkit

Change directory to the bukkit directory. To start up the bukkit server run the following:

sudo java -d64 -Xincgc -Xmx1024M -jar craftbukkit.jar nogui

Now open up your Minecraft client and connect to the FQDN name of your server and you are ready to play Minecraft on your own server. Enjoy!

_________________________________________________________________

This series of posts is to illustrate how easy the cloud can be to use, it’s flexibility to be used in different ways, as well as show the broad range of Operating Systems that are available on the Microsoft Cloud Platform. This post is for demonstration purposes only.

Please Note: Several items were pulled directly from the following posts

http://www.scaine.net/site/2013/02/step-by-step-install-a-minecraft-server-on-ubuntu/

https://www.digitalocean.com/community/articles/how-to-set-up-a-minecraft-server-on-linux

http://blog.jamesrossiter.co.uk/2012/11/08/install-the-latest-java-7-jdk-on-ubuntu-linux-server-10-04-without-apt-get

About these ads
Categories: Cloud, Ubuntu Tags: ,
  1. January 14, 2014 at 2:25 pm

    Thanks for a marvelous posting! I actually enjoyed reading it, you
    could be a great author.I will make certain to bookmark your blog and will often come back in
    the future. I want to encourage that you continue your great posts,
    have a nice holiday weekend!

  2. January 17, 2014 at 4:43 pm

    There is certainly a lot to find out about this subject.

    I really like all the points you made.

  1. July 12, 2013 at 9:38 am

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 607 other followers

%d bloggers like this: