This was taken from internet. I really can't remember which page was that because I had this post in my draft for a long time. I hope this will help some one in the future :)
Server howtos:
Howto install and run the d2gs under linux with wine:
by jules 10.10.2002
Introduction
Requirements
Installing wine on a linux machine
Configuring wine
Installing the d2gs on your linuxserver
Running d2gs with wine
INTRODUCTION:
If you want to setup a Linux PvPGN server with Diablo II Closed Realms support you will need the Diablo II gameserver package installed. The biggest problem with the d2gs is that there is no -nix port, so it can only be run on win32 machines. That is not good because you need a second server machine with some windows installed.
BUT...
There is this windows emulator called wine... (Wine is no emulator). With this program installed on your dedicated linux server machine you are able to run the d2gs on linux! It's not a perfect solution but you can save one shitty windows machine.
REQUIREMENTS:
All you need is 1 linux machine with tcp connection. (I prefer DEBIAN!) It can be your gateway machine too, but notice that the d2gs needs alot of RAM and CPU to run! I recommend to run d2gs with wine never on a machine with less than 64MB of RAM and 300Mhz CPU. I think it doesn't run on a machine with less than 64MB of RAM. 500Mhz CPU and 128MB RAM should be enough to serve some games. I'm running PvPGN + d2gs with wine on a machine with 500mhz and 64mb of ram and never had problems...
You need a working x-server installed + running on the server!!! D2gs will not run with wine without any X installed! You can try vnc or other programs to export the display to a windows machine but I don't have experience with that so don't even bother...
A copy of Diablo II LoD + latest patch is also required...
INSTALLING WINE ON A LINUX MACHINE:
First you should install wine on your linux machine:
On DEBIAN machines:
# apt-get install wine
On all other linux distributions:
Download the latest wine from http://winehq.com. It should be the wine-yearmonthday.tar.gz file you download. If you are familiar with rpm you can try the .rpm file.
Unpack and install it with the commands:
tar xfvz Wine-20021007.tar.gz
cd wine-20021007
./configure
make
make install
There shouldn't be any problems with compiling wine...If you get errors post them in my forum...
CONFIGURING WINE:
Every user has his own config file for wine. It should be located in /yourhomedir/.wine/ .
If this directory or file doesn't exist don't worry. Create the directory and copy the config file from ./wine-20021007/documentation/samples into it.
Now create the directory c in your systems root
# mkdir /c
Create a directory called "windows" and in "windows" a directory called "system". This will be your "fake windows".
# mkdir /c/windows
# mkdir /c/windows/system
Now run $ wine -v. If your wine works it should display your wine-version. If it doesn't you did something wrong...
Download this file and copy it to /yourhomedir/.wine/ . (If you have a working wine registry [system.reg] don't overwrite it with mine! Just append it...) This is your "faked" windows registry. The registry entries needed to run the d2gs where entered by me into this file.
INSTALLING THE D2GS
Now you must have a "clean" Diablo II LoD 1.09d available.
Install it on a windows machine (you can try to install it with wine ) and copy all .mpq + all .dll files from the Diablo II directory to a directory on your linuxserver.
Now download d2gs-109d-beta6.zip (be careful! beta7 never worked with wine on my server!)
Unzip it to the directory where you copied the Diablo II files (the file d2gs.exe from the archive has to be in the Diablo II directory!)
Open the file /yourhomedir/.wine/system.reg in your favorite editor. Change the entries "D2CSIP" and "D2DBSIP" so that it fits for your setup. (Enter the IP where your PVPGN with D2CS and D2DBS are running on! Enter an IP, even it runs on localhost!)
Thats all!
RUNNING D2GS WITH WINE
Start d2cs and d2dbs on the pvpgn server machine before you start d2gs.exe with wine and make sure your d2cs and d2dbs are configured right!)
Now run d2gs.exe with wine
$ wine d2gs.exe &
and hope that no "wine debugger" or any other shit is appearing. Be sure you have write access on the d2gs directory and your X-server is running!
Wait a little while. After 1 minute it should be connected to D2CS and D2DBS. Then type "ps -A" and look if wine is running with more than 1 process (on my server it needs 10! processes).
Now try to connect to the "d2gs administration" console with telnet on port 8888
$ telnet localhost 8888
Something like the following should come back. If this works you are a really lucky guy.
Diablo II Close Game Server Administration Console
Win32 Version 1.09 beta6, build on Jan 7 2002 10:30:42
congrats, your d2gs server is working!
If no echo comes back your d2gs is not working. Check the log files in your d2gs directory (d2gs.log, d2ge.log, d2gssvc.log, D2blahblah.txt) and post your problem into my forum.
Login passwd for the "admin console" is abcd123.
Change it with the console command passwd
Log into the console and type status
The 2 important things are Connection to D2CS: and Connection to D2DBS: If they are connected you are ready!
Type help to view more options that are available...
Try to connect to your pvpgn server with Diablo II LoD 1.09d.
If they aren't connected check you configuration (d2cs.conf, d2dbs.conf, the wine registry).
More coming soon!
Much fun!
2017. Thanks you!
ReplyDelete