우분투로 버킷 돌리기 (Bukkit In Ubuntu)

우분투로 버킷 돌리는 법을 정리해봅시다.

그런데 왜 우분투로 돌려야 하나요?

미리 경험해본 사람들에 의하면 리눅스로 돌릴 경우 같은 사양에서 20-40%의 성능을 더 낸다고 한다. 어렵지만 시도해봅시다.

Use linux, if you really mad and want all power and speed.
Linux you will see a 20-40% increase. use ramdisk on linux

버킷은 http://bukkit.org/ 여기서 받다.

적당한 서버컴의 사양

절대적인 것은 아니며, 여러 환경요소, 사용 마인크래프트 버킷 플러긴 (Plugins)등에 의해 바뀔 수 있다.

일단 버킷에 배당한 램은 지도(맵)의 크기동접수 두가지와 관계가 있다. 램은 보통 3-4기가 정도 주면, 4000x4000 지도에서 동접 20 정도 먹어도 거뜬한다. 나머지는 직접 부딪혀서 알아내세요. 하지만 플러그인이 너무많아도 램을 먹으니까 안쓰는 플긴은지워 주면 좋습니다

시퓨

시퓨의 파워는 동접수와 관계가 있다. 버킷 자체는 멀티코어를 지원하지 않으므로, 여러 코어이면서 성능이 낮은 것 (AMD?) 보다는 코어의 수가 좀 적더라도 센 것이 좋다.1) 경험+귀동냥으로 얻은 대략의 동접수는 아래와 같다.

시퓨 어림잡은 동접수
펜4 2.8 GHZ 동접 4-7명
듀얼코어 동접 16-25명
core I5 동접 30-50 까지
core i7 동접 50-70 까지

인터넷

인터넷 접속은 한국의 광랜이라면 접속자가 좀 많아도 별 문제가 없는 것으로 보이다.

HDD

1.6프리인가 이후로 지도 파일의 구조가 개선되면서 하드디스크 속도에는 별로 영향을 받지 않는 것으로 보이다만, 많은 동접을 유지하려면 아무래도 SSD램디스크가 유리할 것이다. MysqlSSD사용 시 30%정도의 성능향상이 있다고 한다.

우분투 서버 64bit 설치

우분투가 뭔지 잘 모르시는 분은 링크 참고하라..

32bit는 램사용 등등에서 제약이 많으므로 반드시 64bit로 한다.

다운로드 http://www.ubuntu.com/download/server/download (이 링크는 Ubuntu server 다운로드 링크이다 GUI를 쓰고싶거나 Ubuntu server이 이더넷 모듈을 잡지 못하면 아래의 주소로 Ubuntu Desktop을 다운받음된다 https://www.ubuntu.com/download/desktop USB에 설치하는거는 같다)

USB로 설치하는 것이 편하니 http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/ 에서 아래의 Universal-USB-Installer-1.8.8.4.exe 를 받아서 실행한다.

아까 다운 받은 파일의 위치를 지정해주고, usb를 설정해주면, 시간이 좀 걸리고 usb에 복사된다.

설치는 usb로 부팅하면 된다.

이후의 과정은 http://www.lovelgw.com/Blog/121 참조하라.

설치시 OPENSSH는 꼭 선택해준다.

서버 설정

우분투를 설치 했으면, 몇몇 설정할 것들이 있다.

접속프로그램 putty

윈도컴에 Putty설치

대개 윈도컴에서 접속하므로 윈도컴에 접속프로그램 putty를 설치한다.

다운로드 http://kldp.net/projects/iputty/

한글 설정이 필요한다.

사용법은 http://it-min.tistory.com/342 참조하라.

아까 우분투 설치할 때 openSSH를 잘 설치했으면 원격으로 접속이 가능한다.

이제 서버컴은 시원한 다락에 올려두고, 윈도컴에서 작업한다.

우분투를 최신으로 업데이트

 sudo apt-get update
 sudo apt-get upgrade

sudo는 관리자 권한으로 명령어를 넣는 것이며, 관리자 암호가 필요한다.

Midnight Commander 설치

 sudo apt-get install mc

