EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Linux Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=588)
-   -   New Server - How do I setup a Login Server? (https://www.eqemulator.org/forums/showthread.php?t=38799)

GreenMerope 09-18-2014 06:40 PM

New Server - How do I setup a Login Server?
 
I love EQ and love tinkering, so today I decided to make my own server.

I followed the very excellent instructions on how to set up your linux server and it appears to be working but somehow I forgot the part about needing a login server.

Can I set up a login server on the same box? I'm guessing I can but how? There seems to be two pieces of software, an older piece called MiniLogin and the new one just called LoginServer. Can anyone help me set one of these up?

I'd rather not go public with the server and register it anywhere until I'm sure I know what I am doing.

Thank you for your help!

Shendare 09-18-2014 06:56 PM

Windows user here. Until a Linux admin can provide assistance, it's possible the Windows Server Setup wiki page on setting up a private login server will be of some help as far as compiling the right binaries and use of the ini & conf files:

http://wiki.eqemulator.org/p?Windows...Guide&frm=Main

Shendare 09-18-2014 06:59 PM

Oh, and IIRC, MiniLogin was an old fake login server that didn't utilize the EQ crypto library, so it ignored whatever username/password people logged in with and let them in based solely on their IP address. LoginServer is the one that uses the actual EQ crypto library as a dependency and works with full username/password logins, allowing for multiple accounts from the same IP address.

GreenMerope 09-18-2014 07:45 PM

Thanks for the quick reply. I did see the setup instructions for windows but being a novice user myself, I'm not sure how to build my EQEmu server with LoginServer enabled--if it is indeed even possible. Does anyone who runs a linux server have a fix?

vsab 09-19-2014 03:56 AM

Heh, I've just been working on this on my linux setup...

The answer is yes you can set up you own login server on linux, but the current guides don't cover it for Linux, presumably as the authors wanted to use the public login server. First you must download the right dependencies for your distro from http://eqemu.github.io - I use Debian 7 32 bit so used http://eqemu.github.io/ubuntu_LoginServerCrypto_x86.zip

Unzip and put the two files in the dependencies folder in your source.

When I ran cmake I didn't get any config choices at all, so I had to hand edit CMakeCache.txt and found the
Code:

EQEMU_BUILD_LOGIN:BOOL=OFF
and changed to
Code:

EQEMU_BUILD_LOGIN:BOOL=ON
then re-ran make to compile. See how you go with that, at the time of writing my code won't compile, but that's for a different reason that's unrelated.

It is worth mentioning what version of linux you are using if you require further support, as the answers may very well depend on that.

Vexyl 09-19-2014 08:26 AM

Quote:

Originally Posted by vsab (Post 234002)
...
When I ran cmake I didn't get any config choices at all, so I had to hand edit CMakeCache.txt and found the ...



You have to pass -i to cmake to get options (i.e., `cmake -i`).

GreenMerope 09-19-2014 07:27 PM

Yes! Sorry for letting this stand. I found exactly what you did. My code actually compiled just fine using the dependencies I found. We're a resourceful bunch aren't we?

Anyway, now I have the task of setting up the SQL server. It is called EQEmuLoginServerDBInstall.sql. I have almost no experience with SQL servers but there seems to be a .sql file that if executed on my database will add the tables needed. That's what I'm working on tonight.

The loginserver uses its own config file called login.ini which I'll have to move over to the server file with the new login server binary.

I'm running a fresh install of Debian 7.6.0 64bit. I have a dedicated machine for this server so I did not use VMware, but I did install the Desktop Environment just in case.

Let's keep on this together. I'll let you know how my attempts go.

vsab 09-20-2014 03:30 AM

Tell me how you go, I've got to that stage - remember to also copy over the opcode.conf files (one for titanium, one for sod+) to where loginserver is.

I've got it up and running but currently I only have access to a linux machine so can't boot up EQ to check!

provocating 09-20-2014 07:47 AM

I have been running one for many years on Debian. If you get stuck pm me, I should be quick to respond.

GreenMerope 09-20-2014 08:37 AM

Thank you for your help!
My server is up and running, just took some tinkering and grabbing some info from the Windows install guide and just some common sense. provocating I might take you up on your offer as I still have a couple little questions.

I'm going to post here how I solved my loginserver problem.

None of this information has any guarantee whatsoever, probably isn't best practice by any stretch. I'm a novice and this is how I got my server going, good luck!

First thing you need to do is go get the dependencies that loginserver needs to compile and put them in the dependency folder to your source folder. I found the dependencies here: http://eqemu.github.io/. Unlike vsab I'm running 64bit debian so I grabbed the ubuntu_LoginServerCrypto_x64.zip folder, unzipped it, and dropped the dependencies in the dependency folder.

Next find CMakeCache.txt and set EQEMU_BUILD_LOGIN:BOOL: OFF to ON. Now run make to complile.

I moved loginserver over to my main server directory as well as its configuration file, login.ini and the op code files (thanks vsab).

Now I had to get the sql database ready to interact with the loginserver. To do this I used the EqEmuLoginServerDBInstall.sql file. You'll find it in the loginserver source in the login_util directory.

Now I had new tables in my database. I edited them for my own purposes.

tblLoginServerAccount - This holds user accounts: what people will use at the client to get into your server. You'll see there's already an account there named Admin. The password is a SHA1 hash. I took out this Admin account and made one for myself. Keep in mind the password must be a SHA1 hash! I used an encryption tool online to take my wanted password and get the hash string to put in this field. The Admin account has a password of "password", so if you want to you can use that if you just want to test locally. There might be a way to do this that isn't manual but I don't know it.

tblServerAdminReg - This holds the worldserver account holders and their information. I went into the eqemu_config.xml file and edited the <loginserver> section to reflect the username and password defined here. I also put in the IP and port of my loginserver. I was running the loginserver on the same machine so the host for me was 127.0.0.1 and the port is 5998.

tblServerListType - Just what it says. I made no changes here.

tblWorldServerReg - This defines the actual servers. My understanding is one world server admin can have several servers. I made it so the ServerLongName and ServerShortName matched the corresponding values in my eqemu_config.xml. I checked and made sure that the ServerAdminID matched the id of my account in tblServerAdminReg (in my case, 1). I also made the server trusted. I don't know what this does. I told you I was a noob, right?

The loginserver has it own configuration file, login.ini. I opened it up and edited the database section with the info for my own database so that the loginserver can access it.

I then went on my router and made sure I was forwarding ports 5998 and 5999 to the correct machine.

From there I started my testing. When I launched my server I made sure to launch loginserver before world. I don't know if this matters, I need to test it, but for sure, world needs to communicate to loginserver.

You'll have to edit your eqhost to point at your new loginserver.

The loginserver makes it own very helpful log file which will be with the others in the logs directory.

When I got everything working I got this in the log file:

[Debug] [09.20.14 - 01:34:48] Server Started.
[Network] [09.20.14 - 01:34:51] New world server connection from 127.0.0.1:58573
[World] [09.20.14 - 01:34:51] Server Test(Test) successfully logged in.

One thing I ran into was this:
[Network] [09.19.14 - 21:33:45] New world server connection from 127.0.0.1:32933
[Network Error] [09.19.14 - 21:33:45] Recieved application packet from server that had an unknown operation code 0x1000.

After some looking around I realized that earlier in the evening I had tried to get MiniLogin to work and left its entries in the database. I deleted them and all was well.

I hope this helps someone.

I want to put out my sincere thanks to everyone involved in this project. The programming is well done and everything was here for me to find it, I just had to look.

BONUS:

So when my server did start up, there were no mobs, and no NPCs. Just a high elf and the great wide world. It was a bit eerie actually. Anyway the Linux startup guide is currently missing the part about sourcing the updates to your database. You'll find how to do this in the Windows start up guide.

provocating 09-20-2014 08:45 AM

Sure thing man, I have been running two servers on Debian for probably around 5 years now so that part of it I have down.


All times are GMT -4. The time now is 12:55 PM.

Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.