Archive for the ‘Dedicated Hosting’ Category

What is a Halo server ?

Saturday, August 16th, 2008

Hello,

We all know about the features of a dedicated server.Infact it is one of the main types of web hosting servers available.But,as many people in this world are gamers,it is very important to improve the standards of gaming so that people can enjoy the game they like.For this reason,Halo series was created was Bungie.Halo is a science fiction video game series.Halo was published by microsoft.Halo has many versions,each advanced and better in performance than the previous one.Later when gaming became popular,the gaming standards also improved and then games were run on dedicated servers.After that the Halo dedicated servers were introduced.Halo dedicated server is an advanced feature with a lot of advancements.Halo dedicated server is only for the people who have an idea and experience of running dedicated game servers and not for casual users who do not have much knowledge about the computers and running dedicated server.Also make sure that Microsoft customer support does not support Halo dedicated server.

Installation :-

Contents :-

1) Dedicated server features ( Dedicated server has two versions. (A) Halo Dedicated server v1.02 And (B) Dedicated server v1.03 update )

2) System requirements

3) Installation

4) Running Halo dedicated server

5) init.txt configuration file

6) Running multiple instances

7) Using remote console

8) Controlling Team killing and Banning undesirable players

9) Console Commands

10) Known Issues and Workarounds

11) Getting help

1)  Dedicated server features :

The following new features / bug fixes are included in the v1.03 update :

  • Optimized map loading functionality, significantly reducing the time to load large map cycling configuration files.
  • Enhanced functionality to reduce online team killing and facilitate the banning of users.
  • Extended sv_players functionality.
  • Teams are now persisted for the next game when map cycling occurs.
  • Now the user can restart the current game without requiring the server to map cycle.
  • It is now possible for the User to specify their data folder directories using -path.

Whereas the Halo dedicated server v1.02 includes the following :


* Stand-alone application.
* Flexible multiple instances support.
*
Command line execution.
        * Client RCon (Remote Console) functionality.
        * Kicking and banning players.
*
Password protected servers
        * Pre-defined / custom game type and map rotation support.

2) System requirements :-
The following are the minimum requirements required for the personal computer which is needed by the Halo Dedicated Server :

  • Multimedia personal computer with a 733 MHz or higher processor.
  • Windows 98 SE, Windows Me, Windows 2000 Service Pack 1, or Windows XP.
  • 128 Megabytes (MB) of RAM.
  • 380 MB of available hard disk space.
  • Keyboard and Microsoft Mouse or compatible pointing device.
  • Broadband internet connection.

These differ from the retail version of Halo for the PC by not requiring:

  • 8X CD-ROM drive.
  • 32 MB 3D hardware-transform-and-lighting-capable video display.
  • Sound card and speakers or headphones.
  • DirectX 9.0b.

A personal computer with the given below requirements is suggested to run an Optimal Halo Dedicated Server :

  • Personal computer with a 1.4 GHz or higher processor.
  • Windows XP or Windows 2003 Server (with all service packs installed)
  • 256 Megabytes (MB) of RAM or more.
  • 380 MB of available hard disk space.
  • Keyboard and Microsoft Mouse or compatible pointing device.

When running multiple instances on a server, these requirements have to be adjusted to account for the additional resources required.

3) Installation :-

Halo Dedicated Server is released in two different self-extracting files:

Halo_DS_1_02.exe

This self-extracting file includes the Halo Dedicated Server binary files. When we release updates to the dedicated server, these will be the only files you need to update.

Halo_DS_maps_1_02.exe

This self-extracting file includes the multiplayer maps required to run Halo Dedicated Server. You will have to download these once. Only if you have the full retail Halo game installed on your server, you do not need to download the maps at all; the server will use the maps that were installed by the game.

To install these files: double-click on these files and follow the instructions given to you onthe screen.

4) Running a Halo Dedicated server :

  1. Browse to your Halo Dedicated Server installation directory.
  2. Double-click haloded.exe.

This will open a console window and you will have access to the Halo Dedicated Server console command line.

With v1.03, we are introducing the possibility for server administrator to specify their data directory using the -path command line argument. This allows storing custom game types and data files in any folder on the disk drive.

Important note: With this new command line argument, the default path for these data files is changing from the dedicated server installation directory to the user’s “My Documents” folder. This is important for server administrators who prefer to set per-user read / write access permissions to the Halo Dedicated Server program files directory. If you will not be using the -path command line argument, you will have to move your current ban list to the default directory.

