From 0b2e15b7e50cc5f8d79494544427a3d5ec8eb707 Mon Sep 17 00:00:00 2001 From: Hugh Ratsch Date: Sun, 16 Feb 2025 16:31:20 -0600 Subject: [PATCH] updated notes --- src/rhcsa.md | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/src/rhcsa.md b/src/rhcsa.md index bdd470c..61f3572 100644 --- a/src/rhcsa.md +++ b/src/rhcsa.md @@ -505,7 +505,7 @@ sudo dnf install nfs-utils # Install the NFS utilities sudo nano /etc/exports # Edit the exports file # Add the following line to the exports file: -/mnt/nfs # The directory to export +/mnt/nfs 192.168.1.0/24(rw,sync,no_subtree_check) # The directory to export sudo exportfs -r # Export the NFS shares sudo exportfs # Display the NFS shares @@ -517,6 +517,45 @@ sudo systemctl start nfs-server # Start the NFS server ```bash sudo dnf install nfs-utils # Install the NFS utilities +sudo nano /etc/fstab # Edit the fstab file + +# Add the following line to the fstab file: +192.168.1.1:/mnt/nfs /mnt/nfs nfs defaults 0 0 + +sudo mount -a # Mount the NFS shares + sudo mount 192.168.1.1:/mnt/nfs /mnt/nfs # Mount the NFS share sudo umount /mnt/nfs # Unmount the NFS share +``` + +### NTP +```bash +sudo dnf install ntp # Install the NTP utilities + +sudo ntpdate time.nist.gov # Update the time +sudo ntpq -p # Display the NTP peers +sudo ntpstat # Display the NTP status + +### Timezone and Time Commands ### +sudo timedatectl set-timezone America/Chicago # Set the timezone to America/Chicago +sudo timedatectl set-time "12:00:00" # Set the time to 12:00:00 +sudo timedatectl set-ntp true # Enable the NTP service +sudo timedatectl set-ntp false # Disable the NTP service + +### chrony +```bash +sudo dnf install chrony # Install the chrony utilities + +sudo chronyc sources # Display the chrony sources +sudo chronyc tracking # Display the chrony tracking +sudo chronyc sources -v # Display the chrony sources with more detail + +sudo nano /etc/chrony.conf # Edit the chrony configuration file + +# Add the following line to the chrony configuration file: +server time.nist.gov iburst # Add the NIST time server +pool 2.rhel.pool.ntp.org iburst # Add the RHEL time server + +sudo systemctl start chronyd # Start the chrony service +sudo systemctl enable chronyd # Enable the chrony service to start on boot ``` \ No newline at end of file