วันพุธที่ 13 มกราคม พ.ศ. 2559

วิธีเปิด SERVER WARZ

เรื่มการติดตั้งโปรแกรมที่จำเป็น

เว็บไซต์ The War Z / Infestation MMO
http://forum.ragezone.com/f790/release-ragezone-community-edition-re-1036148/

ไปดาวน์ตัวเซิร์ฟเวอร์มาก่อน
Download
https://mega.nz/#!899WzABL!_qZtAzvNHR0ZZaDvEC5M4YUXqKCIxx6qr2cx0Xb0lL0

โปรแกรมที่ต้องการ
1. Microsoft Visual Studio 2008 Professional Edition
2. Microsoft Visual Studio 2008 Professional Edition Service Pack 1
3. Microsoft SQL Server 2008 R2 RTM - Express with Management Tools ( 32 bit ) or ( 64 bit )
4. DirectX 9.0c End-User Runtime
5. DirectX Software Development Kit
6. Microsoft Web Platform Installer 5.0
7. WinRAR 5.10 ( 32 bit ) or ( 64 bit )

Server prerequisites Installation

การติดตั้งเซิร์ฟเวอร์ข้อกำหนดเบื้องต้น
Disable User Account Control (UAC)

1. Start -> Control Panel -> System and Security -> Action Center
2. คลิกที่ ( Change User Account Control settings )
เลือกระดับล่างสุดแล้ว OK
3. รีสตาร์ทเครื่องคอมพิวเตอร์


ปิดการใช้งาน Windows Firewall

1. Start -> Run
2. Netsh advfirewall set all state off แล้วคลิก OK
Disable Internet Explorer Enhanced Security
ปิดการใช้งาน Internet Explorer ผมขอไม่ทำ

( แต่คิดว่าต้องทำตอนเปิดในเครื่องเซิฟเวอร์ )

Internet Information Service IIS 7

หรือที่เรียกว่า จำลองเซิฟเวอร์

1. Start -> Control Panel -> Programs
2. คลิกที่ Turm Windows features on or off
3. ติ๊กถูกที่ช่อง + Internet Information Services
4. คลิกปุ่ม บวก
Web Managerment Tools
แล้วติ๊กถูก
• IIS Management Console
( อาจไม่ต้องติ๊กเพราะว่าติ๊กที่ Internet Information Services
มันจะติ๊กให้เอง )

5 . คลิกปุ่ม บวก
World Wide Web Service
Application Development Features
แล้วติ๊กทั้งหมดในช่องนี้ ตัวอย่าง
แล้วติ๊กถูก
• Application Development Features
• .NET Extensibility
• ASP
• CGI
• ISAPI Extensions
• ISAPI Filters
• Server-Side Includes

6. ติ๊กบวก + Common HTTP Features
แล้วติ๊กถูก
• Default Document
• Directory Browsing
• HTTP Errors
• Static Content
( อาจไม่ต้องติ๊กเพราะว่าติ๊กที่ Internet Information Services
มันจะติ๊กให้เอง )

7. ติ๊กบวก + Healg and Diagnostics
แล้วติ๊กถูก
• Custom Logging
• HTTP Logging
• Logging Tools
• Request Monitor
8. ติ๊กบวก + Perfoemance Features
• Dynamic Content Compression
• Static Content Compression
9. ติ้กบวก + Security
• Request Filtering
• IP and Domain Restrictions
หากไม่มี IP and Domain Restrictions ก็ไม่เป็นไร ( Windows Server )
10 . คลิก ok
11 . รีสตาร์ทเครื่องคอมพิวเตอร์



จากนั้นก็สามารถ ใช้ 127.0.0.1 หรือ localhost

Web Platform Installer

wpilauncher.exe
ติดตั้ง PHP 5.3.28

1. เปิดโปรแกรม wpilauncher.exe รอการติดตั้ง...
2. ใส่ PHP 5.3.28 ที่ช่องค้นหาแล้ว คลิก Add
3. คลิกติดตั้งเลย " Install "แล้วจะเห็นว่ามีการติดตั้งเพิ่มมา 2 รายการพิเศษที่จะติดตั้ง
Microsoft Drivers 3.0 for PHP v5.3 for SQL Server in IIS Express
และ
PHP 5.3.28 For IIS Express

4. ฉันยอมรับ " I Accept " รอการดาวน์โหลด
6. รอโหลดจนเสร็จ สามารถออกจากการติดตั้งได้เลย
5. รีสตาร์ทเครื่องคอมพิวเตอร์

ติดตั้งโปรแกรม WinRAR ด้วยนะครับบ


