CentOS

From Han Wiki
Jump to navigation Jump to search

RHEL 7 Documentation

NTP

Description Command
Install byobu yum -y install epel-release
yum -y install byobu
Enable byobu byobu-enable
Enable NTP yum install -y ntp
systemctl enable ntpd
systemctl start ntpd
Synchronize with NTP server systemctl stop ntpd
ntpdate pool.ntp.org
systemctl start ntpd
Check date & time and NTP status timedatectl

SELinux

Description Command
Install SETools and SETroubleshoot yum install setroubleshoot setools
Analyze the audit log used by SELinux sealert -a /var/log/audit/audit.log

Installing Plex

https://linode.com/docs/applications/media-servers/install-plex-media-server-on-centos-7/

https://forums.plex.tv/discussion/164112/plex-media-server-on-minimal-centos-7-0

NFS

https://www.unixmen.com/setting-nfs-server-client-centos-7/

https://www.howtoforge.com/nfs-server-and-client-on-centos-7

Mounting on Windows: https://graspingtech.com/mount-nfs-share-windows-10/

  • Not recommended for transferring files in Korean -- use SMB instead. Windows 에서 NFS를 통해 한글 파일 이름이 바르게 지원되지 않습니다 (NFSv4.1에서만 가능 -- 윈도우는 아직 지원하지 않음)
# dnf install nfs-utils -y
# systemctl enable nfs-server
# systemctl start nfs-server
# rpcinfo -p | grep nfs // check version number
# chown -R nobody: /mnt/nfs_shares/docs
# chmod -R 777 /mnt/nfs_shares/docs
# systemctl restart nfs-utils

/etc/exports

/mnt/nfs_shares/docs    192.168.2.103(rw,sync,no_all_squash,root_squash)

make exports stick on the server and open appropriate ports

# exportfs -arv
# exportfs -s
# firewall-cmd --permanent --add-service=nfs
# firewall-cmd --permanent --add-service=rpc-bind
# firewall-cmd --permanent --add-service=mountd
# firewall-cmd --reload

On client machine

on CentOS/RHEL, dnf install nfs-utils nfs4-acl-tools, and on Debian-based distros, apt install nfs-common nfs4-acl-tools -y

$ showmount -e 192.168.2.102

$ sudo mkdir -p /mnt/client_share

$ sudo mount -t nfs 192.168.2.102:/mnt/nfs_shares/docs /mnt/client_share

to make it permanent upon a reboot

update /etc/fstab

192.168.2.102:/mnt/nfs_shares/docs  /mnt/client_share  nfs  defaults  0  0

RPM

Partition

Firewall

Opening ports