Linux Server Guide

Posts 115 of 21 · Page 1 of 2
Linux Server Guide
A guide on how to use the server from @Trapped GitHub on linux.

This was tested on Arch Linux which means it will probably work on your linux.



A linux and a windows client connected to the linux server

How to run Server (Easy Mode)

Packages needed to run: mono, mysql, mysql workbench (install these before doing any steps)

APPROVAL PENDING

Virus Scan 1
Virus Scan 2

1. Download and extract zip to desired location. The example used for this tutorial will be ~/rotmg_server-linux.

2. Setting up the mysql:
2.1 Start mysql daemon using your distributions respective command. Examples:
sudo systemctl start mysqld
sudo service mysql restart
#NOTE "systemctl enable mysqld" or similar will cause mysql to start on boot
2.2 Change mysql root password to botmaker
mysqladmin -u root password botmaker
2.3 Open MySQL Workbench and add New Server Instance.
Connection Name: localhost
Connection Method: Standard TCP/IP
Hostname: 127.0.0.1 Port:3306
Password: botmaker
#the rest of the steps for making server instance are client specific
2.4 Under Server Administation, click Manage Import/Export. Enter password botmaker if required
2.5 Select Data Import/Restore - Import from Self Contained - ~/rotmg_server-linux/rotmg-server-sy.sql
2.6 Start Import! After this is done you may close MySQL Workbench

3. Running Server + wServer
3.1 Run the ~/rotmg_server-linux/server-start script, entering in root/sudo password as necessary.
3.2 ALTERNATIVELY open two separate terminals and run the following commands respectively in each:
mono ~/rotmg_server-linux/server/bin/Release/server.exe
sudo mono ~/rotmg_server-linux/wServer/bin/Release/wServer.exe
#NOTE you can use "su root" to run wServer, aslong as it is done by root.

4. Run client ~/rotmg_server-linux/client.swf with your choice of browser or flash/whatever (wine using flashprojector works fine for this)

5. Login info:
Accounts: User, Donator, Moderator, Game Master, Admin, Server Owner
Password: 12345678
Server Owner/Admin have all chars lvl 20 max stats + top tier + untier.

Creating Server (Hard Mode)

These steps will allow you to configure your server and build servers from the GitHub updates.

Packages needed: mono, monodevelop (xbuild), mysql, mysql workbench (install these before doing any steps)

1. Download and extract the rotmg server from Trapped's GitHub. Once again, the example used for this tutorial will be ~/rotmg_server-linux.

2. Setting up the mysql:
2.1 Start mysql daemon using your distributions respective command. Examples:
sudo systemctl start mysqld
sudo service mysql restart
#NOTE "systemctl enable mysqld" or similar will cause mysql to start on boot
2.2 Change mysql root password to botmaker
mysqladmin -u root password botmaker
2.3 Open MySQL Workbench and add a New Connection.
Connection Name: localhost
Connection Method: Standard TCP/IP
Hostname: 127.0.0.1 Port:3306
Password: botmaker
#the rest of the steps for making server instance are client specific
2.4 Under Server Administation, click Manage Import/Export. Enter password botmaker if required
2.5 Select Data Import/Restore - Import from Self Contained - ~/rotmg_server-linux/db/struct.sql
2.6 Start Import!
2.7 Edit Table Data of localhost to create Accounts/Characters etc. You may now close MySQL Workbench

3. Modify and build server
3.1 Edit the files ~/rotmg_server-linux/wServer/Vector2.cs and ~/rotmg_server-linux/terrain/Vector2.cs using your favourite editor OR
3.2 Alternatively, run monodevelop and open ~/rotmg_server-linux/server.sln and navigate to wServer-Vector2.cs and terrain-Vector2.cs
3.3 Change each instance of "Math.Sqrt()" to "System.Math.Sqrt()" in each of the files, there should be 6 instances in each file.
#NOTE if using monodevelop, attempting to build will make finding these errors alot easier.
3.4 Save and exit.
3.5 Now to build the server, In terminal:
cd ~/rotmg_server-linux/
xbuild ~/rotmg_server-linux/server.sln
3.6 Running xbuild twice reduces warnings... Hopefully this has worked so far...

4. Running Server + wServer
4.1 Open two separate terminals and run the following commands respectively in each:
mono ~/rotmg_server-linux/server/bin/Release/server.exe
sudo mono ~/rotmg_server-linux/wServer/bin/Release/wServer.exe
#NOTE you can use "su root" to run wServer, aslong as it is done by root.
4.2 Feel free to write your own launch script

5. Run client ~/rotmg_server-linux/client.swf with your choice of browser or flash/whatever (wine using flashprojector works fine for this)


Configuring

Refer here

Thanks to @Trapped for advice + moral support and @Bone9 for making me not feel alone.
rotmg_server-linux_mpgh.net.zip25.0 MB · 230 downloads Clean
Now its your turn,wanted to make this thread yesterday,cause i found nearly the same solution
But awesome dude