5) init.txt configration file :

Halo Dedicated Server uses init.txt file (located in the installation directory) to pre-set some of the server options and setup map cycling. Any console command can be invoked in the init.txt file (see Console Commands below for a list of available console commands).

For example, to launch a server with the following parameters:

  • Name: “Halo_DS”
  • Listed on the GameSpy Master Server list? Yes
  • Maximum number players: 12
  • Password: “halo”
  • Timeout between maps rotations: 15 seconds

Create the following init.txt file:

sv_name Halo_DS
sv_public 1
sv_maxplayers 12
sv_password halo
sv_mapcycle_timeout 15
To setup map cycling, you need to create a game entries map cycling list (a game entry is a map name and a game type). To do so, simply use the sv_mapcycle_add command in the init.txt file.

For example, to have the following maps and game types cycle:

  • Timberland CTF
  • Danger Canyon Assault
  • Gephyrophobia Slayer
  • Blood Gulch Crazy King

Add the following lines to the init.txt file:

sv_mapcycle_add timberland CTF
sv_mapcycle_add dangercanyon assault
sv_mapcycle_add gephyrophobia slayer
sv_mapcycle_add bloodgulch "crazy king"
Then, to start the dedicated server, use the following command: sv_mapcycle_begin.

Every time you launch haloded.exe, it will look for init.txt for initialization (unless you specify a different file using -exec. See below for more details on -exec).

For the previous example, the final init.txt file would look like this:

sv_name Halo_DS
sv_public 1
sv_maxplayers 12
sv_password halo
sv_mapcycle_timeout 15
sv_mapcycle_add timberland CTF
sv_mapcycle_add dangercanyon assault
sv_mapcycle_add gephyrophobia slayer
sv_mapcycle_add bloodgulch "crazy king"
sv_mapcycle_begin
The default game types available are the following:

oddball
slayer
juggernaut
king
crazy king
race
ctf
assault
team slayer
team oddball
team race
Classic game variants are also supported as default game types (check out the retail version of Halo for a list of all classic game variants).

You can create custom game types (using the full retail version of Halo) and include these game types on your server rotation. This would enable you, for example, to include a Rockets only game on your server rotation. To do so, follow these steps:

  • Launch the full retail version of Halo.
  • Under Multiplayer, choose Edit Game Types.
  • Create a new game type (refer to the Halo documentation if you need help to do this).
  • Save your new game type.
  • Quit Halo.
  • Open your Halo save games folder (by default, this would be “My Documents\My Games\Halo\savegames”).
  • You will see the name of the custom game type you created as a folder directory.
  • Make sure this folder is available on your server (in the same location on disk).
  • Use the name of your custom game type in your mapcycle.txt file.

With this release, the dedicated server is dependent on access to your save games folder. This will be addressed in an upcoming release.

6) Running multiple instances :

Halo Dedicated Server supports multiple instances running on one computer. Obviously, each of these instances must be using a different network port. See below for instructions on how to launch multiple instances of Halo Dedicated Server. The maximum number of instances that can be run on a server is 8.

When running multiple instances, each instance will use its own init.txt file.

Here is an example on how to run multiple instances, assuming Halo Dedicated Server is installed in the E:\HaloPC folder:

E:\HaloPC\haloded.exe -exec e:\halopc\init1.txt -cpu 0 -port 2301

E:\HaloPC\haloded.exe -exec e:\halopc\init2.txt -cpu 1 -port 2305

E:\HaloPC\haloded.exe -exec e:\halopc\init3.txt -cpu 0 -port 2307

Three command line arguments are specific to running Halo Dedicated Server with multiple instances:

-exec
Specify which init.txt file to use for this instance of the dedicated server. The name of this file can be any name.

-cpu

When using a multi-processor computer (SMP) server, it is possible to instruct Halo Dedicated Server to run on a specific CPU. To do so, use the -cpu n command line argument (where n is a given CPU, 0 being the first one).

-port

Different instances must, obviously, use different ports. -port is used to specify the port for the instance being launched. If a port is not specified the server will automatically choose an open port though the chosen port is not reported.

7) Using RCon

By default RCon (remote connection) to a server is disabled. To enable it, you must specify an RCon password. You do this using the following console command:

