Linux Basic configuration

  Linux

NTP Server : Configure NTP Server (NTPd)

Install NTP

root@xshqs02:~# apt-get install ntp

root@xshqs02:~# vim /etc/ntp.conf

# line 21 : comment out default settings and add NTP Servers for your timezone

# line 51 : add network range you allow to receive time syncing requests from clients

Verify OK

NTP Server : Configure NTP Server (Chrony)

root@xshqs02:~# apt -y install chrony

# line 20 : comment out default settings and add NTP Servers for your timezone

# add to the end : add network range you allow to receive time syncing requests from clients

root@xshqs02:~# systemctl restart chrony

Verify OK

Configure NTP Client

root@XSHQS01:~# vim /etc/systemd/timesyncd.conf

add to the end : set NTP server for your timezone

NTP=192.168.108.128

Tested OK

root@XSHQS01:~# systemctl restart systemd-timesyncd
root@XSHQS01:~# timedatectl timesync-status
Server: 192.168.108.128 (192.168.108.128)
Poll interval: 32

For [su] command restriction, set like follows.

root@localhost:~# vi /etc/pam.d/su
# line 15 : uncomment and add a group which is allow to run [su] command
auth required pam_wheel.so group=adm
# add an user you allowed to run [su] to the group you set above
root@localhost:~# usermod -aG adm ubuntu

RHEL config  repository, edit /etc/yum.conf

[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3

PUT YOUR REPOS HERE OR IN separate files named file.repo

in /etc/yum.repos.d

LEAVE A COMMENT