Thank you very mutch <3

EDIT: Sadly cant acces Medusa etc. or the Vault :S
Quote Originally Posted by Bone9 View Post
Now its your turn,wanted to make this thread yesterday,cause i found nearly the same solution
But awesome dude

Thank you very mutch <3

EDIT: Sadly cant acces Medusa etc. or the Vault :S
Download the new commit, fixed the portals.
Um, I cant join and it keeps saying when i register "You are not whitelisted" ?... ..
Quote Originally Posted by teti100teti View Post
Um, I cant join and it keeps saying when i register "You are not whitelisted" ?... ..
Stop being retarded...
Quote Originally Posted by Trapped View Post
Stop being retarded...
Well, I'm sorry for apparently being "Retarded" But, I'm just asking what to do, Since I'm new to setting up 'Private servers'
regarding step 4:

4. Run client ~/rotmg_server-linux/client.swf with your choice of browser or flash/whatever (wine using flashprojector works fine for this)



If I get the complete path and the server is online, can I play it with friends by giving them the link?

Thanks you very much, and so sorry for being such a noob.
Quote Originally Posted by RealmAnna View Post
regarding step 4:

4. Run client ~/rotmg_server-linux/client.swf with your choice of browser or flash/whatever (wine using flashprojector works fine for this)



If I get the complete path and the server is online, can I play it with friends by giving them the link?

Thanks you very much, and so sorry for being such a noob.
The reason you are getting flame is because there a guides on this and they are linked at the bottom of the post under configuring.
Note though, to rebuild the server you have to use
cd ~/rotmg_server-linux
xbuild server.sln
And to edit the client strings... I couldnt be bothered trying to figure something out on linux and just used yogda on my windows.

Quote Originally Posted by teti100teti
Um, I cant join and it keeps saying when i register "You are not whitelisted" ?... ..
You have to add an account using mysqlworkbench (edit tables -> rotmg -> accounts), or maybe you can just whitelist yourself there, I always just added accounts directly. And to save you asking another question, to make yourself admin you change the roles value in the last column, 4 is admin.
Or you can wait until my link is approved then just import the other sql database with premade accounts.

Quote Originally Posted by RealmAnna

When I am on step 3.5 (Hard Mode) I get the following error while trying to build:

Any clues?
According to Trapped, the svrMonitor is useless. I didnt remove it because mine still built fine with it. You could back up the file (~/rotmg_server-linux/realm/RealmManager.cs), remove the bit of code with it and do some science. Also wServer.realm.RealmTime would probably need removing.

As for the other errors, this is because of the libraries used by your mono. What version of mono are you running, and what distro of linux do you have? (this could also fix svrMonitor)

See if you can resolve it before my prebuilt link gets approved.
When I am on step 3.5 (Hard Mode) I get the following error while trying to build:

Any clues?