sv_rcon_password password

Once RCon is enabled on a server, any client can send it commands using the following console command:

rcon password command argument

password is the RCon password to the server the client is connected to.
command is one of the server console commands (see Console Commands below).
argument is the argument to the server console command.

8) Controlling Team killing and Banning Undesirable Players :

Halo Dedicated Server v1.03 introduces a new system to control team killing in online games.

At its core, the system is very simple. It’s also very flexible and allows server administrators to tweak servers to reflect settings they deem appropriate to provide the best game experience to their users. Here’s how it works:

Every time a player kills someone on their team, they are awarded a “team killing point” (let’s call them TKP). If a player is awarded a certain number of TKP, they isare automatically kicked and banned from the server. To set the number of TKP required for a user to be kicked and banned, server administrators use the sv_tk_ban console command. For example:

sv_tk_ban 4

sets the number of TKP required for a player to be kicked and banned to 4.

When a player reaches the number of TKP necessary to be kicked and banned, they are automatically expulsed from the server. They will remain banned from the server for a period of time specified using the sv_tk_penalty console command. In addition to this, this period of time can also be set to take into account repeated offenses. This means if a player gets enough TKP to be kicked and banned for 5 minutes, then comes back and misbehaves again, their banned period can be larger. It’s possible to set as many as 4 different levels of punition. Upon the fifth offense on the same server, a user is banned indefinitely. Of course, the server administrators can always consciously choose to unban the player.

sv_tk_penalty 5m 1d 0
sv_tk_penalty 5m 1h 8h 1d

The first example above will, for a server, set the first offense punition to 5 minutes, the second offense to 1 day and the third one to an indefinite ban (0 means indefinite). The second example will set the offense punition to 5 minutes, the second to 1 hour, the third to 8 hours, and the fourth to 1 day. On the fifth offense, the player will be indefinitely banned from the server.

Because team kills can be accidental, we also introduce a “cool down” period. If a player gets a TKP accidentally and doesn’t kill another teammate for the duration of the cool down period, the TKP will be forgiven. For example:

sv_tk_cooldown 5m

will set this cool down period to 5 minutes.

The last aspect of the team killing system is that, once again, by accident, a rocket explosion or a grenade can kill three of your teammates. This poses the risk of registering three TKP instantly, improving the chances of improperly banning an accidental team kill. To address this, the concept of a “team kill grace” period exists. This period is the delay (in seconds) that must expire before a player can be credited with an additional TKP.

sv_tk_grace 3s

sets this period to 3 seconds. Once again, this means that if a player kills 4 teammates within a 3 seconds period, he will only be credited with 1 TKP.

Finally, as with v1.02, it is possible to ban players individually using their player index. The sv_tk_players console command has been updated to display players’ TKPs and their cool down period timers.

9) Console Commands :

The following commands are server specific console commands:

cls

Clear the console text.

help [command]

Tell you about the command.

quit

Quit Halo for the PC dedicated server.

sv_ban[player name or index]

Ban the player with the given name or index. However, this doesn’t kick them out of the game however.
sv_ban_penalty [time1][time 2][time 3][time 4]

Specifies the levels of punishment for repeat offenders. The first offense will be punished for [time1], the second offense for [time2], the third offense for [time3], the fourth offense [time4] and the fifth offense for an indefinite period of time (the administrator has to unban the user). The format of time is ns, nm, nh, nd or 0. n is a digit in the 1-9 range and 0 is infinite.

sv_banlist

Show the list of the banned players.

sv_banlist_file

Specifies the file to store and load the ban list to and from. Note: this file’s name is restricted to banlist##.txt where ## is a two digit number. This allows multiple instances to use different ban lists while still restricting the name of the ban list (for security purposes).

sv_end_game

End the currently running game. This will proceed to the next game in the map cycling game entries list.

sv_kick [player index or  name]

Kick the player with the given name or index out of the game.

sv_map [map name] [game variant]

Start a game with the indicated map and game variant. When the game is over, this game will restart itself. This command supersedes any map cycle the server has.

sv_mapcycle

Show game list.
sv_mapcycle_add [map name] [game variant]

Append this game entry (map name and game type) to the end of the game list.

sv_mapcycle_begin

Start the map cycling with the specified game entries.

sv_mapcycle_del [index]

