Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No.119: Install MineCraft Server (Close #27) #31

Open
wants to merge 5 commits into
base: gh-pages
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions _posts/2014-05-21-no119-yasulab.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
---
layout: default
title: "Install MineCraft Server to Okinawa.rb Server"
date: 2014-05-21
categories: no119
---
## 成果物

### [okinawarb/minecraft-server](https://github.com/okinawarb/minecraft-server)

![SS001](https://dl.dropboxusercontent.com/u/2819285/minecraft-okinawarb_001.png)
![SS002](https://dl.dropboxusercontent.com/u/2819285/minecraft-okinawarb_002.png)
[![SS000](https://dl.dropboxusercontent.com/u/2819285/minecraft-okinawarb_000.png)](http://screenx.tv/minecraft)

## 手順書
1. Increase Swap Size
2. Install MineCraft Server
3. Play MineCraft at Okinawa.rb Server

## 1. Increase Swap Size (cf. [swapファイルを追加する](http://linuxsalad.blogspot.jp/2009/05/swap.html))
1. `cat /proc/swaps`
```
Filename Type Size Used Priority
/dev/dm-1 partition 2093052 814496 -1
```
2. `sudo dd if=/dev/zero of=/swap bs=2G count=5 iflag=fullblock`
```
5+0 records in
5+0 records out
10737418240 bytes (11 GB) copied, 3079.19 s, 3.5 MB/s
```
3. `sudo mkswap /swap`
```
OKINAWARB /home/yasulab% sudo mkswap /swap
[sudo] password for yasulab:
Setting up swapspace version 1, size = 10485756 KiB
no label, UUID=9ac709f4-1232-4583-967a-05e1e79d3235
```
4. `sudo swapon /swap`
5. `sudo echo "/swap swap swap defaults 0 0" >> /etc/sftab`
6. `cat /proc/swaps`
```
Filename Type Size Used Priority
/dev/dm-1 partition 2093052 804008 -1
/swap file 10485756 0 -2
```

## 2. Install MineCraft Server (cf. [#27](https://github.com/okinawarb/meetups/issues/27))
1. `sudo aptitude install openjdk-6-jre`
2. `which java; /usr/bin/java`
3. `mkdir ~/minecraft; cd minecraft`
4. `wget https://s3.amazonaws.com/Minecraft.Download/versions/1.7.9/minecraft_server.1.7.9.jar`
5. `java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui` #=> `/stop` to stop server.

See [UbuntuでMinecraftサーバを構築](http://blog.makkysnote.org/archives/117) for details.
- __Note: Need to consider how to co-exist MineCraft server with [ScreenX TV](http://screenx.tv) server.__