Saturday 1 January 2011

SFS1X: Initial Server Configuration

Hello and welcome to the 1st tutorial of this blog. First of all, Happy New Year to everyone! Before starting the tutorial, I would like to talk a little about the blog and my objective while writing it.
I decided to write this blog because lately in the sfs community many people has asked questions that were already answered some time ago and also because I would like to share my knowledge and experience with the SmartFoxServer and Flash.
Now to the tutorial.
Today I'l explain how to initially configure the SmartFoxServer.


First you need to download SmartFoxServer from http://www.smartfoxserver.com/products/.


Warning: If you're using Windows Vista/7, please install in a different folder than the Program Files one (because of the write privileges).


Then, you need to open the port 9339 in the firewall and if you're behind a router, you need to forward that port to the internal ip of your pc. For further informations please check http://portforward.com/


After this you only need to execute the file start.bat (for Windows users) or the by executing the command ./sfs start (for Linux users).


This is better explained in http://www.smartfoxserver.com/docs/docPages/intro/installation.htm


Now the configuration part.


To configure the server you need to edit the config.xml file under [SmartFoxServer Installation Folder]\Server (You can edit it with any text editor like notepad)


The first parameter you need to set is the ServerIP. Here you set the ip you want the server to bind (your external ip given by http://whatismyip.org/ or http://www.whatismyip.com/, it doesn't matter).


Tip: If you are behind a router, i suggest you to put an * in the ServerIP. This way it will bind all the available socket addresses and you won't need to care about changing the ServerIP all the time anymore.


Then you need to set the ServerPort. Here you can set the port you want (don't forget to open it in the firewall and forward it if you're behind a router).


Warning: The port mustn't be used by any other program/software you have. That way the server won't work and will give startup errors.


If you want you can also configure initially the administrator login information. For that you only need to change the AdminLogin and AdminPassword parameters.


Of course you'll need to configure much more parameters (basically all of them), but this is the basic you need to put the server running.


For further information you can check the sfs docs (http://www.smartfoxserver.com/docs/)


If you have any questions, fell free to ask me (by commenting or by dropping me a pm in the sfs forums).
See you till the next tutorial ;-)

No comments:

Post a Comment