Delete the game entry from the map cycling game list (use sv_mapcycle to get game IDs).

sv_mapcycle_timeout n

Time in seconds to restart the next game in the game list after game is finished (this determines how long clients are sitting at the post carnage report screen).

sv_map next

End the current game and skip to the next game in the map cycling game entries list.

sv_map restart

Restart the game.

sv_maxplayers n (default value is 16)

Set the maximum number players. This should be done in the init.txt file, before map cycling begins.

sv_name [string] (default value is “Halo”)

Set the server name (64 characters max). This should be done in the init.txt file, before map cycling begins. With the 1.03 update, the set of characters allowed for server names is no longer limited to alphanumeric characters.

sv_password [string]

Set password for server. This should be done in the init.txt file, before map cycling begins.
sv_players

List the players and their indices for reference in banning and kicking players from the dedicated server. With v1.03, sv_players also shows the number of TKP per players and their cool down period (as appropriate).

sv_public[1,0] (default value is 1)

Determine if the server will be listed in the GameSpy Master Server list (1) or not (0). This should be done in the init.txt file, before map cycling begins. Note: setting this to false is equivalent to hosting a LAN game.

sv_rcon_password [string]

Set the RCon password. To remove the password, thus disabling RCon, specify an empty string “” as the password.
sv_status [1,0]

Displays the current status of the dedicated server in the console.

sv_tk_ban n

Specifies the number of “team kill points” required for a player to be kicked and banned from a server. See section H for additional information about Controlling Team Killing and Banning undesirable players.

sv_tk_grace[time]
Set the grace period during which a player can only be credited with one TKP. For example, if set to 3s, a player can only be credited for one team kill every 3 seconds, preventing an accidental grenade explosion from crediting multiple TKP to a player.

sv_tk_cooldown [time]

Set the cool down period after which a player will be forgiven one TKP if they have not committed another team kill.

sv_unban [player name]

Allow the player with the given name to join the server again.

10) Known Issues and Workarounds

Console does not recognise Battlecreek,Derelict or Chiron map names :
You must use the actual multiplayer map file name. Here is a table with the in-game name of the map and its associated file name:

In-game name File name
Battle Creek beavercreek
Sidewinder sidewinder
Damnation damnation
Rat Race ratrace
Prisoner prisoner
Hang ‘Em High hamgemhigh
Chill Out chillout
Derelict carousel
Boarding Action boardingaction
Blood Gulch bloodgulch
Wizard wizard
Chiron TL34 putput
Longest longest
Ice Fields icefields
Death Island deathisland
Danger Canyon dangercanyon
Infinity infinity
Timberland timberland
Gephyrophobia gephyrophobia

Using sv_map,host is unable to launch a game using a game variant with spaces in it :
Sv_map takes multiple arguments. You need to add quotes around spaces in the second argument (game variant) in order for this to work. For example,

sv_map mapname "game variant"

Console is unable to clear the server password:

You need to enter an “empty” password to clear it from the console. Enter

sv_password ""

11)Getting help :

Get Halo Dedicated Server help on the Gearbox Software community forums at the following address:
http://www.gearboxsoftware.com/forums/postlist.php?Cat=&Board=ServerAdmin

Halo Dedicated Server engineers regularly browse these forums and answer frequently asked questions.

Dedicated servers

Tuesday, August 12th, 2008

Hello,

Dedicated servers are the servers which have only one client and the entire server belongs to him.Client is the only account holder on the server and hence all the resources are only used by him.Dedicated server provides a dedicated environment to the client so the client is not sharing the server with any other client or account holder.As the server has no other client all the resources of the server are used by one single user and that is the reason why dedicated servers are preferred over the shared and vps servers.As dedicated servers have only one user they are much more reliable and safe and that is a real benefit for the clients who really want privacy like companies and some individuals also who having high traffic on their websites.

Dedicated servers are also preffered because they include the all the features of shared and vps hosting.Dedicated server for example give you the flexibility like if you think the resources of the dedicated server are not entirely used by you then you can also have people sharing it with you so that you get the amount of the resources you do not use and you only pay for the resources you use.This is one of the advantages of dedicated server.If you have a dedicated server you also have the option to customize your server according to your needs and requirements and so it has become a very good option for the clients who are not satisfied with the dedicated server packages offered by the web hosting companies.The clients can calculate the usage they will require and can get the dedicated servers customized by the web hosting company.As in a dedicated server there are no account holders there is no complaints about the customization of the server.Due to this option of customization dedicated servers are much more preferred over the shared and the vps servers which have a number of users and cannot be customized.Dedicated servers are also preferred because in shared hosting the other websites certainly effects the performance of the sever vps do give us the dedicated environment, but at the same time is still virtual since the vps is sharing a physical node with other vps - the only resource which is only being constantly shared is the vps.

