とりあえず

英語の鯖の立て方指南です

興味があって 暇な方はどうぞ

英語へタレな私もなんとかできます。

シングル専用(要は自分だけ)はすぐ出来ます。

[GUIDE] Perfect World Server on Windows with coLinux

As most of you know the server files are compiled to run on UNIX/Linux based systems. This guide will show you how to install and setup coLinux so that you can run your Perfect World server on Windows.

Requirements:
PC with Intel based CPU - glinkd and gamedbd don’t work on AMD CPUs. I have a fix for this you can find here
coLinux-stable - Link
Perfect World Server - Link

Optional:
Perfect World on single PC Guide
Fedora Core 5

Extras:
coLinux - FAQ
WinPcap - Download Link - Documentation

I will be using Fedora 5 to run with our coLinux once we get it setup. Again this is optional and you may choose another distro. This is not something you need to go out to download manually, you will decide in the coLinux setup. Try to choose one you are familiar with because the Linux distribution you choose only contain the core files. And you will have to install a few libraries to get the server up and running. Redhat based distros like Fedora use yum and/or rpm, Debian based use apt-get, Gentoo uses emerge, etc. Anyway, lets get started!

Step 1: Download and run the installer for coLinux

Download coLinux-stable, select the coLinux-*.exe one
Run the coLinux installer: click Next, I Agree, and Next again
The destination folder doesn’t default to “c:\coLinux” but I recommend it. Click Next
You will be prompted to install WinPcap. Click the install link.
Download and install WinPcap, leave the installer open
After WinPcap is installed click Next from the installer
Choose your distribution, I chose Fedora Core 5, click Install
If you get prompted to install TAP-Win32, click Continue Anyway
Note: the download may take awhile depending on your choice.

Step 2: Decompress the Linux distro

Go to your coLinux directory (c:\coLinux)
You should see a file like: Fedora5-2gb.ext3.7z, which may be different depending on the distro you chose
Right-click on it and go to “Extract Here” or 7-Zip->Extract Here
You may delete the Fedora5-2gb.ext3.7z if you wish, just make sure you have Fedora5-2gb.ext3
Step 3: Create a swapfile

Pick one of the swapfiles from Index of /colinux/swap and save it to your c:\coLinux
Note: it’s a good idea to pick one about the same size as your memory.
Decompress this archive same as step 2; right click your swapfile and “Extract Here”
Step 4: Configuring coLinux Open example.conf in your coLinux directory with notepad and change the following:
Note: Your codb0 and codb1 entries may be different depending on the Linux and swapfile you chose

# The default kernel
kernel=vmlinux

# File contains the root file system.
# Download and extract preconfigured file from SF “Images for 2.6″.
cobd0=”c:\coLinux\Fedora5-2gb.ext3″

# Swap device, should be an empty file with 128..512MB.
cobd1=”c:\coLinux\swap_512Mb”

# Tell kernel the name of root device (mostly /dev/cobd0,
# /dev/cobd/0 on Gentoo)
# This parameter will be forward to Linux kernel.
root=/dev/cobd0

# Additional kernel parameters (ro = rootfs mount read only)
ro

# Initrd installs modules into the root file system.
# Need only on first boot.
initrd=initrd.gz

# Maximal memory for linux guest
mem=64

# Slirp for internet connection (outgoing)
# Inside running coLinux configure eth0 with this static settings:
# ipaddress 10.0.2.15 broadcast 10.0.2.255 netmask 255.255.255.0
# gateway 10.0.2.2 nameserver 10.0.2.3
eth0=slirp

# Tuntap as private network between guest and host on second linux device
eth1=tuntap

Step 5: Create a batch file to start coLinux

* Make a colinux.bat file with the following:

colinux-daemon.exe -t nt @example.conf fastboot nogui eth0=slirp,,tcp:29000:29000

Important: The important part of that line is the eth0 part. What it is doing is enabling port-forwarding. Without it remote connections will _not_ beable to connect to your Perfect World server from coLinux. The port 29000 is the default setting for the Perfect World server. If you have changed this in your gamesys.conf files make sure you change it here too. If you have a router or firewall you may also need to allow this port. Adding the options to the eth0 setting to your example.conf does _not_ work. You must specify it here at the command-line in our batch file. The format is [windows port]:[colinux port], in this case 29000 for both.

Step 6: Run coLinux

* Double-click on our batch file, colinux.bat
* If the window just flashed on your screen you’ll need to open a command-prompt and run it there. Click Start->Run->cmd, click Ok. Type cd c:\coLinux, press Enter. Type colinux and press Enter.
* If some things fail to load, usually you can just ignore it.
* Login with root, password is blank so don’t type anything