DirectX 9.0c End-User Runtime

ติดตั้งโปรแกรม dxwebsetup

1. เปิดโปรแกรม dxwebsetup.exe ติดตั้งเลย
DirectX Software Development Kit

ติดตั้งโปรแกรม DXSDK_Jun10

1. เปิดโปรแกรม DXSDK_Jun10.exe ติดตั้งเลย

Microsoft SQL Server 2008 R2 RTM - Express with Management Tools

ติดตั้งโปรแกรม SQL Server 2008 R2 RTM
1. เปิดโปรแกรม SQLEXPRWT_x64_ENU
หรือ SQLEXPRWT_x86_ENU
( x64 ) = 64 bit
( x86 ) = 32 bit
2. แถบ Installation
3. คลิก New installation or add features to an existing installation.
4. • I accept the license tems. คลิก Next
5. คลิก Select All // Next
6. Named instance : WarZ
7. Next
8. ติ๊ก • Mixed Mode ( SQL Server authentication and Windows authentication )
9. ใส่รหัสผ่าน ( สำหรับ ผมใส่ 123456 )
10. คลิก Add Current User / คลิก / Next
11. Next
12. รอการติดตั้ง ... จนเสร็จก็ คลิก Close
13. รีสตาร์ทเครื่องคอมพิวเตอร์

14. เปิด Start -> All Programs -> Microsoft SQL Server 2008 R2 -> Configuration Tools -> SQL Server Configuration Manager
15. แถบ / SQL Server Network Configuration -> Protocols for WARZ
16. คลิก TCP/IP
17. คลิกที่ช่อง Enabled เปลี่ยนจาก No เป็น Yes
18. แถบบน คลิก IP Addresses
19. คลิกที่ช่อง TCP Dynamic Ports แล้วลบเลข 0 ในช่องให้เป็นช่องว่างเปล่า ( ทุกช่อง )
20. คลิกที่ช่อง TCP Port แล้วใส่ 1433 ( ทุกช่อง )
21. ดูแถบสีเงิน ที่ชื่อ IPAII 
ช่อง TCP Dynamic Ports ใส่ 1444,55363,34000,34001,34011,34010,81
ช่อง TCP Port ใส่ 1433
22. คลิก Apply แล้วคลิก ok 
23. เปิดหน้า SQL Server Configuration Manager กลับมา คลิกที่ SQL Server Services คลิก SQL Server (WARZ) คลิกขวาแล้วกด Restart
เสร็จการติดตั้ง sql !!

Preparing files and directories

เตรียมไฟล์
1. แตกไฟล์ WZ.part01.rar ไปที่โฟลเดอร์ C:\
part ทั้งหมดมี 3 part )

Before continuing go to folder C:\inetpub\wwwroot and create a folder named api

เตรียมโฟลเดอร์ เข้าไปที่ C:\inetpub\wwwroot สร้างโฟลเดอร์ ชื่อ api
1. เปิด Start ช่องค้นหาใส่ Administrative Tools
คลิกที่
Internet Information Services (IIS) Manager
2. คลิกขวาที่ Internet Information Services (IIS) Manager 
เลือก Pin to Start Menu ทำไว้เปิดใช้งานง่ายๆในหน้า Start 
และทำอีก ตัวที่ชื่อ Data Sources (ODBC)
3. ดูตรงช่อง Connections แล้วคลิกที่ชื่อคอมพิวเตอร์ ของคุณ
  3.1. ยกตัวอย่างของผมชื่อ DANG-PC (Dang-PC\Dang)
4. คลิกที่ชื่อ PC ของคุณ
5. คลิกที่ Sites คลิกขวาที่ Default Web Site แล้วกดลบ Remove
6. คลิกขวาเลือก Add Web Site... ช่อง Site name: ใส่ Site
7. คลิก Select... เลือก DefaultAppPool แล้ว ok
8. ช่อง Physical path: ใส่ C:\inetpub\wwwroot แล้วคลิก ok เพื่อปิดหน้านี้
9. กลับมาที่ช่อง Connections คลิกขวาที่ Site แล้วเลือก Add Virtual Directory...
10. ช่อง Alias: ใส่ wz
11. ช่อง Physical path: ใส่ C:\WZ\bin\build แล้วคลิก ok
12. คลิกขวาที่ api เลือก Convert to Application
13. คลิกที่ชื่อ PC ของคุณ เลือก Server Certificates
14. คลิกขวา เลือก Create Self-Signed Certificate..
15. ใส่ api ที่ช่องว่าง แล้วคลิก ok
16. กลับมาทีแถบ คลิกขวาที่ Site เลือก Edit Bindings..
17. คลิก Add... ช่อง Type: เปลี่ยนเป็น https
18. ช่อง SSL certificate: เลือก api 
19. คลิก ok แล้ว Close 
20. คลิกที่ Site เปิด MIME Types
21. คลิกขวา เลือก Add...
22. ช่อง File name extension: ใส่ .php
23. ช่อง MIME type: ใส่ application/x-php
24. คลิก ok
25. คลิกขวาที่ Site แล้วเลือก Restart