Dedicated servers are a very good option for you but the only thing to worry is that you should be able to afford it.Dedicated servers are much more expensive than the shared and the vps servers.In the shared and the vps servers the entire cost and maintainance of the servers is distributed among all the users using the servers.As dedicated server is used by one single client the entire cost and the maintainance is to be given by the user.So it is very difficult for an indivisual to afford a dedicated server.The hosting company which provides you the server also include the profit in the cost of the server as they are the one providind you the service and a lot depends on them.

How is private server different from a virtual server ?

Sunday, August 10th, 2008

Hello,

A private server,also known as a dedicated server is a server which completely belongs to the client(customer).In a dedicated server a client is free to upgrade or in other words customize the server according to the needs and requirements.In a dedicated server the client can select the cpu,ram and disk space according to his or her needs.Whereas,a virtual server or a virtual private server or a virtual private  server does not completely belong to the client.The word virtual(which means not true) servers does not fully belong to client,in fact the customer is just given a slice or in other words part of the server.The client is not able to customize the server as per the requirements.Moreover,as the client has the only a part of the server it does not depend on the client to select the cpu,ram and the disk space.The client can only choose the suitable package from the different packages available with the company which is providing the hosting service to the customer.As customization is not possible the client can only use the limited resources provided in the package which the client selects from the different packages available.If the resources of the package selected are not enough for the client then he or she can select a package which provides more resources or in other words the better plan available according to the needs of the client.But if the resources are still not enough then the only option is to go for a dedicated server which provides more resources than the virtual server and is suitable for the needs and requirements of the customer.This is the reason why virtual private servers are said to be the perfect fill in between the shared server and a dedicated server.

But,the client should go for a dedicated server only if the resources offered by the virtual private server are not enough for him or her because as the vps server is a kind of shared server where the cost and the maintainance of the server is paid by all the users and so the amount of the cost and the maintainance of the server is distributed among all the users using the server but,as the dedicated server is only used and belongs to one user the full amount of the cost and maintainance of the server is only paid by the user using the dedicated server.So it is not easy to switch from a virtual private server to a dedicated one.But if you can afford a dedicated server and your requirements of the resources offered by the virtual server are not enough for you then it will be a good decision to go for a dedicated server as dedicated server allows you to use all the resources available and as the server has no other user you will not have to worry about any other users account on the server.

The performance of the virtual private server also depends on the other users as they too share the resources of the server.While choosing from a dedicated server and a virtual private server one should know that although resources of the dedicated server and the virtual private server are different But the features of the dedicated server and the virtual private server are more or less the same.Whereas,in a dedicated server the resources are used only by one single user but you can also share the resources with someone.for example:-if you live and own a mansion,you are free to use all the resources like water supply,electricity etc in the mansion and you can even share it with someone if you want to which is the case with dedicated server.Whereas,if you live in an apartment,you have your limited area where you are able to use the resources and in certain limit as other people also share the apartment with you and they also need the resources.So this is the difference between dedicated server and a virtual private server. These are the points one should think of when they are comparing or in other words differentiating between a dedicated server and a virtual private server.

MySQL databases on dedicated servers

Thursday, August 7th, 2008

hello,

MySQL is the world’s most popular open source database software.MySQL is owned by a single for-profit firm,the swedish company MySQL AB now a subsidiary of Sun Microsystems which holds the copywrite to most of the codebase.If you are looking for a stable database platform for your organisation but you cannot afford the main stream products from microsoft and oracle?then MySQL having an excellent speed and reliability might be the best option for you.Moreover MySQL is easy to use,so if you are a new user then also using MySQL is not a difficult task for you.Vikram Vasvani’s book MySQL:the complete reference is,as the name suggest’s a complete reference bok for MySQL and can be very useful to the new users for MySQL.The wonderful technical reference in the book is comprehensive enough to help you out if you are a new or a seasoned user for MySQL.

