Limetime's TimeLine
article thumbnail
반응형

 요즘, 동물의 숲과 비슷한 성인의 숲이라고도 불리는 롱빈터(Long-vinter)라는 게임이 뜨고 있다. 게임 분위기에서 동물의 숲 같은 느낌이 느껴진다. 하지만 아직 얼리 엑세스(Early-Access)이기도 하고, 실제 동물의 숲처럼 NPC는 없다. 때문에 같이할 친구가 있거나 다른 사람이 열어둔 서버에 가서 게임을 해야 재미를 느낄 수 있을 것이다.

 혜안이라는 유튜버가 올린 롱빈터 플레이 영상이 굉장히 인기가 많다. 나도 그것을 보고 게임을 구매하였고, 동물의 숲을 언젠가는 한 번 해보고 싶은 마음이 있었다. 혜안 말고도 많은 유튜버들이 플레이해서 업로드 하고 있다.


개요

일단, 내가 사용하고 있는 윈도우 컴퓨터로 서버를 구축하는 방법은 많이 나와 있다. 때문에 따라하기 무리 없을 것이다. 하지만, 윈도우 서버를 돌리는 방법은 추천하지 않는다. 구축 방법은 쉽지만, 24시간 켜놓기도 힘들고 내가 컴퓨터를 사용할 때, 지장을 줄 수도 있기 때문이다. 아래 링크를 통해 윈도우에서 구축할 수 있다.

 

[롱빈터 공략] #3 - 서버 만들기

롱빈터 서버 구축 방법에 대해 알아보겠습니다. 차례대로 따라오면 문제없이 서버를 생성해서 혼자, 또는 친구들과 오순도순 즐길 수 있습니다. 서버를 만들기에 앞서 준비물이 필요합니다. 서

superprimer.tistory.com

반응형

 어떻게 구성을 할 것이냐? 클라우드 서비스로 서버를 구축할 것이다. 많은 클라우드 회사(AWS, Oracle, Naver 등)가 있지만 그 가운데서 최강의 무료(Free Tier) 클라우드 서버를 제공하는 Oracle 클라우드를 사용할 것이다. Windows를 사용하지 않는 이유 중 하나가 무료로 Windows OS 클라우드 서비스를 제공하는 곳은 없기 때문이다.

또, 클라우드 서비스를 사용하면 전기 요금, 통신 요금이 부과되지 않는다는 것이다!

Oracle Cloud Free Tier로 Linux 서버를 구축해서 롱빈터 서버를 올릴 것이다!


 

Oracle Cloud 서버 개설

1. Putty & Puttygen 다운로드 및 공개키&개인키 생성

오라클 클라우드 인스턴스(서버)를 생성하기 전에 가장 중요한 작업이다. SSH 접속을 위한 공개키 및 개인키를 생성해야 한다. 이것을 안하면 힘들게 인스턴스 생성한 것이 쓸모없게 되버린다. 물론 오라클에서 로컬 콘솔을 제공하긴 하지만 느려 터져서 힘들다.

 

Download PuTTY: latest release (0.78)

This page contains download links for the latest released version of PuTTY. Currently this is 0.78, released on 2022-10-29. When new releases come out, this page will update to contain the latest, so this is a good page to bookmark or link to. Alternativel

www.chiark.greenend.org.uk

반응형

 위 사이트에서 putty와 puttygen을 다운받는다. putty는 ssh 클라이언트 접속 프로그램이고, puttygen은 공개키 및 개인키 생성 프로그램이다. 내 컴퓨터는 64bit이니까 64-bit x86을 받겠다.

Puttygen을 켜보면 위와 같은 화면의 창이 뜬다. Generate를 누르면 마우스를 움직일 때 마다 게이지가 채워지는 것을 볼 수 있다. 열심히 움직이자!

모두 생성이 된 상태이다. 

Key comment는 나의 경우 cert로 줬다. (cert.ppk) - 안 건드려도 된다.

