Re: WIP on 9dragons US Server Files
Step by step guide on how to make the server working.
IMPORTANT:
This tutorial is intended to align the community with my progresses
there are some open items or if you prefer things that are not working
in this release
From my tests what is not working right now is:
- You cannot login any GM character (This can be caused from several factors maybe an alternate client is needed)
- You cannot drop any item to the floor from your char, I suspect this can be solved starting the maps in a certain order but I'm not really sure about that.
All the rest seems to work right now.
Disclaimer: Since I'm a really busy person
and I'm the person who's writing this tutorial I will post only the procedure using windows server 2003 SP2 32 bit
I'm not going to provide any link for licensed software or any cracked item
You will be responsible to find everything you need on your own, I will share only free items for your convenience
I've decided to use Windows 2003 Server SP2 since I think this windows version is the more robust and reliable I've found until now.
I've tested also on 64 bits systems and IS NOT WORKING maps crashes randomly!
If you want to follow my tutorial you must use the paths as I've specified or the autobuild script will not work.
In any case you are free to change everything on your own
Everything is free here and I'm not gealous of things I'm releasing!
What do you need:
VMWARE Workstation
Windows 2003 32 bit (you can use the one with SP2 integrated)
If you are using a clean Windows 2003 you will need also the SP2, you can download it from microsoft for free (The SP not the OS) (I've added the SP also to my share)
Python 2.7 32 bit (in my share)
PyODBC for this version of python (in my share)
Apache http sever 2.0 (in my share)
Microsoft Visual C++ 2010 runtime libraries (in my share)
My share link
You must be registered to see links
Step 1:
Install Windows Server 2003 SP2 on a virtual machine, I'm using VMWARE since I've an ESX server at home but
you can chose whatever you want, I've tested it also on VMWARE Workstation without any problem.
I've tried on Oracle Virtual Box and IT DOES NOT WORK, at least for me....
I suggest you to create the VM with a BRIDGED network adapter, this will make things easier
Each Map works as a separate process, this means you will need a good machine to execute the software.
I'm using 4 cores and 16Gb of memory and the server runs correctly with all the maps.
I've not done any regression test to identify the minimum requirements, but I've successfully executed a lot of maps in a 2cores 8Gb of memory machine.
You will need around 60Gb to install everything but I suggest you to create a 100Gb disk if you have enough space.
IMPORTANT NOTE: Is mandatory to define an administrator password otherwise you will
have severe issues installing and using the Database
IMPORTANT NOTE2: You are obliged to use a static ip assignement, no DHCP, tested and is not working
take note of the IP address you assigned to the server, you will need it.
Step 2:
Prepare the environment
REBOOT THE MACHINE EVERY TIME IS REQUESTED! Don't skip reboots or things can give you problems
remember is windows
Before all i suggest you to install a good text editor (like scite or Notepad++) on the virtual machine
0) If you are installing on a VM install the guest additions (like vmware tools or whatever)
1) Install SP2
2) Install Microsoft Visual C++ 2010 runtime libraries
3) Install Python 2.7.5 32 bit (install for all users with default options on c:\python27)
4) Install PyODBC (All default options, it should find automatically where to install)
5) Install Apache 2.0
In Network Domain and in Server Name put your vM Ip address
Put an Email (is not necessarely a valid email) on Admin Email address
Install for all users!
Select Custom and Change the install directory to c:\httpd
Verify you can reach the web server from a web browser
Now we need to configure apache to execute python cgi
a) Remove c:\httpd\Apache2\cgi-bin\printenv.pl
b) Remove everything in c:\httpd\Apache2\htdocs (NOT THE DIRECTORY ITSELF! ONLY THE CONTENT)
c) Edit C:\httpd\Apache2\conf\httpd.conf
Search for uncommented line: Options Indexes FollowSymLinks (if you install from the binary I posted should be row 267)
Change it to: Options Indexes FollowSymLinks ExecCGI
Search for: #AddHandler cgi-script .cgi (if you install from the binary I posted should be row 778)
Remove the # to uncomment the line and add .py to the end of the line (will become: AddHandler cgi-script .cgi .py)
Save the file
Restart apache
Start -> All Programs -> Apache HTTP Server 2.0 -> Control Apache Server -> Restart
copy the testenv.py script to c:\httpd\Apache2\cgi-bin\
Open your web browser to http://<yourvmip>/cgi-bin/testenv.py
you should see a simple web page that will demonstrate python is working and correctly configured
After that you can remove the file c:\httpd\Apache2\cgi-bin\testenv.py
6) Create an administrative account on your VM to run the MSSQL services, this will be the database owner account
I'm lazy to explain how to create it from graphical intefaces so I will guide you trough the old fashion command line style
Decide a password, I will reference it as yourpassword on the following lines
open a command prompt on your vm and give the following commands:
net user mssqladmin yourpassword /add
net localgroup Administrators mssqladmin /add
You should set password never expires flag for this user, to do that you can:
press start, right click on my computer click manage
click on Local users and groups
on the right pane dobule click on users
double click mssqladmin
tick password never expires
click ok
7) Install SQL Server 2008 R2 on your machine
For this phase your VM should be able to connect to the internet otherwise you will have to install your prerequisites manually (.net 3.51 and others)
This phase can require up two reboots of your virtual machine
After the setup support file is completed you will be promped for the installation type
Select SQL Server Feature Installation
Install Everything EXCEPT the Reporting Services
On the Server Configuration leave the default instance! This is mandatory or 9d will not work as well as the autoconf script.
Now the service accounts page should open, click on "Use the same account for all SQL Server services"
Insert the credentials of your mssqladmin user
click next
On the next page select Mixed Mode (SQL Server authentication and Windows Authentication)
specify a password for your sa user (you will need this password really soon
)
Click on Add current user
Click on Add -> on the box that will open write mssqladmin and click check names; click ok
Click NEXT
again, click Add current user
Click on Add -> on the box that will open write mssqladmin and click check names; click ok
click next
click next
click next
click install
wait
8) Create a directory on c:\ called scripts
copy the content of the scripts directory in my share inside the directory c:\scripts
9) Extract the content of the file posted on the release topic (the 9dragons server rar) to c:\9dragons on your virtual machine
10) Copy the file ND_LOG_0_backup.bak from my share to c:\9dragons\DB
11) Launch the c:\script\autoconf.py script (I suggest you to do from a command prompt)
c:
cd \scripts
autoconf.py
The script will ask you for some details, provide them
1st the IP address of your db server
2nd the password you defined for the SA user on step 7
During this phase your system can become unresponsive if you try to perform other tasks!
12) Copy the file c:\scripts\lump.dat onto C:\9dragons
13) On to the directory svrctl there is a link called LOG_SERVER right click on it and do properties
change the ip at the end of the target with your vm ip address
Step 3:
Import the web content
Under My share there is a web directory
Copy the content of cgi-bin to c:\httpd\Apache2\cgi-bin
Copy the content of htdocs into c:\httpd\Apache2\htdocs
edit the file c:\httpd\Apache2\htdocs\ND1\PATCH.PSC
Change the IP address 192.168.0.211 to your VM ip address
Step 4:
Configure your client to access this 9dragons server
Extract the 9dragons client from the release in your machine (not the VM)
on your machine edit the file C:\windows\system32\drivers\etc\hosts
add the following entries (replacing 192.168.0.211 with your vm ip address)
192.168.0.211 onnetnprotect.http.internapcdn.net
192.168.0.211 nprotect.cdnetworks.net
192.168.0.211 nprotect.pb.in.th
192.168.0.211 nprotect.unbbz.com
192.168.0.211 9dragons.http.internapcdn.net
Launch the ndreg Editor contained inside the client
write your vm ip address into:
Status server
Login Server
into patch server write (replacing 192.168.0.211 with your vm ip address)
You must be registered to see links
Step 5:
Go back to your VM and launch the script CheckProcedures.py
This script must be executed everyday, I suggest you to schedule it to be executed every midnight and everytime you login...
Go into your VM and launch the Server using the links in your c:\scripts\svrctl folder
you need to execute the scripts in the following order:
1) LOG_SERVER
2) MS
3) NDLOGIN_US
4) DS_SERVER
once the DS Server is started completely (it will need something like 30 seconds normally) open the DS_SERVER window
press ESC
write
set server open
press enter
(This will open the server)
Now launch the maps
There is one shortcurt for each map inside svrctl
launch at least bamboo
Step 6:
Open the client using ndlauncher
if you did everything correctly it should start to patch
You can login with any user that already exist in this db (check the Ninedragons_Accounts to find one) with the default password
On the next days I will post more info on how to change other things... like exp rate and other stuffs
Inside the scripts directory you have a changepassword script that can help a lot
To exit any component press esc on the window and write quit... this will close the item
if you close the first map you open everything will crash
It's all for today... I'm tireeeed!