MySQL is popular for web applications and also acts as the database component of the LAMP,BAMP,MAMP and WAMP platforms (Linux/BSD/Mac/Windows,Apache,MySQL,PHP/Perl/Python) and does not require complex scripting or programming.

Setup:-

HOWTO set up a MySQL Cluster for two servers (three servers required for true redundancy)

Introduction

This HOWTO was designed for a classic setup of two servers behind a loadbalancer. The aim is to have true redundancy - the site will still remain up even if either server is unplugged which can be done.

Notes:

You MUST have a third server as a management node but this can be shut down after the cluster starts. Also note that shutting down the management server is not recommended (see the extra notes at the bottom of this document for more information). You can not run a MySQL Cluster with just two servers And have true redundancy.

Although it is possible to set the cluster up on two physical servers you WILL NOT GET the ability to “kill” one server and for the cluster to continue as normal. For this you need a third server running the managment node.

I am going to talk about three servers:

mysql1.domain.com 		192.168.0.1
mysql2.domain.com 		192.168.0.2
mysql3.domain.com 		192.168.0.3

Servers 1 and 2 will be the two that end up “clustered”. This would be perfect for two servers behind a loadbalancer or using round robin DNS and is a good replacement for replication. Server 3 needs to have only minor changes made to it and does NOT require a MySQL install. It can be a low-end machine and can be carrying out other tasks.

STAGE 1: Install MySQL on the first two servers:

Complete the following steps on both mysql1 and mysql2:

cd /usr/local/
http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-max-4.1.9-pc-linux-gnu-i686.tar.gz/
	from/http://www.signal42.com/mirrors/mysql/
groupadd mysql
useradd -g mysql mysql
tar -zxvf mysql-max-4.1.9-pc-linux-gnu-i686.tar.gz
rm mysql-max-4.1.9-pc-linux-gnu-i686.tar.gz
ln -s mysql-max-4.1.9-pc-linux-gnu-i686 mysql
cd mysql
scripts/mysql_install_db --user=mysql
chown -R root  .
chown -R mysql data
chgrp -R mysql .
cp support-files/mysql.server /etc/rc.d/init.d/
chmod +x /etc/rc.d/init.d/mysql.server
chkconfig --add mysql.server

Do not start mysql yet.

STAGE 2: Install and configure the managment server

You need the following files from the bin/ of the mysql directory: ndb_mgm and ndb_mgmd. Download the whole mysql-max tarball and extract them from the bin/ directory.

mkdir /usr/src/mysql-mgm
cd /usr/src/mysql-mgm
http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-max-4.1.9-pc-linux-gnu-i686.tar.gz/
	from/http://www.signal42.com/mirrors/mysql/
tar -zxvf mysql-max-4.1.9-pc-linux-gnu-i686.tar.gz
rm mysql-max-4.1.9-pc-linux-gnu-i686.tar.gz
cd mysql-max-4.1.9-pc-linux-gnu-i686
mv bin/ndb_mgm .
mv bin/ndb_mgmd .
chmod +x ndb_mg*
mv ndb_mg* /usr/bin/
cd
rm -rf /usr/src/mysql-mgm

You now need to set up the config file for this managment:

mkdir /var/lib/mysql-cluster
cd /var/lib/mysql-cluster
vi [or emacs or any other editor] config.ini

Now, insert the following (changing the bits as indicated):

[NDBD DEFAULT]
NoOfReplicas=2
[MYSQLD DEFAULT]
[NDB_MGMD DEFAULT]
[TCP DEFAULT]
# Managment Server
[NDB_MGMD]
HostName=192.168.0.3		# the IP of THIS SERVER
# Storage Engines
[NDBD]
HostName=192.168.0.1		# the IP of the FIRST SERVER
DataDir= /var/lib/mysql-cluster
[NDBD]
HostName=192.168.0.2		# the IP of the SECOND SERVER
DataDir=/var/lib/mysql-cluster
# 2 MySQL Clients
# I personally leave this blank to allow rapid changes of the mysql clients;
# you can enter the hostnames of the above two servers here. I suggest you dont.
[MYSQLD]
[MYSQLD]

Now, start the managment server:

ndb_mgmd

This is the MySQL management server, not maganment console. You should therefore not expect any output (we will start the console later).

