bw logo

Appendix B. Installing CentOS 5

Note

Even experienced users should skim the following sections to make sure that required packages are installed.

You may wish to refer to the Centos documentation (http://www.centos.org/docs/5/) for additional notes and guidelines on installing and configuring CentOS.

B.1. Installing

  • Boot the computer using the installation DVD, or other media (for example PXE boot). See the CentOS documentation for further details.

    You may need to select the CD/DVD ROM drive as a bootable device in the BIOS when installing from DVD.

  • This installation guide is based on the graphical installer. Press ENTER at the first boot screen to select Install in graphical mode.

    If you are having trouble with video card drivers, then you can reboot and try the text-only installer.

  • If this is the first time that the CD/DVD has been used, then it is worthwhile to use the built-in test option.

    The test will take around 15 minutes. If you do not want to test, just select Skip.

  • Language and keyboard type.

    The language selected will be used for the installation procedure as well as being the default language of the installed system.

  • Installation method

    Choose Local CDROM if you are using DVD to install, or you can choose your local CentOS mirror.

  • Disk partitioning

    You can partition the disk as you see fit. The Remove all partitions on selected drives and create default layout option should work for most situations. You can modify the default layout by checking the Review and modify partitioning layout checkbox.

    Note

    If the machine will host the database server (running MySQL and DBMgr), and you are using secondary databases, you will need to use LVM partitions and you will also need to allocate some free space for the LVM snapshot. You can add unallocated space on one of your logical drives when reviewing the partitioning layout. See Database Snapshot Tool for more details about the snapshotting tool.

  • Boot loader configuration

    Select the appropriate options for you machine (by default, the bootloader will be installed to the MBR).

  • Network configuration

    Ensure that you have at least one network device listed, and that IPv4 is enabled for it.

    In production, for BaseApp and LoginApp machines, there should be two network interfaces, one for external traffic, and the other for internal server traffic. In development, these can be the same.

    The hostname can be specified manually or it can be set from DHCP.

    If you are not using DHCP, you will need to enter the default gateway and DNS addresses.

  • Time zone selection

    Select your time zone.

    We recommend that you leave the system clock as UTC as per the default.

  • Setting the root password

    You will need access to the root account to install some BigWorld Server components, make sure you remember this password.

  • Package selection

    If this is a production machine, we recommend that you have Desktop - Gnome unchecked. You can leave the other options unchecked, the specific packages that the BigWorld server requires will be installed later on in this guide.

    In development, you may wish to use the machine as a desktop development machine, in which case you can choose to install whichever packages you require for development, such as the Desktop - Gnome package group.

  • First boot configuration

    The installation program will format the disk partitions, install the base system and system packages. After this process is complete, you will be asked to reboot the machine. On first boot, you will be prompted for further configuration.

  • Authentication

    This tool sets up how your OS will look up user account information.

    BigWorld components assume that the username to UID mapping is unique across the network i.e. two users with the same name on two different machines will have the same UID and vice versa. If you are creating accounts with the same name on multiple machines, please ensure that they all have the UID by manually specifying their UID.

    Furthermore, the BigWorld server also assumes that server components started by the same user (as identified by their UID) belongs to the same server instance, even when those components are running on different machines. To run multiple BigWorld Server instances, multiple user accounts are needed.

    You can set up remote account information servers such as LDAP. We recommend using LDAP during development to ensure that every machine in the cluster has the same user set. Typically, each developer user has an account where they can run their own servers independent of other users.

    Refer to the OpenLDAP documentation for further information on how to configure an LDAP service to authenticate users.

  • Firewall configuration

    For a development machine, the firewall should be disabled. The default firewall blocks all UDP traffic, which prevents the BigWorld Server from operating. You can disable the firewall by setting the Security Level option to Disabled.

    For a production machine, you will need to setup specialised firewall rules for your specific security requirements. Guides for BigWorld Server specific firewall settings are given in the Cluster Configuration section of this document.

    The BigWorld Server is known to work with the default SELinux settings (enforcing).

  • System services

    For production machines, in order to avoid unexpected load spikes on your system from background services, we recommend that you disable any non-essential services. You can configure which services are started up at boot time.

    Services that are recommended to be disabled include:

    • cups

    • bluetooth

    • yum-updatesd

  • Finishing the installation

    Once exiting the first boot configuration screen, you will be presented with a login prompt. Login as the root user to continue the installation.

B.2. Post-installation Setup

B.2.1. Install updates

Although not strictly required, it is a good idea to install the latest updates. You can update the packages by running the following command as root:

# yum update

B.2.2. Configure services

In order to avoid unexpected load spikes on your system from background services, non-essential services should be disabled. The service configuration can be modified by running the following as root:

# firstboot --reconfig

This will bring up the same configuration menu that appears after the OS has been installed. Select the option System services, and uncheck those services that you don't wish to start at boot time. See above in Installing for a list of recommended services to disable.

B.2.3. Install build tools

To build the BigWorld Server, GCC and Make must be installed. These should be the default compiler and make utility on your Linux installation.

# yum install gcc-c++ make

B.2.4. MySQL server and development libraries

This step is required if you wish to use BigWorld WebConsole and StatLogger, or use DBMgr with MySQL support.

The BigWorld Server is compatible with MySQL 5.0 and MySQL 5.1. Support for MySQL 4.x has been deprecated.

If you have not already installed the MySQL server, you can do so by running the following command as the root user:

# yum install mysql-server

If you intend to use DBMgr with MySQL support, you must also ensure you have the MySQL client development package, as this is needed to rebuild DBMgr with MySQL support.

Install the MySQL client development package by running the following command as the root user:

# yum install mysql-devel

B.2.5. Changing UIDs

A requirement of BWMachined is that all machines in your cluster must have the same user account information, in particular, that the numerical user IDs (UID) for a particular username are the same on every machine.

When setting up your cluster, one system in your cluster may end up with a mapping of UIDs to usernames that is different from other systems in your cluster. This is especially likely if you are not using LDAP or a similar tool to synchronise login names.

If you are using the GNOME desktop environment on these machines, there can be problems when you change the UID for a username. This section outlines the steps to change the UID of a username and avoid these problems. If all the machines were set up such that each user account has the same UID on each machine, you can skip this section.

  1. Make sure no one is logged in graphically.

  2. If you are in graphical mode, press CTRL + ALT + F1 to switch to a text console.

  3. Log in as root.

  4. Choose the new user ID and group ID for your user, making sure that the new user ID is not being used by any other user, and similarly that the group ID is not used by another group. You can check by looking through /etc/passwd and /etc/group. By convention, the user's primary group ID and user ID are the same, though this need not be the case.

  5. Change the user ID and group ID of the user and the user's primary group by invoking the following commands:

    # groupmod -g <new GID> <groupname>
    # usermod -u <new UID> -g <new GID> <username>
  6. Confirm that the new user has the new UID and GID:

    # id <username>
  7. Issue the command below to remove any invalidated user state:

    # rm -rf /tmp/*<username>*

    Note

    rm is the command to remove files, and the -rf flags direct a recursive search, and force deletion of all directories and files that match the name, without prompting you. These flags should therefore only ever be used with extreme care.

    The asterisks represent sets of wild-card characters in the search for files to remove. For example, for the user Alice, this command would remove a file called /tmp/mapping-Alice if it were to exist.

  8. You will now need to change the ownership of the home directory to the new user and group:

    # chown -R <username>:<groupname> /home/<username>
  9. Press CTRL + ALT + F7 to return to the graphical login if required.