Code:
	realm/entities/Container.cs(64,80): error CS0172: Type of conditional expression cannot be determined as `short' and `int' convert implicitly to each other
	realm/entities/Container.cs(65,80): error CS0172: Type of conditional expression cannot be determined as `short' and `int' convert implicitly to each other
	realm/entities/Container.cs(66,80): error CS0172: Type of conditional expression cannot be determined as `short' and `int' convert implicitly to each other
	realm/entities/Container.cs(67,80): error CS0172: Type of conditional expression cannot be determined as `short' and `int' convert implicitly to each other
	realm/entities/Container.cs(68,80): error CS0172: Type of conditional expression cannot be determined as `short' and `int' convert implicitly to each other
	realm/entities/Container.cs(69,80): error CS0172: Type of conditional expression cannot be determined as `short' and `int' convert implicitly to each other
	realm/entities/Container.cs(70,80): error CS0172: Type of conditional expression cannot be determined as `short' and `int' convert implicitly to each other
	realm/entities/Container.cs(71,80): error CS0172: Type of conditional expression cannot be determined as `short' and `int' convert implicitly to each other
	realm/entities/Container.cs(72,80): error CS0172: Type of conditional expression cannot be determined as `short' and `int' convert implicitly to each other
	realm/entities/Container.cs(73,80): error CS0172: Type of conditional expression cannot be determined as `short' and `int' convert implicitly to each other
	realm/entities/Container.cs(74,83): error CS0172: Type of conditional expression cannot be determined as `short' and `int' convert implicitly to each other
	realm/entities/Container.cs(75,83): error CS0172: Type of conditional expression cannot be determined as `short' and `int' convert implicitly to each other
	realm/entities/player/Player.Trade.cs(81,61): error CS0172: Type of conditional expression cannot be determined as `int' and `short' convert implicitly to each other
	realm/entities/player/Player.Trade.cs(90,63): error CS0172: Type of conditional expression cannot be determined as `int' and `short' convert implicitly to each other
	realm/entities/player/Player.cs(131,80): error CS0172: Type of conditional expression cannot be determined as `short' and `int' convert implicitly to each other
	realm/entities/player/Player.cs(132,80): error CS0172: Type of conditional expression cannot be determined as `short' and `int' convert implicitly to each other
	realm/entities/player/Player.cs(133,80): error CS0172: Type of conditional expression cannot be determined as `short' and `int' convert implicitly to each other
	realm/entities/player/Player.cs(134,80): error CS0172: Type of conditional expression cannot be determined as `short' and `int' convert implicitly to each other
	realm/entities/player/Player.cs(135,80): error CS0172: Type of conditional expression cannot be determined as `short' and `int' convert implicitly to each other
	realm/entities/player/Player.cs(136,80): error CS0172: Type of conditional expression cannot be determined as `short' and `int' convert implicitly to each other
	realm/entities/player/Player.cs(137,80): error CS0172: Type of conditional expression cannot be determined as `short' and `int' convert implicitly to each other
	realm/entities/player/Player.cs(138,80): error CS0172: Type of conditional expression cannot be determined as `short' and `int' convert implicitly to each other
	realm/entities/player/Player.cs(139,80): error CS0172: Type of conditional expression cannot be determined as `short' and `int' convert implicitly to each other
	realm/entities/player/Player.cs(140,80): error CS0172: Type of conditional expression cannot be determined as `short' and `int' convert implicitly to each other
	realm/entities/player/Player.cs(141,83): error CS0172: Type of conditional expression cannot be determined as `short' and `int' convert implicitly to each other
	realm/entities/player/Player.cs(142,83): error CS0172: Type of conditional expression cannot be determined as `short' and `int' convert implicitly to each other
	realm/RealmManager.cs(191,32): error CS1502: The best overloaded method match for `svrMonitor.Mon.Tick(wServer.realm.RealmTime)' has some invalid arguments
	realm/RealmManager.cs(191,32): error CS1503: Argument `#1' cannot convert `wServer.realm.RealmTime' expression to type `wServer.realm.RealmTime'
	realm/worlds/Vault.cs(96,121): error CS0172: Type of conditional expression cannot be determined as `int' and `short' convert implicitly to each other
	realm/worlds/Vault.cs(96,48): error CS0411: The type arguments for method `Utils.GetCommaSepString<T>(T[])' cannot be inferred from the usage. Try specifying the type arguments explicitly


Any help on what this might be?
I strongly recoment to start setting up private servers with something more "noob" friendly like minecraft.This here is a bit more advanced lol
Quote Originally Posted by Bone9 View Post
I strongly recoment to start setting up private servers with something more "noob" friendly like minecraft.This here is a bit more advanced lol
Is this answer to me?

If so, that means I really can't expect any help, only a recommendation to start messing around with Minecrap?
Quote Originally Posted by Syuff View Post
According to Trapped, the svrMonitor is useless. I didnt remove it because mine still built fine with it. You could back up the file (~/rotmg_server-linux/realm/RealmManager.cs), remove the bit of code with it and do some science. Also wServer.realm.RealmTime would probably need removing.

As for the other errors, this is because of the libraries used by your mono. What version of mono are you running, and what distro of linux do you have? (this could also fix svrMonitor)

See if you can resolve it before my prebuilt link gets approved.

Thanks for the support.

I had some problem locating the file, maybe the directory you mean is "~/rotmg_server-linux/wServer/realm/RealmManager.cs". But to be honest I don't know hwo to mess with the code inside of it too well.

Also, the Version retrieved by mono --version is : Mono JIT compiler version 2.10.8.1 (Debian 2.10.8.1-5ubuntu1)

And the OS is Ubuntu 12.10

I guess that's the information you asked I think.


I am so sorry for not being able to solve this and not being experienced. Thank you very much for your support.
Quote Originally Posted by RealmAnna View Post
Thanks for the support.

I had some problem locating the file, maybe the directory you mean is "~/rotmg_server-linux/wServer/realm/RealmManager.cs". But to be honest I don't know hwo to mess with the code inside of it too well.
yeh, thats the one.

Quote Originally Posted by RealmAnna View Post
Also, the Version retrieved by mono --version is : Mono JIT compiler version 2.10.8.1 (Debian 2.10.8.1-5ubuntu1)

And the OS is Ubuntu 12.10
I highly recommend using mono 3, make sure you have .NET 4 compiler, you will have many problems with mono 2. That should solve all your problems, ill add that to my post.

Edit: try
xbuild /property:Configuration=Debug server.sln
when building
Quote Originally Posted by Syuff View Post
I highly recommend using mono 3, make sure you have .NET 4 compiler, you will have many problems with mono 2. That should solve all your problems, ill add that to my post.
I am sorry but could you help me locate mono 3 for linux? I can only find mono 2.1 and mono3 on the website is for Mac OS:

Download - Mono
Posts 115 of 21 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

Need help?