STAGE 3: Configure the storage/SQL servers and start mysql

On each of the two storage/SQL servers (192.168.0.1 and 192.168.0.2) enter the following (changing the bits as appropriate):

vi /etc/my.cnf

Enter i to go to insert mode again and insert this on both servers (changing the IP address to the IP of the managment server that you set up in stage 2):

[mysqld]
ndbcluster
ndb-connectstring=192.168.0.3	# the IP of the MANAGMENT (THIRD) SERVER
[mysql_cluster]
ndb-connectstring=192.168.0.3	# the IP of the MANAGMENT (THIRD) SERVER

Now, we make the data directory and start the storage engine:

mkdir /var/lib/mysql-cluster
cd /var/lib/mysql-cluster
/usr/local/mysql/bin/ndbd --initial
/etc/rc.d/init.d/mysql.server start

If you have done one server now go back to the start of stage 3 and repeat exactly the same procedure on the second server.

Note: you should ONLY use --initial if you are either starting from scratch or have changed the config.ini file on the managment.

STAGE 4: Check its working

You can now return to the managment server (mysql3) and enter the managment console:

/usr/local/mysql/bin/ndb_mgm

Enter the command SHOW to see what is going on. A sample output looks like this:

[root@mysql3 mysql-cluster]# /usr/local/mysql/bin/ndb_mgm
-- NDB Cluster -- Management Client --
ndb_mgm> show
Connected to Management Server at: localhost:1186
Cluster Configuration
---------------------
[ndbd(NDB)]     2 node(s)
id=2    @192.168.0.1  (Version: 4.1.9, Nodegroup: 0, Master)
id=3    @192.168.0.2  (Version: 4.1.9, Nodegroup: 0)

[ndb_mgmd(MGM)] 1 node(s)
id=1    @192.168.0.3  (Version: 4.1.9)

[mysqld(API)]   2 node(s)
id=4   (Version: 4.1.9)
id=5   (Version: 4.1.9)

ndb_mgm>

If you see

not connected, accepting connect from 192.168.0.[1/2/3]

in the first or last two lines they you have a problem. Please email me with as much detail as you can give and I can try to find out where you have gone wrong and change this HOWTO to fix it.

If you are OK to here it is time to test mysql. On either server mysql1 or mysql2 enter the following commands: Note that we have no root password yet.

mysql
use test;
CREATE TABLE ctest (i INT) ENGINE=NDBCLUSTER;
INSERT INTO ctest () VALUES (1);
SELECT * FROM ctest;

You should see 1 row returned (with the value 1).

If this works,which will probably happen, go to the other server and run the same SELECT and see what you get. Insert from that host and go back to host 1 and see if it works. If it works then congratulations.

The final test is to kill one server to see what happens. If you have physical access to the machine simply unplug its network cable and see if the other server keeps on going fine (try the SELECT query). If you dont have physical access do the following:

ps aux | grep ndbd

You get an output like this:

root      5578  0.0  0.3  6220 1964 ?        S    03:14   0:00 ndbd
root      5579  0.0 20.4 492072 102828 ?     R    03:14   0:04 ndbd
root     23532  0.0  0.1  3680  684 pts/1    S    07:59   0:00 grep ndbd

In this case ignore the command “grep ndbd” (the last line) but kill the first two processes by issuing the command kill -9 pid pid:

kill -9 5578 5579

Then try the select on the other server. While you are at it run a SHOW command on the managment node to see that the server has died. To restart it, just issue

ndbd

Note: no --inital!

Further notes about setup

I strongly recommend that you read all of this (and bookmark this page). It will almost certainly save you a lot of searching.

The Managment Server

I strongly recommend that you do not stop the management server once it has started. This is for several resons:

  • The server hardly requires and takes any server resources
  • If a cluster falls over, you want to be able to just ssh in and type ndbd to stat it. You dont want to have to start messing around with another server
  • If you want to take backups then you need the management server up
  • The cluster log is sent to the management server so to check what is going on in the cluster or has happened since last this is an important tool
  • All commands from the ndb_mgm client is sent to the management server and thus no management commands without management server.
  • The managment server is required in case of cluster reconfiguration (crashed server or network split). In the case that it is not running, “split-brain” scenario will occure. The management server arbitration role is required for this type of setup to provide better fault tollerance.

However you are welcome to stop the server if you prefer.