Key passphrase는 나중에 SSH 연결할 때, 계정 비밀번호 대신 사용할거라 꼭! 기억해야한다. (다만 복잡하게 만들 수록 보안에 강하다!)

Confirm passphrase까지 똑같이 입력해주면 끝!!

Save private Key를 해주자! 나중에 SSH 접속하려면 반드시 필요하니, 잘 저장 해두자!

Public Key도 메모장 같은데 저장해두자! 인스턴스(서버) 생성할 때, 쓸거다!

 

2. 인스턴스 생성

우선 생성할 서버를 한국(South Korea Central (Seoul))로 설정해주자. 외국으로 설정하면 게임하다가 핑이 튈수도?

그 후 '컴퓨트 - 인스턴스'를 선택한다.

구획 설정 후 '인스턴스 생성' 버튼을 클릭한다.

구획 설정을 안하면 Document들만 뜬다. 꼭 하자! (초보자들이 헤매기 좋은 곳)

나는 이미 서버가 만들어져 있기 때문에 'dorothy'라는 인스턴스가 실행되어 있는 것이다.

이름을 지정해주자. 아무거나 입력하면 된다. 나는 dorothy로 했다.

이미지를 'Ubuntu 22.04' 버전으로 선택한다. 또, Shape도 AMD '항상 무료 적격(Free Tier)'을 선택하면 된다.

근데 말 그대로 1 core CPU, 1GB RAM, 0.48 Gbps Network Bandwidth이기 때문에 과금할 생각이 있다면 결제하길 바란다. 나는 안할거다.

아까 전에 Puttygen으로 생성한 Public Key를 붙여넣자. (주의! 똑같이 다 넣어야 한다!)

생성된 인스턴스를 눌러서 상세페이지로 오면 맨 아래에 '연결된 VNIC'가 있을 것이다. 눌러보면 위와 같이 뜰텐데, 인스턴스 이름(dorothy)을 클릭한다.

위와 같이 IPv4 주소에 가보면, 공용IP주소가 임시로 할당되어 있을 것이다. 맨 우측에 있는 버튼을 눌러서 편집을 열어보자.

위와 같이 '공용 IP 없음'을 선택하고 업데이트를 했다가 다시, '예약된 공용 IP'를 선택하면 IP주소를 생성할 수 있다. Free Tier는 하나의 공용 IP 주소를 무료로 생성할 수 있다.

다시 인스턴스 세부정보로 돌아와서 서브넷을 눌러보자!

보안 목록을 눌러보면...

이렇게 설정해주면 되는데... 22(SSH) 포트는 원래 열려 있었고..

소스 CIDR은 공통으로 0.0.0.0/0으로 설정해서 모든 호스트를 지정.

27015-27016 포트는 TCP,UDP 모두

7777 포트는 UDP만 속하게 해주면 된다.

그 후 '송신 규칙 추가 버튼'을 누르면 끝!

 

3. 서버 접속

이제 나만의 서버가 완성되었다! putty를 열어서 진행해보자.

공용 IP 주소에 있는 IP주소를 Putty의 Host Name (or IP address)에 입력해준다.

아까 전에 Puttygen으로 생성한 개인키 (cert.ppk)를 Putty의 Connection - SSH - Auth - Credentials..의  Private Key file for authentication에 넣는다. 그 후 open 버튼을 클릭하면 경고창 메시지가 뜨는데, 그냥 OK 누르면 된다.

이렇게 자동으로 뜨고, Passphrase for key.. : 에는 아까 puttygen에서 입력했던 passphrase를 입력하면 된다.

그럼 서버에 접속할 수 있다!!

 

4. 서버 셋팅

ubuntu 계정의 패스워드를 변경하도록 하자.

ubuntu@dorothy:~$ sudo passwd

 

롱빈터 서버 구축

1. steamcmd 계정 생성

ubuntu@dorothy:~$ sudo useradd -m -d /home/steam steamcmd
ubuntu@dorothy:~$ sudo passwd steamcmd
ubuntu@dorothy:~$ sudo usermod -aG sudo steamcmd
ubuntu@dorothy:~$ sudo chsh -s /bin/bash steamcmd
ubuntu@dorothy:~$ sudo su - steamcmd

