(Tutorial) [Linux VPS] Making a Lithium-Based v111 + MapleStory Server on a Linux VPS

Wrriten by Indigo of SG
Please do not re-release this guide elsewhere without proper credits and permission by me 

This is not 100% complete, I will be adding pictures/screenshots later on 

Downloads
(Download + Install them all)

To set up a MapleStory private server on a Linus VPS you will need the following on your own PC (NOT the VPS):

- Your Linux VPS (Obviously)
- Putty (PuTTY Download Page)
- WinSCP [Not necessary but strongly recommended] (WinSCP :: Free SFTP and FTP client for Windows)
- Lithium [I'm going to be using v111 rev 96] (LithiumREV96.zip)
- Netbeans IDE (https://netbeans.org/community/relea...quiredsoftware)
If you don't have Java, you'll need it for netbeans. Might as well get it now.
- MapleStory Localhost (Download maplestory_111.1_local.rar - Hostr v111)
- MapleStory v111 (MSSetupv111.exe torrent download)

Server Setup Step 1 - JAVA
First, open putty.exe and login with your VPS information. Enter your IP, username, and password accordingly.

The first step is to get java set up. My guide will be based off the CentOS distro, if you are using something else like Ubuntu, this will still work but you'll have to google some commands if you don't know them.

To download JDK 7, run the command

Code:
wget -p jdktmp/ --no-cookies --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com" "http://download.oracle.com/otn-pub/java/jdk/7u17-b02/jdk-7u17-linux-x64.rpm"

Then to install it, run

Code:
rpm - Uvh /jdktmp/jdk-7u17-linux-x64.rpm


Now we need JRE 7, run the command
Code:
wget  http://javadl.sun.com/webapps/download/AutoDL?BundleId=75252

Code:
tar zxvf jre-7u17-linux-x64.tar.gz


Note: You may certainly change the download links in the codes above if you are using 32-bit, want a different file type, or for any other reason!
If for whatever reason you can't get the commands to work, you can download the appropriate linux file on your PC, transfer it to the VPS using WinSCP, and then install it from there.

Now run the command
Code:
ls

You should have two directories, one for JDK and one for JRE. Now we must copy these JCE files
Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files 7 Download
into our VPS. I recommended using WinSCP rather than the command line for moving these small files - just log in using your IP, username, and password. You'll be able to easily transfer the JCE files to these directories:
Code:
root\jre7\lib\security
root\jre7\lib\ext
root\jre7\lib
root\jdk1.7\jre\lib
root\jdk1.7\jre\lib\ext
root\jdk1.7\jre\lib\security
Now we have Java set up properly.

Server Setup Step 2 - MYSQL + REPACK
Now we have to get MySQL as our database. I use this command for downloading and installing it
Code:
yum install mysql mysql-server

To start MySQL for the first time, run
Code:
/etc/init.d/mysqld start

Now set your username (preferably root) and password (whatever you want)
Code:
mysqladmin -u root -p ShadyStoryIsFreakingAwesome

Open up MySQL
Code:
mysql - u root -p

Enter your password.

Now transfer the lithium repack that you downloaded into your VPS using WinSCP. I like renaming the source folder from "trunk" to something like "Source" or "ShadyStory", but it's up to you.

Now we have to execute all the SQL files. Go back into MySQL and use the source command to do so. For example,
Code:
source /root/Source/SQL/1 - Structure.sql

Do this for all the SQL files in your repack.

Now open up db.properties and replace it with
Code:
url=jdbc:mysql://localhost:3306/Lithium?autoReconnect=true
user = root
password = ShadyIsANoobcake
Open worldGMS.properties and edit 127.0.0.1 to your VPS IP.
Under src/Constants/Serverconstants.jar find
Code:
public static final byte[] Gateway_IP = new byte[]{(byte) 127, (byte) 0, (byte) 0, (byte) 1};

and replace the 127, 0, 0, and 1 with your VPS IP. For example,
Code:
(byte) 205, (byte) 12, (byte) 613, (byte) 500

Also, change the MySQL password from "root" to whatever yours is. Hopefully not Shadyisanoobcake.

Under src/Database/Databaseconnection.java find "serverconstants"
Replace the "v111" above it to "Lithium".

Server Setup Step 3 - NETBEANS
Open up NetBeans IDE.

Go to File > New Project > Java Project with Existing Sources
Name it Lithium and choose your build folder. Remember it!
Then click next.

Under Source Package Folders, click "Browse". Then go to your repack and import the entire src folder.
Hit finish.

Now on the left hand side of Netbeans, click the '+' icon next to Lithium. Right click "Libraries" and click "Add JAR/Folder". Import all the .jar files in your source's dist folder.
Now go to run > Build Project (or just hit F11) and wait for it compile. Once it's done, find the Lithium.jar under your build folder destination that you selected in Netbeans. Copy that into your dist folder, and also copy it into your dist folder in the VPS.

Server Setup Step 4 - Shell Files
This step is fairly simple. Download these shell files
https://mega.co.nz/#!8ddR2BaI!F1zuCD...eYlzvwW7S9rJMA
(Kudos to Vintage of RageZone for sharing!)
Now edit them with NotePad and change the aerolith.jar on all three shell files to Lithium.jar

Now dump them all by running them one at a time. For example:
First go to your source folder

Code:
cd Source


Then make the shell script an executable

Code:
chmod u+rwx dump-items.sh


Finally execute it.

Code:
./dumpitems.sh


Do this for all three shell scripts.

Server Setup Step 5 - LocalHost, Portfowarding, Launching
You now need to download something to edit your localhost - STREDIT is what is now popular.
Link: STREDIT.rar

Now open up Stredit and do File > Open > Find your v111 localhost that you downloaded.
In the bottom right, edit the IP 127.0.0.1 to your VPS IP. I also recommend forcing the use of just 1 IP.
Save it as the name of your server (ex. ShadyStory.exe) and place it inside your MapleStory v111 folder.

Go back to putty, and run the launch.sh
Code:
cd Source

Code:
./launch.sh

If your ports aren't forwarded, go ahead and forward them. You will need to follow the following ports
8484
8585
8587
8600
80 (It should be forwarded already)
Use this command to forward. (Change 8587 to whatever you need)
Code:
iptables -I INPUT 5 -p tcp -m tcp --dport 8587 -j ACCEPT


Congratulations, your server is now up! You can run the localhost client to get in-game.
Good luck!

Please let me know if there's anything wrong with my tutorial or if you're having and questions/problems and I'll try to help you.
Likes/Comments/Feedback are appreciated!
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值