Complete Walkthrough for Installing tmwserv on Fedora 10

Ask for help regarding any technical issue or report any bug or OS independent issues.
Post Reply
niacc.edu
Peon
Peon
Posts: 10
Joined: 27 Mar 2009, 17:54

Complete Walkthrough for Installing tmwserv on Fedora 10

Post by niacc.edu »

Complete Walkthrough for Installing tmwserv on Fedora 10
Note: I'm still unable to connect to the server with the client but the twmservers are running.

If i'm missing something please tell me.

First install client so we can test the server when completed.

>yum install manaworld

It should install it under games.

Installing the server

open a terminal as the user you want to be

Move the to root directory for the user
>cd

Make a directory for manaworld
>mkdir tmw

Change location to tmw
>cd tmw

Download TMW server
Webpage: http://wiki.themanaworld.org/index.php/Git
>git clone git://gitorious.org/tmwserv/mainline.git tmwserver

>cd tmwserver
>cd src

Path should be like: /home/user/tmw/tmwserver/src
Now we want to place TMW server data into a data directory located in src directory
>git clone git://gitorious.org/tmwserv-data/mainline.git data

The src directory should now have:

Code: Select all

[user@localhost src]$ ls
account-server  common  data       game-server  Makefile.am  net      scripting  sql     tmwserv-account  utils
chat-server     dal     defines.h  Makefile     Makefile.in  point.h  serialize  tmw.db  tmwserv-game
> cd ../..
Should put you back to: /home/user/tmw

Now we need to download TMW client data
> git clone git://gitorious.org/tmwdata/mainline.git tmwclientdata

We should now see

Code: Select all

[user@localhost tmw]$ ls
tmwclientdata  tmwserver
> cd tmwclientdata
> ls
Should show:

Code: Select all

[user@localhost tmwclientdata]$ ls
COPYING      emotes.xml  hair.xml   items.xsd  maps          npcs.xml  skills.xml          units.xml
effects.xml  graphics    items.xml  items.xsl  monsters.xml  sfx       status-effects.xml
Next we need to create links to monsters.xml, items.xml, and maps

Now we have to move back to the TMW server data directory
>cd ..
>cd tmwserver
>cd src
>cd data

We should now be at: /home/user/tmw/tmwserver/src/data

Now we need to create links back to monsters.xml, items.xml, and maps
>ln -s /home/user/tmw/tmwclientdata/items.xml
>ln -s /home/user/tmw/tmwclientdata/maps
>ln -s /home/user/tmw/tmwclientdata/monsters.xml

>ls -la
Should show

Code: Select all

[user@localhost data]$ ls -la
total 80
drwxr-xr-x  4 user user  4096 2009-04-02 11:34 .
drwxrwxr-x 13 user user  4096 2009-04-02 13:28 ..
-rw-rw-r--  1 user user 18009 2009-04-02 11:26 COPYING
drwxrwxr-x  8 user user  4096 2009-04-02 11:26 .git
lrwxrwxrwx  1 user user    46 2009-04-02 11:33 items.xml -> /home/user/tmw/tmwclientdata/items.xml
-rw-rw-r--  1 user user  2594 2009-04-02 11:26 items.xsd
lrwxrwxrwx  1 user user    41 2009-04-02 11:34 maps -> /home/user/tmw/tmwclientdata/maps
-rw-rw-r--  1 user user  1365 2009-04-02 11:26 maps.xml
lrwxrwxrwx  1 user user    49 2009-04-02 11:32 monsters.xml -> /home/user/tmw/tmwclientdata/monsters.xml
-rw-rw-r--  1 user user  6050 2009-04-02 11:26 runes.xml
drwxrwxr-x  4 user user  4096 2009-04-02 11:26 scripts
Return to the src directory
>cd ..

Next we will create the database
The database just need to be located where you have servers

It seems best, when do make it will place tmwserv-account and tmwserv-game in the src directoy
The path should be: /home/user/tmw/tmwserver/src

Database info website: http://wiki.themanaworld.org/index.php/ ... stallation
You can use MYSQL, SQLite, and PostgreSQL

I would suggest SQLite, the .tmwserv.xml file defaults to using it. More on that later.

Make sure you have SQLite
[user@localhost src]$ sqlite3
SQLite version 3.5.9
Enter ".help" for instructions
sqlite> .quit

If you don't "Add/Remove Software" works good, search on SQLite
(Development tools for the sqlite3 embedded SQL database engine)

Next we need to locate the Createtables.sql file

>cd sql
>cd sqlite
>ls

We should see:
[user@localhost sqlite]$ ls
createTables.sql updates

>pwd
Path should be /home/user/tmw/tmwserver/src/sql/sqlite
Copy the path
Return to the src directory
>cd ../..
>sqlite3 tmw.db