Final Steps
Now there were a few packages I needed to fetch in order to get the server files to run. Such as the following:

libtask - libtask.so (compiled) or libtask.so (source)
compat-libstdc++-33-3.2.3-61 - ftp://rpmfind.net/linux/fedora/core/….3-61.i386.rpm
libpcre - ftp://rpmfind.net/linux/fedora/relea…7.0-2.i386.rpm

I used wget to download both the packages as ‘yum’ couldn’t find them. So just use ‘wget ‘ with the urls I posted above.

libtask - libtask you don’t need to compile, you can just extract it with tar -zxf libtask.tar.gz and then cp libtask.so /usr/lib, and finally run ldconfig. If you have errors or problems with libtask after doing this then just make sure to rm /usr/lib/libtask.so and then compile the sources and install.

libstdc++ - after you download the rpm just run rpm -ivh compat-libstdc++-33-3.2.3-61.i386.rpm

libpcre - I did not have to install libpcre, however if you do and using Fedora you can wget ftp://rpmfind.net/linux/fedora/relea…7.0-2.i386.rpm and then run rpm-ivh pcre-7.0-2.i386.rpm

Also the downside is you cannot use Mark/Paste in your coLinux DOS window, it will simply screw up your terminal. So dreadfully you will need to type these long URLs or use TinyURL.com - shorten that long URL into a Tiny URL.

Whew, that’s it. Now you just need to copy your Perfect World server files over and start setting that up. If you need help setting it up for a single PC I have a guide you can find here.

I already know your first question, how do I get my server files over to my coLinux? Well, you can’t mount your Windows drive/partition from coLinux because Windows locks the resource. There is a experimental tool called CofsDevice that can allow this but it is very buggy and can corrupt data on your Windows drive! You can also setup Samba, but this is outside the scope of this tutorial. If you wish to learn more about setting up Samba you can find documentation here.

I personally just ran a FTP server from Windows and then ftp’d to it from coLinux and downloaded the server files. It really doesn’t take long it should transfer at 10mb/sec or more.

I spent quite a bit of time making this one so hope it gets you going, good luck!

[GUIDE] Perfect World Server on Single PC

Setting up and installing Perfect World server for a single PC
Written by shazbomb – 12/06/2007 for http://www.mmorpgdev.com

In the distributed server files contains hundreds of files. The bright side is there really isn’t as much as it seems. For setting up the server software on a single PC the only file you need from the whole distribution is cpackage.feilvbin.tar.gz.

Step 1. Create a clean temporary directory to store only the necessary files.
1. Make the directory:
mkdir ~/tmp.pwserver

Step 2. Copy cpackage.feilvbin.tar.gz to the new directory
By default the file is located in cnet.feilvbin/configfeilvbin and
cnet.feilvbin/configfeilvbin/configfeilvbin

You can also locate it by the find command:
[root@game1 pw]# find . name
cpackage*.tar.gz
./cnet.feilvbin/configfeilvbin/cpackage.feilvbin.tar.gz
./cnet.feilvbin/configfeilvbin/configfeilvbin/cpackage.feilvbin.tar.gz

Note: if you cannot find the file then you need to extract cnet.feilvbin.tar.gz and repeat step 2

Copy one of them to the directory we made:
[root@game1 pw]# cp ./cnet.feilvbin/configfeilvbin/cpackage.feilvbin.tar.gz ~/tmp.pwserver

Step 3. Change directory and extract cpackage
1. Change directory
[root@game1 pw]# cd ~/tmp.pwserver

2. Extract cpackage
[root@game1 tmp.pwserver]# tar zxf cpackage.feilvbin.tar.gz

3. Change to extracted source directory
[root@game1 tmp.pwserver]# cd cpackage.feilvbin

Step 4. Copy necessary files
The documentation that comes with the distribution has you run the package script on fielvbin.xml.
You can do this if you modify the package script. It involves heavy modification and is timeconsuming.
This tutorial skips the package script completely as it’s really not needed for a single PC
setup.

1. Change directory
[root@game1 cpackage.feilvbin]# cd srcfiles

2. Make new directory
[root@game1 srcfiles]# mkdir ~/pwserver

3. Copy necessary files
[root@game1 srcfiles]# cp R
gacd/ gamed/ gamedbd/ gdeliveryd/ gfactiond/ glinkd/
uniquenamed/ ~/pwserver/

4. Change directory
[root@game1 srcfiles]# cd ~/pwserver
Note: if you’re planning to run multiple game servers you can copy the gamed/ directory to those
servers and setup the *.conf configuration files for them. However his goes beyond the scope of this
tutorial.

