Bookmark this page

Lab: Adapting to Core System Changes

Performance Checklist

In this lab, you will make changes to user authentication, configure NTP time synchronization, and adjust the Python configuration on a server.

Outcomes

You should be able to configure identity and authorization parameters with the new Authselect tool, including to configure the serverb system to use the time zone appropriate for Suriname, configure chronyd on serverb to use the NTP server running on classroom.example.com as a time source, and ensure that both Python 3 and Python 2 are installed on a server.

Log in to workstation as student using student as the password.

On workstation, run the lab core-review start command.

[student@workstation ~]$ lab core-review start
  1. On serverb, create a new lab-profile Authselect profile based on the existing sssd profile.

    1. Log in to serverb then become the root user.

      [student@workstation ~]$ ssh root@serverb
      [student@serverb ~]$ sudo -i
      [root@serverb ~]# 
    2. Create a new lab-profile Authselect profile based on the existing sssd profile.

      [root@serverb ~]# authselect create-profile lab-profile \
      > -b sssd --symlink-meta
      New profile was created at /etc/authselect/custom/lab-profile
  2. Your serverb machine has been relocated to Suriname in South America. Set the appropriate time zone.

    1. Identify the correct time zone for Suriname/South America.

      [root@serverb ~]# tzselect
      Please identify a location so that time zone rules can be set correctly.
      Please select a continent, ocean, "coord", or "TZ".
       1) Africa
       2) Americas
      ...output omitted...
      #? 2
      Please select a country whose clocks agree with yours.
      ...output omitted...
       9) Brazil            27) Guyana             45) St Vincent
      10) Canada            28) Haiti              46) Suriname
      11) Caribbean NL      29) Honduras           47) Trinidad & Tobago
      ...output omitted...
      #? 46
      
      The following information has been given:
      
        Suriname
      
      Therefore TZ='America/Paramaribo' will be used.
      Selected time is now:	Tue Feb 19 18:51:03 -03 2019.
      Universal Time is now:	Tue Feb 19 21:51:03 UTC 2019.
      Is the above information OK?
      1) Yes
      2) No
      #? 1
      
      You can make this change permanent for yourself by appending the line
      	TZ='America/Paramaribo'; export TZ
      to the file '.profile' in your home directory; then log out and log in again.
      
      Here is that TZ value again, this time on standard output so that you
      can use the /usr/bin/tzselect command in shell scripts:
      America/Paramaribo
    2. Change the time zone to America/Paramaribo.

      [root@serverb ~]# timedatectl set-timezone America/Paramaribo
  3. Enable NTP synchronization on the serverb system and use classroom.example.com as the time source.

    1. Configure chronyd to synchronize the time on serverb with classroom.example.com. Edit /etc/chrony.conf to include the following configuration file excerpt:

      # Use public servers from the pool.ntp.org project.
      # Please consider joining the pool (http://www.pool.ntp.org/join.html).
      # pool 2.rhel.pool.ntp.org iburst
      server classroom.example.com iburst
      ...output omitted...
    2. Restart and enable the chronyd service.

      [root@serverb ~]# systemctl restart chronyd
      [root@serverb ~]# systemctl enable chronyd
    3. Enable NTP synchronization on serverb.

      [root@serverb ~]# timedatectl set-ntp true
  4. Confirm that the clock on serverb is synchronized with classroom.example.com.

    1. Verify the clock synchronization status.

      [root@serverb ~]# timedatectl
      ...output omitted...
      System clock synchronized: yes
      ...output omitted...
      
    2. Confirm that classroom.example.com is the time source for clock synchronization on serverb.

      [root@serverb ~]# chronyc sources -v
      210 Number of sources = 1
      
        .-- Source mode  '^' = server, '=' = peer, '#' = local clock.
       / .- Source state '*' = current synced, '+' = combined , '-' = not combined,
      | /   '?' = unreachable, 'x' = time may be in error, '~' = time too variable.
      ||                                                 .- xxxx [ yyyy ] +/- zzzz
      ||                                                /   xxxx = adjusted offset,
      ||         Log2(Polling interval) -.             |    yyyy = measured offset,
      ||                                  \            |    zzzz = estimated error.
      ||                                   |           |
      MS Name/IP address         Stratum Poll Reach LastRx Last sample
      ===============================================================================
      ^* classroom.example.com         8   6    37    51   -25ns[-703us] +/-  128us
  5. On serverb, install Python 2.7 and Python 3.6, and configure the python command to point to the Python 3.6 binaries. Point /usr/bin/python to /usr/bin/python3 command.

    1. Use Yum to install Python 2.7 using the python27 module.

      [root@serverb ~]# yum module install python27
      ...output omitted...
      Is this ok [y/N]: y
      ...output omitted...
    2. Verify that Python 2.7 is available.

      [root@serverb ~]# python2 -V
      Python 2.7.15
    3. Use Yum to install Python 3.6 using the python36 module.

      [root@serverb ~]# yum module install python36
      ...output omitted...
      Is this ok [y/N]: y
      ...output omitted...
    4. Verify that Python 3.6 is available.

      [root@serverb ~]# python3 -V
      Python 3.6.8
    5. Use the alternatives command to point /usr/bin/python to /usr/bin/python3.

      [root@serverb ~]# alternatives --config python
      There are 3 programs which provide 'python'.
      
        Selection    Command
      -----------------------------------------------
      *+ 1           /usr/libexec/no-python
         2           /usr/bin/python2
         3           /usr/bin/python3
      
      Enter to keep the current selection[+], or type selection number: 3
    6. Verify that the python command uses Python 3.6.

      [root@serverb ~]# python -V
      Python 3.6.8
    7. Log off from serverb.

      [root@serverb ~]# exit
      [student@serverb ~]$ exit
      [student@workstation ~]$ 
  6. Run the lab core-review grade command on workstation to grade your work.

Finish

On workstation, run lab core-review finish to clean up any resources created for this exercise.

[student@workstation ~]$ lab core-review finish

This concludes the lab.

Revision: rh354-8.0-0e36520