# Now read createTables.sql using the path you just copied
>.read /home/user/tmw/tmwserver/src/sql/sqlite/createTables.sql
# now confirm the tables are there
>.tables
>.quit

>ls
You should now see tmw.db

Next we need to configure tmwserv.xml

Move to the docs directory. A copy of tmwserv.xml is located there.
> cd ..
> cd docs

The tmwserv.xml is actually saved in the root directory as a hidden file.

So make a copy of tmwserv.xml and change it to a hidden file.
>cp tmwserv.xml .tmwserv.xml
>ls -la
We should see both the original and copy:

Code: Select all

[user@localhost docs]$ ls -la
total 176
drwxrwxr-x 2 user user  4096 2009-04-02 15:15 .
drwxr-xr-x 6 user user  4096 2009-04-02 12:14 ..
-rw-rw-r-- 1 user user  9520 2009-04-02 11:22 architecture.txt
-rw-rw-r-- 1 user user  2325 2009-04-02 11:22 commands.txt
-rw-rw-r-- 1 user user 73431 2009-04-02 11:22 database_specification.png
-rw-rw-r-- 1 user user  3032 2009-04-02 11:22 messages.txt
-rw-rw-r-- 1 user user  2062 2009-04-02 11:22 scripting.txt
-rw-rw-r-- 1 user user   960 2009-04-02 11:22 serverdata.txt
-rw-rw-r-- 1 user user  5344 2009-04-02 11:22 server.txt
-rw-rw-r-- 1 user user   719 2009-04-02 11:22 stats.txt
-rw-rw-r-- 1 user user  2160 2009-04-02 11:47 .tmwserv.xml
-rw-rw-r-- 1 user user  2169 2009-04-02 11:22 tmwserv.xml
Now we need to edit the copy .tmwserv.xml
>joe .tmwserv.xml

Look for:

Code: Select all

<!--
	SQLite specific configuration. 

	sqlite_database:	name and path to the sqlite database file
						optional, default="tmw.db"
-->
<!-- <option name="sqlite_database" value="tmw.db"/> -->
Update it to:

Code: Select all

<!--
	SQLite specific configuration. 

	sqlite_database:	name and path to the sqlite database file
						optional, default="tmw.db"
-->
<option name="sqlite_database" value="tmw.db"/>
Then hold down "Ctrl and k" followed by x to save the changes.
You can type below to verify
>cat .tmwserv.xml

Now we need to return to the user's root directory:
>cd
>pwd

The path should be: /home/user

Now we need to make a copy of .tmwserv.xml and place it in the user's root directory.

Again this is if your start the server's as this user and not the ROOT user. If running as root you would need a copy in the ROOT user's root directory.
>cp /home/user/tmw/tmwserver/docs/.tmwserv.xml .tmwserv.xml

>ls -la
You should now see .tmwserv.xml

** Special Note for .tmwserv.xml **
When you run the server it reads the .tmwserv.xml but when you stop the server it overwrites the .tmwserv.xml with a default file that looks like below:

Code: Select all

<?xml version="1.0"?>
<configuration>
 <option name="accountServerAddress" value="localhost"/>
 <option name="accountServerPort" value="9601"/>
 <option name="defaultMap" value="1"/>
 <option name="gameServerAddress" value="localhost"/>
 <option name="gameServerPort" value="9604"/>
 <option name="sqlite_database" value="tmw.db"/>
 <option name="startX" value="720"/>
 <option name="startY" value="840"/>
</configuration>
You will have to update .tmwserv.xml each time you restart the server, if you don't want the default .tmwserv.xml file.

Next check dependencies and Make/Compile the server

You can take two paths, just install all the dependencies or compile and fix the errors.

Now move back to tmwserver directory
> cd tmw
> cd tmwserver

I had 3 packages, I needed to install

"Add/Remove Software" works good, search on physfs
Add: Development libraries and headers for physfs (physfs-devel****)

"Add/Remove Software" works good, search on enet
Add: Development files for enet (enet-devel****)

"Add/Remove Software" works good, search on LUA
Add: Development files for lua(lua-devel****)

Or you can add them downloading them from the
website: The website for dependencies: http://wiki.themanaworld.org/index.php/Dependencies

Next compile

Make sure we are in directory: /home/user/tmw/tmwserver

If dependencies show up check the website or "Add/Remove Software" for the package

>autoreconf -i

> ./configure

It should return something like:

Code: Select all

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for g++... g++
checking for C++ compiler default output file name... a.out
checking whether the C++ compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for style of include used by make... GNU
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for ranlib... ranlib
checking for a BSD-compatible install... /usr/bin/install -c
checking for PHYSFS_init in -lphysfs... yes
checking for enet_initialize in -lenet... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for XML2... yes
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking whether time.h and sys/time.h may both be included... yes
checking for vprintf... yes
checking for _doprnt... no
checking for atexit... yes
checking for SQLITE... yes
checking for LUA... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