Creating user and database. Adding rights and importing tables.

การสร้างฐานข้อมูลของผู้ใช้และ การเพิ่มสิทธิและการนำเข้าตาราง
***Note*** the WarZ.sql file is located: WZ\src\SQL\WarZ.sql

1. เปิด Start -> All Programs -> Microsoft SQL Server 2008 R2 -> SQL Server Management Studio
2. Login ช่อง
Server name: (local) 
Authentication: SQL Server Authentication
Login: sa
Password: 123456 ( รหัสผ่านตอนติดตั้ง sql )
3. คลิก + Security -> Logins
4. คลิกขวาที่ Logins เลือก New Login...
5. Login name: wz_api_user
6. ติ๊ก SQL Server authentication ใส่รหัสผ่าน 123456
7. ติ๊กออก Enforce password policy
8. คลิก ok
9. คลิกขวาที่ Databases เลือก New Database...
10. Database name: WarZ
11. Owner: wz_api_user
12. คลิกที่แถบ Select page เลือก Options
13. ช่อง Recovery model: เปลี่ยนเป็น Full
14. คลิก ok
15. คลิกที่ Databases -> WarZ
16. คลิกขวาที่ WarZ เลือก New Query
17. เปิด WZ\src\SQL\WarZ.sql เปิดไฟล์ WarZ.sql ใน notepad
18. คัดลอก ทั้งหมดใน WarZ.sql แล้ววางใน sql ที่ New Query
ในข้อที่ 16

19. คลิกที่ Execute หรือ กด F5 รอจนรันเสร็จ

Note: You don’t have to save the query when asked on closing the SQL Server Management Studio.

คุณไม่ต้องบันทึกแบบสอบถามเมื่อถูกถามเกี่ยวกับการปิด

1. เปิด Data Sources (ODBC) ที่ Start ที่ได้ทำการ Pin to Start Menu ไว้
2. หรือ เปิด Start -> Run / Type odbcad32.exe คลิก ok
3. แถบ System DSN คลิก Add...
4. เลือก SQL Server Native Client 10.0 คลิก Finish
5. Name: WarZ
6. Server: (local)
7. ติ๊ก • With SQL Server authntion using a login ID and password entered by the user.
8. Login ID: wz_api_user
9. Password: 123456
10. Next -> Next -> Finish -> Test Data Source -> ok
11. ปิดหน้านี้ได้เลย

ติดตั้งโปรแกรม Microsoft Visual Studio 2008 Professional Edition

1. แตกไฟล์ VS2008ProEdition90dayTrialENUX1435622.iso
2. เปิดโฟลเดอร์ แล้วเปิด ตัวติดตั้งชื่อ autorun.exe
3. คลิกที่ Install Visual Studio 2008 รอจนรันเสร็จ แล้ว Next
4. ติ๊ก I have read accept the license terms. แล้วคลิก Next
5. Install รอการติดตั้ง แล้วคลิก FInish

ติดั้ง Microsoft Visual Studio 2008 SP1

1. แตกไฟล์ VS2008SP1ENUX1512962.iso
2. เปิดโฟลเดอร์ แล้วเปิด ตัวติดตั้งชื่อ SPInstaller.exe
3. คลิก Next
4. คลิด I have read and accept the license tems.
5. คลิก Finish

เริ่มการติดตั้งเซิร์ฟเวอร์

1. คัดลอกโฟลเดอร์ HShield ที่อยู่ใน WZ\src\External\
2. วางไฟล์ที่ WZ\bin
3. เข้าไปยัง WZ\bin\HShield เพื่อ ลบไฟล์ต่อไปนี้
 3.1. Doc
 3.2. Include
 3.3. Lib
 3.4. Sample
4. เข้าไปยัง WZ\bin\HShield\Developer เพื่อ ลบไฟล์ต่อไปนี้
 4.1. Lib
5. ไปยัง WZ\bin\build
6. ดาวน์โหลดไฟล์ RSBuild.xml มาทับกับตัวเดิม
Download
http://www.mediafire.com/download/dcwxrxhrh3t4xjw/RSBuild.xml