Step 5. Configuring
Almost every directory within ~/pwserver has a file called gamesys.conf. These files need to b modified specifically to your PC and setup. I post mine as an example so it may not be exactly the same for you.


Setting up gacd
The gamesys.conf in this directory doesn’t shouldn’t require any modification. It’s a good idea to look at
the file so you are familiar with it and modify if at all necessary. Although you shouldn’t need to.

Setting up gamed
This directory has a few configuration files and require minimal modification.
1. Configuring gs.conf
Line 23: Root = /home/zhangyu/game/config/
Change this to your gamed/config directory. Use full paths!
Like this: Root = /home/myUsername/pwserver/gamed/config
NOT like this: Root = ~/pwserver/gamed/config

2. Configuring gmserver.conf
Line 13, 27, 40, 53, 66, 79, 92, 105, 118, 131, 143, 154, 164:
Change the “address” value to your internal IP address. Example: 127.0.0.1

3. Configuring gsalias.conf
Line 10:
Change the “Root”value to your gamed/config directory just like gs.conf
Like this: Root = /home/myUsername/pwserver/gamed/config
NOT like this: Root = ~/pwserver/gamed/config

4. Configuring ptemplate.conf
This file requires no modification. It’s a good idea to look at the file so you are familiar with it.

Note: Your path varies on which user you are installing and running the services under. For example if
you’re using root (which I don’t recommend) the paths would start with /root/pwserver/ instead
of /home/myUsername. Also remember to change “myUsername” with your username.

You’ll notice when viewing gsalias.conf there are a bunch of values like game1, game2, game3, game4.
These are the aliases to each game server. Later on in this tutorial we will setup /etc/hosts for this. You
can also comment out any additional game server you do not want. For example in my particular setup I
only use game1.

Setting up gamedbd
1. Configuring cashstat.conf
Line 4:
Change the “address” value to your internal IP address. Example: 127.0.0.1

2. Configuring gamesys.conf
Line 6:
Change the “address” value to the IP address of your MSSQL server.

Line 18, 28:
Change the “address” value to your internal IP address. Example: 127.0.0.1

Line 36:
Change the “homedir” value to /home/myUsername/pwserver/gamedbd/dbhome

Line 37:
Change the “datadir” value to /home/myUsername/pwserver/gamedbd/dbdata

Line 38:
Change the “logdir” value to /home/myUsername/pwserver/gamedbd/dblogs

Line 39:
Change the “backupdir” value to /home/myUsername/pwserver/gamedbd/backup

Line 48:
Change the “homedir” value to /home/myUsername/pwserver/gamedbd/dbhomewdb

Line 49:
Change the “datadir” value to /home/myUsername/pwserver/gamedbd/dbdata

Line 50:
Change the “logdir” value to /home/myUsername/pwserver/gamedbd/dblogs

Line 51:
Change the “backupdir” value to /home/myUsername/pwserver/gamedbd/backup

Note: Your path varies on which user you are installing and running the services under. For example if
you’re using root (which I don’t recommend) the paths would start with /root/pwserver/ instead
of /home/myUsername. Also remember to change “myUsername” with your username.
Setting up gdeliveryd

1. Configuring gamesys.conf
Line 4, 14, 101, 113, 125:
Change the “address” value to your internal IP address. Example: 127.0.0.1

Setting up gfactiond
1. Configuring gamesys.conf
Line 4, 14, 78:
Change the “address” value to your internal IP address. Example: 127.0.0.1

Setting up glinkd
1. Configuring gamesys.conf
Line 4, 25, 46, 67, 88, 143, 154, 164:
Change the “address” value to your internal IP address. Example: 127.0.0.1

Note: you do not necessarily need all the GLinkServer and GProviderServer entries here. You can
comment out the unwanted sections by using ‘;’ In my particular setup I only have 1 GlinkServer and
GProviderServer.

Setting up uniquenamed
1. Configuring gamesys.conf
Line 20, 30:
Change the “address” value to your internal IP address. Example: 127.0.0.1

Line 38:
Change the “homedir” value to /home/myUsername/pwserver/uniquenamed

Line 39:
Change the “datadir” value to /home/myUsername/pwserver/uniquenamed/dbdata

Line 40:
Change the “logdir” value to /home/myUsername/pwserver/uniquenamed/dblogs

Line 41:
Change the “backupdir” value to /home/myUsername/pwserver/backup

Line 49:
Change the “homedir” value to /home/myUsername/pwserver/uniquenamed