-------------------------------------------------------
  TMW Server will be compiled with these options:

    + storage backend     : sqlite
    + Lua scripting engine: yes
-------------------------------------------------------
Now we make the servers
>make

Now its time to start the servers
Suggestions:
I would disable SELinux
Go to System->Administration->SELinux Management
Change "System Default Enforcing Mode" to Disabled
I would disable the Firewall
System->Administration->Firewall
Change to Disable

After testing enable need security

Next we move to the src directory and location of tmwserv-account and tmwserv-game
>cd src

Open two terminals and make sure your in the src directory: /home/user/tmw/tmwserver/src

First start tmwserv-account
>./tmwserv-account

It should respond like:

Code: Select all

[user@localhost src]$ ./tmwserv-account
[15:53:59] [INF] The Mana World Account+Chat Server v0.0.1
[15:53:59] [INF] Using config file: /home/user/.tmwserv.xml
[15:53:59] [INF] Using log file: /home/user/.tmwserv-account.log
[15:53:59] [INF] Trying to connect with SQLite database file 'tmw.db'
[15:53:59] [INF] Connection to database successful.
[15:53:59] [INF] Loading item database version 0
[15:53:59] [INF] Account handler started:
[15:53:59] [INF] Listening on port 9601...
[15:53:59] [INF] Game server handler started:
[15:53:59] [INF] Listening on port 9602...
[15:53:59] [INF] Chat handler started:
[15:53:59] [INF] Listening on port 9603...
Second Start the Game server
> ./tmwserv-game

It should start like:

Code: Select all

[15:56:01] [INF] The Mana World Game Server v0.0.1
[15:56:01] [INF] Using config file: /home/user/.tmwserv.xml
[15:56:01] [INF] Using log file: /home/user/.tmwserv-game.log
[15:56:01] [INF] Loading map reference...
[15:56:01] [INF] Loading item reference...
[15:56:01] [INF] Loading item database version 0
.....
Note when you start the game server the account server should also update like

Code: Select all

[15:56:02] [INF] A new client connected from 127.0.0.1:43926 to port 9602
[15:56:02] [INF] Game server uses itemsdatabase with version 0
[15:56:02] [INF] Game server localhost:9604 wants to register 40 maps.
[15:56:02] [INF] Registering map 1.
[15:56:02] [INF] Registering map 2.
[15:56:02] [INF] Registering map 3.
[15:56:02] [INF] Registering map 4.
....
YEAH the servers are RUNNING

Now onto the log files
Start up a new terminal in the users root directory

The log files are: .tmwserv-account.log, .tmwserv.stats, .tmwserv-game.log
>cd

The log files are store as hidden files in the same location as .tmwserv.xml file

We can see the files by
>ls -ltra

Code: Select all

-rw-rw-r--  1 user user  2247 2009-04-02 15:56 .tmwserv-account.log
-rw-rw-r--  1 user user  2149 2009-04-02 15:59 .tmwserv.stats
-rw-rw-r--  1 user user 14237 2009-04-02 15:59 .tmwserv-game.log
Finally let's test the servers with a client on the Fedora box.

** Again this is where It breaks down for me but I'll say what i think should happen **

Applications->Games->The Mana World
or
Applications->Games->Role Playing Games->The Mana World
or
Start it from you client code version

Mana World Client now pops up:

The login screen
Name: test
Password: test
Server: localhost or 127.0.0.1

Click OK:

Should say "Unregistered ID"

Now click on Register
Name: test
Password: test
Confirm: test
Server: localhost

Click Register and let the fun begin.

I hope that helped.
niacc.edu
Peon
Peon
Posts: 10
Joined: 27 Mar 2009, 17:54

Re: Complete Walkthrough for Installing tmwserv on Fedora 10

Post by niacc.edu »

I've tried it on SlackWare and Ubuntu still client is unable to connect when the servers are running.

Has anyone installed Fedora 10 from scratch and install tmwserver lately and got it to work?
nietopereek
Peon
Peon
Posts: 2
Joined: 25 Apr 2009, 08:15

Re: Complete Walkthrough for Installing tmwserv on Fedora 10

Post by nietopereek »

I have installed server, it is working without problems but game client can't connect to server :(
ports for game are open.. firewall disabled distro: ubuntu 9.04
some1 maybe know what is the problem?
User avatar
Jaxad0127
Manasource
Manasource
Posts: 4209
Joined: 01 Nov 2007, 17:35
Location: Internet

Re: Complete Walkthrough for Installing tmwserv on Fedora 10

Post by Jaxad0127 »

nietopereek wrote:I have installed server, it is working without problems but game client can't connect to server :(
ports for game are open.. firewall disabled distro: ubuntu 9.04
some1 maybe know what is the problem?
Wrong client. This guide is for TMWserv, whereas the normal client is for eAthena.
Image
Post Reply