텍스트로 동작하는 파일 탐색기 같은 것이다. 꼭 필요한 것은 아니다.

Nano 설정

나노 문서편집기 (Nano) 설정 노트패드 같은 것인데 기본으로 깔려있다. 설정이 반드시 필요하지는 않는다.

Apache, PHP, MySQL환경 구축

 sudo apt-get install mysql-server
 sudo apt-get install apache2
 sudo apt-get install php5 php5-mysql php5-gd
 sudo apt-get install phpmyadmin

Dynmap을 효율적으로 사용하려면 apach도 설치하는 것이 좋다. 성능향상을 위해 Mysql+ phpMyAdmin 은 설치 한다.

phpmyadmin을 설치한 경우 한글언어팩도 설치한다 .

FTP 서버 설정

 sudo apt-get install vsftpd

외부에서 파일올리고 지우고 하려면 필요하니 Vsftpd를 설치한다.

Vsftpd 참고하라

자바 설정

우분투는 기본으로 자바(OpenJDK)가 설치되어서 나온다.

일단

java -version

해서 자바가 잘 깔려 있는지만 확인한다.

없다면

sudo apt-get install default-jre

를 입력한다. 가능한 최신버전으로 업데이트한다.

screen설치

screen 은 마인크래프트 서버를 백그라운드 로 돌려주는 프로그램이다 apt-get install screen 이라 치면 된다

마인크래프트 설정

이제 마인크래프트 용 계정을 하나 만듭시다.

예) mine

계정 폴더 주소는

 /home/mine

이런식이 된다.

이제 버킷을 넣을 폴더를 하나 만듭니다.

/home/mine/one

여기에 ftp로 버킷과 구동기(?)를 넣다.

구동기의 내용은

java -XX:UseSSE=4 -server -d64 -XX:+CMSIncrementalPacing -XX:+UseConcMarkSweepGC -XX:SurvivorRatio=16 -XX:+UseParNewGC
           -XX:ParallelGCThreads=2 -Xmx4G -Xms2G -jar craftbukkit.jar nogui

이 정도 넣으시면 되고 구동기의 자세한 설명은 고급정보 확인하라.

지도저장, 시작, 정지, 재시작, 백업 등을 할 수 있는 복합구동기 (Mcm)도 있다.

조금씩 작성 중이다. ;;

Once the terminal is open, you will be greeted with a command prompt. Create a new directory for the server software by typing in the following command:

user@mineserv:~$ mkdir minecraft-server

Now, change directories to the newly created directory by typing

user@mineserv:~$ cd minecraft-server/

Once you're in the newly created directory, its time to download the Minecraft server software. This can be done using the wget command, shown below.

user@mineserv:~$ wget -O minecraft_server.jar http://minecraft.net/download/minecraft_server.jar

Once this command finishes executing, you will have successfully downloaded the Minecraft server software. In order to run it, you need to execute the following command:

user@mineserv:~$ java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui

If everything went well, you will be greeted with the following message after the server finishes setting up:

[INFO] Done! For help, type "help" or "?"

Make sure to keep this terminal window open in order to continue running the server, as closing it will cause the server software to close.

Create an op user

In Minecraft, an op is a user that has special commands that give them certain administrative powers on a server. In order to give your character op status, you will need to make a special file called op.txt inside your minecraft directory. First, make sure that your Minecraft server is not currently running. Then, open up the text editor gedit and create a file called op.txt inside of your minecraft server folder, (which should be minecraft-server if you followed this guide). In this file, enter your minecraft username on the first line and then start your server again. You will now have access to op commands on your server.

Connect to the server

Once you have your Ubuntu Minecraft server installed and configured, it is now time to connect to the server. Open your Minecraft client and select the multiplayer option. Then, type in the ip address of your Minecraft server and press connect. After a few moments, you will be greeted with a new Minecraft map. Make sure to write down the IP address of the server in order to let others know the IP address of your server.

1)
마인크래프트는 사용할수 없지만, 엄청난 수의 플러그인이 분리된 쓰레드에서 구동되고, 그것은 여러개의 코어를 사용할수 있다는걸 뜻한다