CentOS: Difference between revisions
→NFS: one more link |
→NFS: instructions for server & clients Tag: visualeditor |
||
(7 intermediate revisions by the same user not shown) | |||
Line 10: | Line 10: | ||
|- | |- | ||
| style="width: 50%;" | Install byobu | | style="width: 50%;" | Install byobu | ||
| style="width: 50%;" | | style="width: 50%;" class="cli" | yum -y install epel-release<br>yum -y install byobu | ||
|- | |- | ||
| style="width: 50%;" | Enable byobu | | style="width: 50%;" | Enable byobu | ||
| style="width: 50%;" | | style="width: 50%;" class="cli" | byobu-enable | ||
|- | |- | ||
| style="width: 50%;" | Enable NTP | | style="width: 50%;" | Enable NTP | ||
| style="width: 50%;" | | style="width: 50%;" class="cli" | yum install -y ntp<br>systemctl enable ntpd<br>systemctl start ntpd | ||
|- | |- | ||
| style="width: 50%;" | Synchronize with NTP server | | style="width: 50%;" | Synchronize with NTP server | ||
| style="width: 50%;" | | style="width: 50%;" class="cli" | systemctl stop ntpd<br>ntpdate pool.ntp.org<br>systemctl start ntpd | ||
|- | |- | ||
| style="width: 50%;" | Check date & time and NTP status | | style="width: 50%;" | Check date & time and NTP status | ||
| style="width: 50%;" | | style="width: 50%;" class="cli" | timedatectl | ||
|} | |} | ||
Line 33: | Line 33: | ||
|- | |- | ||
| style="width: 50%;" | Install SETools and SETroubleshoot | | style="width: 50%;" | Install SETools and SETroubleshoot | ||
| style="width: 50%;" | | style="width: 50%;" class="cli" | yum install setroubleshoot setools | ||
|- | |- | ||
| style="width: 50%;" | Analyze the audit log used by SELinux | | style="width: 50%;" | Analyze the audit log used by SELinux | ||
| style="width: 50%;" | | style="width: 50%;" class="cli" | sealert -a /var/log/audit/audit.log | ||
|} | |} | ||
Line 50: | Line 50: | ||
https://www.howtoforge.com/nfs-server-and-client-on-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에서만 가능 -- 윈도우는 아직 지원하지 않음) | |||
<syntaxhighlight lang="bash"> | |||
# 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 | |||
</syntaxhighlight>/etc/exports<syntaxhighlight lang="cfg"> | |||
/mnt/nfs_shares/docs 192.168.2.103(rw,sync,no_all_squash,root_squash) | |||
</syntaxhighlight>make exports stick on the server and open appropriate ports<syntaxhighlight lang="bash"> | |||
# 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 | |||
</syntaxhighlight> | |||
=== 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 == | |||
* [http://lifeofageekadmin.com/build-rpms-centos/ Making RPM package] | |||
== Partition == | |||
* [https://www.rootusers.com/lvm-resize-how-to-increase-an-lvm-partition/ Resize LVM partitions] | |||
== Firewall == | |||
[http://ask.xmodulo.com/open-port-firewall-centos-rhel.html Opening ports] |
Latest revision as of 09:20, 7 October 2022
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