Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Linux VPS] Setting Up a Lithium-Based MapleStory Server on a Linux VPS v111+

Newbie Spellweaver
Joined
Apr 17, 2013
Messages
33
Reaction score
3
Wrriten by Indigo of ShadyGamer.com
Please do not re-release this guide elsewhere without proper credits and permission by me
Indigoz - [Linux VPS] Setting Up a Lithium-Based MapleStory Server on a Linux VPS v111+ - RaGEZONE Forums

This is not 100% complete, I will be adding pictures/screenshots soon
Indigoz - [Linux VPS] Setting Up a Lithium-Based MapleStory Server on a Linux VPS v111+ - RaGEZONE Forums


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 ( )
- WinSCP [Not necessary but strongly recommended] ( )
- Lithium [I'm going to be using v111 rev 96] ( )
- Netbeans IDE ( )
If you don't have Java, you'll need it for netbeans. Might as well get it now.
- MapleStory Localhost ( v111)
- MapleStory v111 ( )

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://www.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

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:
[COLOR=#141414]root\jre7\lib\security[/COLOR]
[COLOR=#141414]root\jre7\lib\ext[/COLOR]
[COLOR=#141414]root\jre7\lib[/COLOR]
[COLOR=#141414]root\jdk1.7\jre\lib[/COLOR]
[COLOR=#141414]root\jdk1.7\jre\lib\ext[/COLOR]
[COLOR=#141414]root\jdk1.7\jre\lib\security[/COLOR]
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:
[COLOR=#141414]url=jdbc:mysql://localhost:3306/Lithium?autoReconnect=true[/COLOR]
[COLOR=#141414]user = root[/COLOR]
[COLOR=#141414]password = ShadyIsANoobcake[/COLOR]


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. It's very easy to convert .bat to .sh, but if you're lazy, just download these shell files

(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:


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!
 
Newbie Spellweaver
Joined
May 1, 2013
Messages
26
Reaction score
0
Wrriten by Indigo of ShadyGamer.com
Please do not re-release this guide elsewhere without proper credits and permission by me
Indigoz - [Linux VPS] Setting Up a Lithium-Based MapleStory Server on a Linux VPS v111+ - RaGEZONE Forums

This is not 100% complete, I will be adding pictures/screenshots soon
Indigoz - [Linux VPS] Setting Up a Lithium-Based MapleStory Server on a Linux VPS v111+ - RaGEZONE Forums


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 ( )
- WinSCP [Not necessary but strongly recommended] ( )
- Lithium [I'm going to be using v111 rev 96] ( )
- Netbeans IDE ( )
If you don't have Java, you'll need it for netbeans. Might as well get it now.
- MapleStory Localhost ( v111)
- MapleStory v111 ( )

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://www.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

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:
[COLOR=#141414]root\jre7\lib\security[/COLOR]
[COLOR=#141414]root\jre7\lib\ext[/COLOR]
[COLOR=#141414]root\jre7\lib[/COLOR]
[COLOR=#141414]root\jdk1.7\jre\lib[/COLOR]
[COLOR=#141414]root\jdk1.7\jre\lib\ext[/COLOR]
[COLOR=#141414]root\jdk1.7\jre\lib\security[/COLOR]
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:
[COLOR=#141414]url=jdbc:mysql://localhost:3306/Lithium?autoReconnect=true[/COLOR]
[COLOR=#141414]user = root[/COLOR]
[COLOR=#141414]password = ShadyIsANoobcake[/COLOR]


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. It's very easy to convert .bat to .sh, but if you're lazy, just download these shell files

(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:


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



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!

Can't download Java using the commands
running OSCent 5.8
 
Newbie Spellweaver
Joined
Apr 17, 2013
Messages
33
Reaction score
3
Can't download Java using the commands
running OSCent 5.8

wget --no-cookies --header "Cookie: gpw_e24=http://www.oracle.com%2Ftechnetwork%2Fjava%2Fjavase%2Fdownloads%2Fjdk-7u17-download-1501626.html;" PUT DOWNLOAD LINK HERE --no-check-certificate

Just use wget on the download link... It aint that hard.
It can be tricky if you're trying to wget from oracle's website
 
Last edited:
Newbie Spellweaver
Joined
Mar 10, 2012
Messages
50
Reaction score
0
I start server and get this error
Indigoz - [Linux VPS] Setting Up a Lithium-Based MapleStory Server on a Linux VPS v111+ - RaGEZONE Forums

please somebody help me
 
Initiate Mage
Joined
Aug 16, 2013
Messages
1
Reaction score
0
Could I do this tut witha FrostyMS v83 (linux source)? Or is this v1.11 only?
 
Initiate Mage
Joined
Jul 17, 2013
Messages
3
Reaction score
0
I87HjgZ - [Linux VPS] Setting Up a Lithium-Based MapleStory Server on a Linux VPS v111+ - RaGEZONE Forums


Any help?
 

Attachments

You must be registered for see attachments list
Last edited:
Newbie Spellweaver
Joined
Apr 11, 2008
Messages
18
Reaction score
1
Did everything you said but maple didn't load and gave me the "Cannot connect to Login Server" in a windows box with Yes or No option.. Help?
 
Joined
Apr 14, 2010
Messages
4
Reaction score
0
This guide is missing a lot of stuff. I set a server up for fun and got it working, but if you're following this guide step-by-step, it's not going to work. You need to figure out several more things on your own.
 
Newbie Spellweaver
Joined
Jun 5, 2015
Messages
56
Reaction score
1
Sorry for the bumping of an old thread but this would really help me if only the commands were ubuntu .. Can anyone help me?
 
Newbie Spellweaver
Joined
May 4, 2015
Messages
8
Reaction score
0
do you have a toturial how to install a v62 (or another old version) on linux?
 
Newbie Spellweaver
Joined
Dec 27, 2013
Messages
8
Reaction score
0
can someone reupload the shell files or convert this one to a shell from bat for me please?

Code:
@echo off@title Lithium Server Consoleset CLASSPATH=.;dist\Lithium.jar;dist\mina-core.jar;dist\slf4j-api.jar;dist\slf4j-jdk14.jar;dist\mysql-connector-java-bin.jarjava -server -Dnet.sf.odinms.wzpath=D:\XMLWZs\GMSv111\ server.Startpause
 
Back
Top