Localizing the appliance

This section describes setting localization options such as the keyboard layout and the time zone. The UI, however, cannot be localized.

Setting the keyboard layout

The console keyboard layout can be temporarily changed using the loadkeys command to test that a keyboard layout works correctly.

To change the keyboard layout to a US layout, enter the following command:

[root@london01 ~]# loadkeys us
[root@london01 ~]# 

To change the keyboard layout to a UK layout, enter the following command:

[root@london01 ~]# loadkeys uk
[root@london01 ~]# 

After you have determined that the layout works correctly, you should make the change permanent. To do so, change the KEYTABLE, MODEL, and LAYOUT variables in the /etc/sysconfig/keyboard file. For example, to change the keyboard layout to a US layout, use the following:

KEYTABLE="us"
MODEL="PC105+inet"
LAYOUT="us"

The keyboard mapping files can be found in /lib/kbd/keymaps/i386/ but usually you can use the 2-letter
ISO Country Code. See the ISO website to find the code for the country you require. For example, us (United States), uk (United Kingdom), de (Germany), and no (Norway).

Setting the system timezone

The system-wide time zone in Linux is defined by the files /etc/sysconfig/clock and /etc/localtime.

The file /etc/sysconfig/clock is used by the system during upgrades to ensure that /etc/localtime references the latest information. The ZONE value in /etc/sysconfig/clock must reference one of the time zone data files in /usr/share/zoneinfo/. These files contain all the time zone and daylight savings rules for a particular location (for example, /usr/share/zoneinfo/Europe/London contains all the data for London). These files are part of the base packages installed by the system (they are from the tzdata package in RHEL and Fedora).

To set the time zone, as the root user, update the value of ZONE in /etc/sysconfig/clock and run tzdata-update. You must restart the tideway service to bring the time zone change into effect. For example, to set the time to New York time:

[root@london01 ~]# cp /etc/sysconfig/clock /etc/sysconfig/clock.old
[root@london01 ~]# sed -i -e s/ZONE=\"[^\"]*\"/ZONE=\"US\\/Eastern\"/ /etc/sysconfig/clock
[root@london01 ~]# tzdata-update
[root@london01 ~]# date
Thu Oct 29 11:17:27 EDT 2015
[[root@london01 ~]# exit
[tideway@london01 ~]$ sudo /sbin/service tideway restart

Setting the system time

You can set the time using the date command. For example, to set the current date to ten past twelve on 4 July 2013, enter the following command:

[root@london01 ~]$ date -s "12:10:00 20130704"
Thu Jul  4 12:10:00 BST 2013
[root@london01 ~]$ 

The format for the date string is HH:MM:SS YYYYMMDD.

You can also configure the appliance to synchronize the internal clock to an ntp server. See Configuring the NTP client at the command line for more information.

Do not change the appliance time on to an earlier setting

After BMC Discovery has been running and has created nodes in the datastore, you must not change the time to an earlier setting. The transaction scheme in the datastore is based on time stamps and setting an earlier time makes data appear out of date causing many transactions to fail.

Was this page helpful? Yes No Submitting... Thank you

Comments

  1. Michael Moreno

    Setting the system timezone is incomplete

    [root@london01 ~]# tzdata-update
    [root@london01 ~]# date
    Thu Oct 29 11:17:27 EDT 2015
    [[root@london01 ~]# exit

    -> if you go back to tideway user, and run date here
    -> [tideway@london01 ~]$ date
    -> it would still give the old date
    -> Thu Oct 29 11:17:27 EDT 2015
    -> You need to exit from tideway and login again to see the new data
    -> Another issue is that it is displaying time in UTC and not local time like AEDT
    -> I would add the following to the .bash_profile
    -> export TZ=<COUNTRY>/<CITY>
    -> i.e. export TZ=Australia/Melbourne
    -> If I don't do this, running date will show UTC time

    [tideway@london01 ~]$ sudo /sbin/service tideway restart

    Feb 19, 2017 07:02
  2. Andrew Waters

    This is wrong - the issue is actually that Red Hat broken permissions on /etc/localtime. Doing chmod 644 /etc/localtime should fix the problem. Do not put this in .bash_profile.

    Feb 20, 2017 01:03