sudo 쓸 때, 비밀번호 물어보면 ubuntu 계정 비밀번호를 입력하면 된다.

sudo passwd steamcmd 명령어를 진행할 땐, steamcmd가 사용할 비밀번호를 셋팅하면 된다.

 

2. 패키지 업데이트 및 설치

steamcmd@dorothy:~$ cd /home/steam
steamcmd@dorothy:~$ sudo apt update -y
steamcmd@dorothy:~$ sudo apt install git git-lfs screen net-tools -y
steamcmd@dorothy:~$ sudo add-apt-repository multiverse
steamcmd@dorothy:~$ sudo dpkg --add-architecture i386
steamcmd@dorothy:~$ sudo apt update -y
steamcmd@dorothy:~$ sudo apt install lib32gcc-s1 steamcmd -y

 

3. 스팀 SDK 설치

steamcmd@dorothy:~$ cd /home/steam
steamcmd@dorothy:~$ mkdir steamcmd-source
steamcmd@dorothy:~$ cd /home/steam/steamcmd-source
steamcmd@dorothy:~/steamcmd-source$ wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
steamcmd@dorothy:~/steamcmd-source$ tar -xvzf steamcmd_linux.tar.gz
steamcmd@dorothy:~/steamcmd-source$ ./steamcmd.sh +force_install_dir . +login anonymous +app_update 1007 +quit
steamcmd@dorothy:~/steamcmd-source$ mkdir /home/steam/.steam
steamcmd@dorothy:~/steamcmd-source$ cd /home/steam/.steam
steamcmd@dorothy:~/.steam$ mkdir sdk64
steamcmd@dorothy:~/.steam$ cp /home/steam/steamcmd-source/linux64/steamclient.so /home/steam/.steam/sdk64/

6번째 문장을 실행할 때, 오류가 나올 수도 있다. 일단 그냥 진행해보도록 하자.

나도 오류가 나왔는데, 그냥 무시하니까 되더라... (어떤 오류인지 기억은 안난다..)

 

4. 방화벽(Iptables) 설정

steamcmd@dorothy:~/.steam$ sudo iptables -I INPUT -p udp --dport 7777 -j ACCEPT
steamcmd@dorothy:~/.steam$ sudo iptables -I INPUT -p udp --dport 27016 -j ACCEPT
steamcmd@dorothy:~/.steam$ sudo iptables -I INPUT -p tcp --dport 27016 -j ACCEPT
steamcmd@dorothy:~/.steam$ sudo iptables -I INPUT -p udp --dport 27015 -j ACCEPT
steamcmd@dorothy:~/.steam$ sudo iptables -I INPUT -p tcp --dport 27015 -j ACCEPT
steamcmd@dorothy:~/.steam$ sudo ufw allow 7777/udp
steamcmd@dorothy:~/.steam$ sudo ufw allow 27016
steamcmd@dorothy:~/.steam$ sudo ufw allow 27015
steamcmd@dorothy:~/.steam$ sudo netfilter-persistent save

 

5. 롱빈터 서버 설치

#서버 설치
steamcmd@dorothy:~/.steam$ cd /home/steam
steamcmd@dorothy:~$ git clone https://github.com/Uuvana-Studios/longvinter-linux-server.git
steamcmd@dorothy:~$ sudo chmod -R ugo+rwx longvinter-linux-server/cd /home/steam
steamcmd@dorothy:~$ git clone https://github.com/Uuvana-Studios/longvinter-linux-server.git
steamcmd@dorothy:~$ sudo chmod -R ugo+rwx longvinter-linux-server/

 

6. 환경 변수 설정 (Game.ini)

설정 파일 : /home/steam/longvinter-linux-server/Longvinter/Saved/Config/LinuxServer/Game.ini