7. เข้าไปยัง WZ\src\RSBuild\Sources
8. เปิด r3dFSBuilder.cpp โดย notepad
9. ดาวน์โหลด r3dFSBuilder.cpp ตัวใหม่มาทับกับตัวเก่า
Dowload
http://www.mediafire.com/download/7unclfbcbnucww9/r3dFSBuilder.cpp

Changing IP addresses.

ทำการเปลี่ยน IP
(สำหรับเล่นแบบออนไลน์ )
ตัวอย่าง ฮามาชิ หรือ เครื่องเซิร์ฟเวอร์

1. WZ\src\EclipseStudio\Sources\Main.cpp
Ctrl+F ค้นหา 127.0.0.1 เปลี่ยนเป็น IP ฮามาชิ หรือ เครื่องเซิร์ฟเวอร์

2. WZ\src\RSUpdate\Launcher.cfg
Ctrl+F ค้นหา 127.0.0.1 เปลี่ยนเป็น IP ฮามาชิ หรือ เครื่องเซิร์ฟเวอร์

3. WZ\src\RSUpdate\LauncherConfig.cpp
Ctrl+F ค้นหา 127.0.0.1 เปลี่ยนเป็น IP ฮามาชิ หรือ เครื่องเซิร์ฟเวอร์

4. WZ\src\server\SupervisorServer.cfg
Ctrl+F ค้นหา 127.0.0.1 เปลี่ยนเป็น IP ฮามาชิ หรือ เครื่องเซิร์ฟเวอร์

5. WZ\src\server\WO_GameServer\Sources\ServerMain.cpp
Ctrl+F ค้นหา 127.0.0.1 เปลี่ยนเป็น IP ฮามาชิ หรือ เครื่องเซิร์ฟเวอร์

6. WZ\bin\SupervisorServer.cfg
Ctrl+F ค้นหา 127.0.0.1 เปลี่ยนเป็น IP ฮามาชิ หรือ เครื่องเซิร์ฟเวอร์

7. WZ\bin\game.ini
Ctrl+F ค้นหา 127.0.0.1 เปลี่ยนเป็น IP ฮามาชิ หรือ เครื่องเซิร์ฟเวอร์

8. WZ\bin\build\RSBuild.xml
Ctrl+F ค้นหา 127.0.0.1 เปลี่ยนเป็น IP ฮามาชิ หรือ เครื่องเซิร์ฟเวอร์

เริ่มการรันโปรแกรมกันเลยย !

เปิดโปรแกรม Visusal Studio 2008 ให้เลือด General Devlopment Settings แล้วคลิก Start Visual Studo
เปิดโปรแกรมเสร็จแล้วแนะนำให้รอชะแปบ เพื่อให้โปรแกรมรันข้อมูลเสร็จก่อนเพราะว่า ข้อมูลเกมเยอะ
ตัวอย่างการรันเสร็จ
======== Rebuild All: 0 succeeded, 0 failed, 0 skipped ========

1. เปิด WZ\src\RSBuild\RSBuild.sln
Select "Release"
แถบบนจะเห็นคำว่า Debug ให้เป็น Release
จากนั้นคลิกที่แถบเมนู Build -> Build Solution
จากนั้นโปรแกรมก็รันข้อมูล กรุณารอสักครู่ จนกว่าจะขึ้น
======== Rebuild All: 2 succeeded, 0 failed, 0 skipped ========
หากขึ้นก็สามารถปิดโปรแกรมได้เลย

###########################################################

2. เปิด WZ\src\RSUpdate\RSUpdate.sln
Select "Release"
แถบบนจะเห็นคำว่า Debug ให้เป็น Release
จากนั้นคลิกที่แถบเมนู Build -> Build Solution
จากนั้นโปรแกรมก็รันข้อมูล กรุณารอสักครู่ จนกว่าจะขึ้น
======== Rebuild All: 2 succeeded, 0 failed, 0 skipped ========
หากขึ้นก็สามารถปิดโปรแกรมได้เลย

