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
On serverb, create a new lab-profile Authselect profile based on the existing sssd profile.
Log in to serverb then become the root user.
[student@workstation ~]$ssh root@serverb[student@serverb ~]$sudo -i[root@serverb ~]#
Create a new lab-profile Authselect profile based on the existing sssd profile.
[root@serverb ~]#authselect create-profile lab-profile \>-b sssd --symlink-metaNew profile was created at /etc/authselect/custom/lab-profile
Your serverb machine has been relocated to Suriname in South America.
Set the appropriate time zone.
Identify the correct time zone for Suriname/South America.
[root@serverb ~]#tzselectPlease 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...#?2Please 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...#?46The 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#?1You 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
Change the time zone to America/Paramaribo.
[root@serverb ~]#timedatectl set-timezone America/Paramaribo
Enable NTP synchronization on the serverb system and use classroom.example.com as the time source.
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 iburstserver classroom.example.com iburst...output omitted...
Restart and enable the chronyd service.
[root@serverb ~]#systemctl restart chronyd[root@serverb ~]#systemctl enable chronyd
Enable NTP synchronization on serverb.
[root@serverb ~]#timedatectl set-ntp true
Confirm that the clock on serverb is synchronized with classroom.example.com.
Verify the clock synchronization status.
[root@serverb ~]#timedatectl...output omitted... System clock synchronized: yes ...output omitted...
Confirm that classroom.example.com is the time source for clock synchronization on serverb.
[root@serverb ~]#chronyc sources -v210 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.com8 6 37 51 -25ns[-703us] +/- 128us
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.
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...
Verify that Python 2.7 is available.
[root@serverb ~]#python2 -VPython 2.7.15
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...
Verify that Python 3.6 is available.
[root@serverb ~]#python3 -VPython 3.6.8
Use the alternatives command to point /usr/bin/python to /usr/bin/python3.
[root@serverb ~]#alternatives --config pythonThere 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
Verify that the python command uses Python 3.6.
[root@serverb ~]#python -VPython 3.6.8
Log off from serverb.
[root@serverb ~]#exit[student@serverb ~]$exit[student@workstation ~]$
Run the lab core-review grade command on workstation to grade your work.
This concludes the lab.