Line 50:
Change the “datadir” value to /home/myUsername/pwserver/uniquenamed/dbhomewdb/dbdata

Line 51:
Change the “logdir” value to /home/myUsername/pwserver/uniquenamed/dbhomewdb/dblogs

Line 52:
Change the “backupdir” value to /home/myUsername/pwserver/backup

Note: Your path varies on which user you are installing and running the services under. For example if you’re using root (which I don’t recommend) the paths would start with /root/pwserver/ instead of /home/myUsername. Also remember to change “myUsername” with your username.

Setting up /etc/hosts
Your hosts file probably looks something similar to this:
127.0.0.1 localhost localhost.localdomain

For convenience we’re going to add the aliases I spoke of earlier to this file. This will also vary depending on your setup.
Here we’ll add: manager, link1, game1, delivery, database, backup. So now your hosts file will look something like this:
127.0.0.1 localhost.localdomain localhost manager link1 game1 delivery database backup

Note: If you’re running multiple link and/or game servers you can add them here. Just specify the IP
address of the server and the alias. Example: 123.123.123.123 game2

Finalizing:
Now you need to run the servers. The distribution uses a program called servicerun. This only works
with multiple server setups. Since we’re not doing this the servicerun program is useless. I personally
made a script to run my services. It’s important you run the services in a specific order. Again this is
something you will have to customize. But here is an example script:

/home/myUsername/pwserver/gamedbd/gamedbd gamesys.conf 2>log &
/home/myUsername/gdeliveryd/gdeliveryd gamesys.conf 2>log &
/home/myUsername/gfactiond/gfactiond gamesys.conf 2>log &
/home/myUsername/gacd/gacd gamesys.conf 2>log &
/home/myUsername/glinkd/glinkd gamesys.conf 1 2>log &
/home/myUsername/gamed/gs gs01 >gs01.log 2>log &
/home/myUsername/gamed/gs arena01 2>log &
/home/myUsername/gamed/gs arena02 2>log &
/home/myUsername/gamed/gs arena03 2>log &
/home/myUsername/gamed/gs arena04 2>log &
/home/myUsername/gamed/gs is01 2>log &
/home/myUsername/gamed/gs is02 2>log &
etc…

Just add extra entries if you have multiple game servers (gs01, gs02, etc) and for your game server
instances (is01, is02, is03, etc)

Comments
I hope this is enough information to get many of you started. I do not guarantee 100% accuracy. But
with this information you should have learned enough to figure things out. If there is something wrong
or incorrect please let me know so I can fix it.

Common Issues & Errors
Filters file:
Cannot load table of sensitive words. check file ./filters.
err : Cannot load sensitive words, check filters

One of the common errors many are noticing is gdeliveryd and gfactiond failing to start because it
reports a problem with the filters file. From my experience it really varies on the systems you’re trying
to run the server from. The filters file is supposed to be encoded in GBK. Your gamesys.conf for
gdeliveryd and gfactiond should have a item named “table_charset”. This should be set to GBK
although you can also use ASCII or some other charset if you wish.

Q. How do I check the encoding?
A. You can check the encoding by typing “file filters” at the console.
Q. How do I convert the encoding?
A. You can convert the filters file encoding with a utility called iconv.
Example:
$ iconv f
GBK t
UTF8 filters o
filters.utf8
$ file filters.utf8
filters.utf8: UTF8
Unicode text

glinkd - Fatal Error:
Fatal Error : This program was not built to run on the processor in your system.
The server was designed to run on Intel based processors. It will not run on AMD or any other
processor.

gamedbd – Illegal instruction (core dumped):
The server was designed to run on Intel based processors. It will not run on AMD or any other
processor. In the event that you are receiving this and are using a Intel based processor your kernel may
not have the MPPC kernel patch. In any other case you would need to run the core file through a
debugger to get more information on the problem.




同じカテゴリー(完美エミュ鯖)の記事
とりあえず
とりあえず(2008-02-11 20:19)

前後しました
前後しました(2008-02-11 03:21)

立て方指南
立て方指南(2008-02-10 18:58)

SPW(杉並完美世界)
SPW(杉並完美世界)(2008-02-10 03:04)

この記事へのコメント
へたれ英語能力で訳そうと思ったんですが
莫大な量に泣きそうになりましたじdbsrねうrtgv
Posted by かさぶた at 2008年02月10日 18:38
上の画像に書かれている文字を入力して下さい
 
<ご注意>
書き込まれた内容は公開され、ブログの持ち主だけが削除できます。

写真一覧をみる

削除
とりあえず
    コメント(1)