###########################################################
ก่อนที่จะรันให้ทำข้อนี้ก่อน
1. คลิกที่แถบเมนู Tools
2. เลือก Options
3. คลิก Projects and Solutions แล้ว เลือก VC++Directories
4. Show directories for : Include files
5. คลิกที่ตาราง ล่างแล้วใส่
Code: 
C:\WZ\src\EclipseStudio\Sources\VoIP
C:\WZ\src\GameEngine\gameobjects
C:\WZ\src\External\Scaleform\Src\Kernel
C:\WZ\src\EclipseStudio\Sources\multiplayer
C:\WZ\src\External\Fury\Fury
C:\WZ\src\EclipseStudio\Sources\ObjectsCode\WEAPONS
C:\WZ\src\EclipseStudio\Sources\UI
C:\WZ\src\EclipseStudio\Sources\ObjectsCode\AI
C:\WZ\src\EclipseStudio\Sources\Editors
C:\WZ\src\External\HShield\Include
C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Include
6. Show directories for : Library files
Code: 
C:\WZ\src\External\RakNet\Lib
C:\WZ\src\External\FuncGuard\FuncGuard
C:\WZ\src\External\HShield\Lib
C:\WZ\src\EclipseStudio\Sources\VoIP
C:\WZ\src\External\HShield\Lib\Win\x86\Multithreaded\AntiCrack
C:\WZ\src\External\HShield\Sample\Src\NetworkLib
C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x86
คลิก ok เริ่มรันได้เลย

3. เปิด WZ\src\server\WarZ_Server.sln
Select " Debug "
จากนั้นคลิกที่แถบเมนู Build -> Build Solution
จากนั้นโปรแกรมก็รันข้อมูล กรุณารอสักครู่ จนกว่าจะขึ้น
======== Rebuild All: 2 succeeded, 0 failed, 0 skipped ========
หากขึ้นก็สามารถปิดโปรแกรมได้เลย

###########################################################

4. WZ\src\eclipsestudio\WarZ.sln ( รัน 2 ตัว Final / Release )
Select " Final"
แถบบนจะเห็นคำว่า Debug ให้เป็น Final
จากนั้นคลิกที่แถบเมนู Build -> Build Solution
จากนั้นโปรแกรมก็รันข้อมูล กรุณารอสักครู่ จนกว่าจะขึ้น
======== Rebuild All: 2 succeeded, 0 failed, 0 skipped ========
อย่าเพิ่งปิดโปรแกรม !!

_________________________________________________________

4.1
Select " Release "
แถบบนจะเห็นคำว่า Final ให้เป็น Release 
จากนั้นคลิกที่แถบเมนู Build -> Build Solution
จากนั้นโปรแกรมก็รันข้อมูล กรุณารอสักครู่ จนกว่าจะขึ้น
======== Rebuild All: 3 succeeded, 0 failed, 0 skipped ========
หากขึ้นก็สามารถปิดโปรแกรมได้เลย

###########################################################

5. เปิด WZ\src\Scripts\WZBackend-ASP.NET\WZBackend-ASP.NET.sln
Select "Debug"
จากนั้นคลิกที่แถบเมนู Build -> Build Solution
จากนั้นโปรแกรมก็รันข้อมูล กรุณารอสักครู่ จนกว่าจะขึ้น
======== Rebuild All: 1 succeeded, 0 failed, 0 skipped ========
อย่าเพิ่งขึ้นปิดโปรแกรม

###########################################################

Build -> Publish Web Site
Target Location: C:\inetpub\wwwroot\api
คลิก Open คลิก ok 
จากนั้นโปรแกรมก็รันข้อมูล กรุณารอสักครู่ จนกว่าจะขึ้น
======== Rebuild All: 1 succeeded, 0 failed, 0 skipped ========
หากขึ้นก็สามารถปิดโปรแกรมได้เลย

###########################################################

Creating bin files

สร้างข้อมูลเกมที่จะได้รับจากการดาวน์โหลด
1. เปิด WZ\bin\RSBuild.exe รอโปรแกรมรันข้อมมูล ห้ามปิดรอจนหน้านี้จะปิดเอง เวลาเสร็จ 15 - 30 นาที
2. เปิด WZ\bin\build\updater\CreateUpdater.bat
จากนั้นมันจะสร้างตัวเข้าเกม WarZlauncher.exe_1.0.0.exe ขึ้นมา
3. คัดลอก WarZlauncher.exe_1.0.0.exe ไปไว้ที่ WZ\bin
4. คัดลอก WZ\bin\build\data\wz.xml ไปไว้ที่ WZ\bin\build
5. คัดลอก WZ\bin\build\updater\api_getserverinfo.xml ไปไว้ที่ C:\inetpub\wwwroot

Running server

รันเซิร์ฟเวอร์ !!!
1. เปิด WZ\bin\MasterServer.exe
2. เปิด WZ\bin\SupervisorServer.exe
ติดตั้งเซิร์ฟเวอร์เสร็จแล้วว !
คักลอก WarZlauncher.exe_1.0.0.exe ไปเข้าเกมได้เลย !!

ขอแสดงความยินดีทีทำจนสำเร็จ

ไม่มีความคิดเห็น:

แสดงความคิดเห็น