steamcmd@dorothy:~$ cat <<-EOF > /home/steam/longvinter-linux-server/Longvinter/Saved/Config/LinuxServer/Game.ini
[/Game/Blueprints/Server/GI_AdvancedSessions.GI_AdvancedSessions_C]
ServerName=Unnamed Island
ServerTag=Default
MaxPlayers=32
ServerMOTD=Welcome to Longvinter Island!
Password=
CommunityWebsite=www.longvinter.com

[/Game/Blueprints/Server/GM_Longvinter.GM_Longvinter_C]
AdminSteamID=76561198965966997
PVP=true
TentDecay=true
MaxTents=2
ChestRespawnTime=600
EOF

이 명령어를 쓰기 전에 설정 파일을 미리 바꿔도 된다.

ServerName=서버이름

MaxPlayers=서버 내 최대 인원

ServerMOTD=서버 진입 시 인사 문구

Password=서버 비밀번호

CommunityWebsite=항구에 링크되는 웹사이트 주소

AdminSteamID=스팀 아이디!! (매우 중요)

AdminSteamID = EOS 계정 ID

PVP=true(PVP가능), false(PVE)

TentDecay=true(텐트 24시간 내 사라짐), false(텐트 사라지지 않음)

MaxTents=2(텐트 소지 수)

 

이미 지나와버렸다면... 아래 명령어로 수정 가능하니 걱정 안해도 된다!

steamcmd@dorothy:~$ vi /home/steam/longvinter-linux-server/Longvinter/Saved/Config/LinuxServer/Game.ini

:q 나가기 (수정 후에 저장 안하면 못나감)

:q! 강제로 나가기 (수정 후 저장 안하고 강제로 나가기)

:wq 저장하고 나가기

 

 

7. systemd 등록

steamcmd@dorothy:~$ sudo cp /home/steam/longvinter-linux-server/longvinter.service /etc/systemd/system/longvinter.service
steamcmd@dorothy:~$ sudo cp /home/steam/longvinter-linux-server/longvinter.socket /etc/systemd/system/longvinter.socket
steamcmd@dorothy:~$ sudo systemctl daemon-reload

 

8. 서버 실행 및 관리 명령어

<서버 실행>
sudo systemctl start longvinter.service

<실시간 서버 로그 추적>
sudo journalctl -u longvinter -f

<전체 서버 로그 확인>
sudo journalctl -u longvinter

<서버 종료>
sudo systemctl stop longvinter.service

<서버 상태확인>
sudo systemctl status longvinter.service

<서버 업데이트>
bash /home/steam/longvinter-linux-server/LongvinterUpdate.sh

<서버 백업>
bash /home/steam/longvinter-linux-server/LongvinterBackup.sh

Play Longvinter

 

Game.ini 파일에서 지정한 서버 이름으로 비공식 섬에 뜰 것이다. 혹시 안뜬다면, 돋보기를 눌러 검색할 수도 있다.

비밀번호를 걸었다면, 자물쇠 모양도 있을 것이다~

 

그럼 안녕~~

반응형

 

참고

 

[롱빈터 공략] #3 - 서버 만들기

롱빈터 서버 구축 방법에 대해 알아보겠습니다. 차례대로 따라오면 문제없이 서버를 생성해서 혼자, 또는 친구들과 오순도순 즐길 수 있습니다. 서버를 만들기에 앞서 준비물이 필요합니다. 서

superprimer.tistory.com

 

 

 

Home - Longvinter Server Docs

Longvinter Server Documentation for Server Administrators Here you will find all the information needed to setup and configure your Longvinter Server,with fully detailed and easy to understand guides.

docs-server.longvinter.com

 

 

GitHub - Uuvana-Studios/longvinter-linux-server: For public hosting and issue tracking for Longvinter Linux Server

For public hosting and issue tracking for Longvinter Linux Server - GitHub - Uuvana-Studios/longvinter-linux-server: For public hosting and issue tracking for Longvinter Linux Server

github.com

반응형
profile

Limetime's TimeLine

@Limetime

포스팅이 좋았다면 "공감❤️" 또는 "구독👍🏻" 해주세요!