Install Minecraft 1.4.7
A nice simple guide to installing Minecraft 1.4.7 client and server on Ubuntu 12.10 64 bit, as well as Hamachi and a CraftBukkit server for minecraft. It will likely work for other versions of Minecraft and Ubuntu.
I will do my best to avoid any terminal commands and editing of files, because I dislike it myself, and I know linux newbies hate it. There will still be an unavoidable small amount though.
Every tiny step has been detailed (I hope) for the sake of newbies. Other users may want to read only the sub-headings.
This is not an installation guide for the full, paid-for Minecraft, it is for demo/LAN only use. I strongly recommend you purchase Minecraft - it is a wonderful creation, and IMHO the authors should be rewarded if you enjoy their product.
There are 4 main sections:
- Client - being able to play a single player game, or join a LAN game
- Hamachi - being able to join a LAN game over the internet
- Server - being able to host a LAN game
- Bukkit Server - being able to host a LAN game with mods
A comment on Java
I use Oracle Java because minecraft.net recommends it on their download page
Java 6 is needed because Minecraft will crash in step 1.3 with Oracle Java 7 - it will freeze at "Done Downloading", and be unplayable.
I have no experience with OpenJava, so cannot comment on what your experience may be with it, it may or may not work, depending (or not depending) on whether you use version 6 or 7. I have seen people reporting that Minecraft works fine for them with OpenJava, but I don't know which version they were using
I think OpenJava is installed by default in Ubuntu (don't quote me) and if it works then step 1.1 may be skipped. You can try steps 1.2 and 1.3 first to see if OpenJava works, and if it doesn't, come back and do step 1.1 afterwards, then repeat step 1.3.
Section 1. Client
1.1 Install Oracle Java 6
You may skip this step if you want to try your current Java install. If installation fails at step 1.3 come back to this step
- Open a terminal window and enter the following two lines (press enter after each one). Accept any prompts.
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update && sudo apt-get install oracle-java6-installer
1.2 Register an account at minecraft.net
Skip this step (1.2) if you already have an account
- Register at this link: https://account.mojang.com/register?agent=minecraft
1.3 Begin playing minecraft in browser
This will download the needed files to ~/.minecraft
- Ensure you are logged into minecraft.net with your account
- play here: https://minecraft.net/play
You will see "Updating Minecraft", and the files will download.
If this failed, and it froze at "Done Downloading", you have a Java problem, go back to step 1.1
- - Once downloading finishes and the game starts you can quit/close the browser or browser tab
1.4 Download minecraft (launcher)
- Click Download at minecraft.net, and get minecraft.jar for Linux: https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft.jar
Note: confusingly there are now two files on your system named minecraft.jar. One is this launcher, which I will always refer to as minecraft.jar(launcher) and the other is at ~/.minecraft/bin, which I will always refer to as minecraft.jar(bin)
1.5 Run Minecraft
- Right click on minecraft.jar(launcher) and go to Properties
- In the Open With tab select "Oracle Java 6 Runtime", and close (you will not have to do this again in the future)
If you have OpenJava installed and didn't install Oracle Java 6 then select whatever Java you see instead
- Double click minecraft.jar(launcher) to launch minecraft
- In the launcher enter a name
I suggest the name you chose for your minecraft,net account or some name you can easily remember, because games will be saved/restored automatically by the name you enter here
- Enter some garbage text in the password box. DO NOT enter both the valid name and password of an existing minecraft.net account
- Click login
- When login fails click Play Offline
This is the end of the client section, you can now play single player, or join a LAN game.
Section 2. Hamachi
2.1 Install Hamachi for Linux
- Go to http://secure.logmein.com/us/labs
- Click Show More for Linux Command Line Version
- Select the correct download for your OS (for 64 bit Ubuntu it is the 64 bit .deb file)
- Double click the downloaded file to install Hamachi (follow the prompts in the window that opens)
2.2 Install Haguichi
This is to give GUI control of Hamachi and avoid terminal commands
- Open a terminal window, type/paste the following lines, pressing enter after each
sudo add-apt-repository ppa:webupd8team/haguichi
sudo apt-get update && sudo apt-get install Haguichi
- Agree to any prompts
- Haguichi will be installed and appear in your desktop menu under Internet or Applications, depending on what UI you use
2.3 Run Haguichi
- Click Haguichi in the menu (it will run Hamachi invisibly in the background)
- The first time you run Haguichi you should obey any prompt to click "Configure"
- Click Client > Connect
- Click Client > Join Network (or Create Network)
You can now interact with Hamachi/Haguichi as you do on Windows, and once connected to Hamachi you can join LAN games of Minecraft with other people connected to the same Hamachi network, regardless of whether they use Windows or Linux
Section 3. Server
3.1 Install server
- Download minecraft_server.jar from minecraft.net: https://s3.amazonaws.com/MinecraftDownload/launcher/minecraft_server.jar
- Put minecraft_server.jar in a convenient directory somewhere on your system (because it will generate several files when run)
For the sake of this howto I will assume it is in ~/mcServer/ (you should replace this path with the actual one you used when you see it below)
3.2 Run the server
- Open a terminal window
- Enter the following lines (enter after each):
java -Xms1G -Xmx1G -jar minecraft_server.jar nogui
Ensure you used the correct path in the first line.
The server will run in the terminal window (there is no GUI), and several files will have been generated in the server directory.
Note at this point, unless you have purchased Minecraft and log in properly when you launch the game, you will not be able to connect to the server.
- Stop the server and save the current world by typing stop into the server window and pressing enter
If typing those two commands into a terminal every time you start the server doesn't sound appealing, you can paste them into an empty text file, save the file with a name ending in ".sh", right click the file, Properties > Permissions > check "Allow executing", close, then double click the file to run the command in a terminal.
3.3 Set server to "offline" mode
- In the server directory double click on the text file "server.properties" to edit it
- Locate the line beginning with online-mode and change it to online-mode=false, save the file and close it
This will allow you to connect to the server even if you have not purchased minecraft and logged in when launching the game (an intentional feature by Mojang, not some sneaky workaround!)
However, an "offline" server is also very insecure! In theory (although it's unlikely) a griefer could log in to your server whenever he wanted, and there's not much you could do about it...buy the game and run your server online to be safe!
3.4 Connect clients to server
- If you are hosting the server, run it as per step 3.2
- Make sure you are in the same Hamachi network as whoever is running the server (see section 2)
- Run the game (see section 1), click Multiplayer, Add Server
- If the server is running on your current computer, type localhost into the Server Address box
- Otherwise, type the IP address, shown in Haguichi below the name of whoever is hosting the server (e.g. 18.104.22.168)
- Click Done, you will see the server, and be able to select and connect to it
You now have a working (but extremely basic!) server. All commands are given to the server by typing in the terminal window. Type help to see a list of commands. To learn more about running a server start reading here: http://www.minecraftwiki.net/wiki/Setting_up_a_server#Linux_instructions
Section 4. CrafBukkit Server
4.1 Setting up a Bukkit Server
This step is very similar to section 3, with slightly different paths and commands
- Download craftbukkit.jar here: http://dl.bukkit.org/latest-rb/craftbukkit.jar
- Put it in a directory (I will assume ~/bukkitserver/)
- Run it with
java -Xms1024M -Xmx1024M -jar craftbukkit-1.4.7-R1.0.jar -o false
Ensure the path in the first line is correct, and that the name of the .jar file matches the name of the file you downloaded
There is no need to set offline mode in server.properties, the "false" in the run command takes care of that
You can now connect to the bukkit server as per the vanilla server
4.2 Installing a Bukkit Server Plugin
We will use Dynmap as an example. This creates a detailed, real time map of the world in a browser window while you play.
- Download the plugin for 1.4.7 from near the top of the first post here: http://www.minecraftforum.net/topic/1543523-dynmap-dynamic-web-based-maps-for-minecraft/
- Unzip/open the file you downloaded, and move all the contents to ~/bukkitserver/plugins/
- In the file ~/bukkitserver/ops.txt, add your name (the one you you use when playing) and save it. This will give you permission to give commands to the server in-game
- Start the bukkit server (see 4.1)
- Start minecraft and join the server (see section 1)
- Open a web browser tab to http://localhost:8123/ (if the server is not on your computer replace localhost with the correct IP from Haguichi)
You will see a black map with some icons such as one representing you in game
- In game, open the chat window (press T), and enter this: /dynmap fullrender
The map in the browser will render. Zoom in, and move your cursor to the right hand edge to see options such as displaying the map in isometric 3D. Enjoy!
You now have a functioning bukkit server, with a server plugin installed and working.