Important commands for Linux administration
- Firewall/OS Patch/NFS Server configuration
OS Patching Related Commands: -
To clean up cached data -
#yum clean all
To download yum repository data to cache
#yum makecache
To refresh data from available repositories
#yum repolist
To check latest packages update which we can update
#yum check-update
To update all packages including kernel -
#yum update
If we want to exclude some packages from update like java & httpd
#yum update --exclude java,httpd
To check package information -
#yum info pkgname
To download any package
#yumdownloader pkgname
To remove any package
#yum remove pkgname
To view the history of yum transactions -
#yum history
To roll back last yum transaction -
#yum history undo transaction ID
=================================================================
1. To register linux server with your account: -
#subscription-manager register --username amiteshjsk --password ******* --auto-attach2. To mount your .iso file in linux server: -
#mount -o loop rhel-server-7.3-x86_64-dvd.iso /mnt/iso3.To set Proxy address in Linux server: -
#export http_proxy=http://192.168.11.40:8080/=================================================================
4.To configure NFS in Linux server: -
first of all, you have to make entry in /etc/exports of nfs server like:-/mnt/iso (rw,sync,no_root_squash)
Note: - /mnt/iso (desired mount which you want to share)
If you want to share mount point with onle selected host then make entry in /etc/exports like: -
/mnt/iso 192.168.11.42 (rw,sync,no_root_squash)
After that restart nfs service: -
#service nfs restart
Now you can check shared mountpoint details by below command: -
#showmount -e
Export list for MONITORING:
/mnt/iso *
now mount in client server after creating a directory
#mkdir iso
#mount -t nfs 192.168.11.41:/mnt/iso /iso
After that restart nfs service: -
#service nfs restart
Now you can check shared mountpoint details by below command: -
#showmount -e
Export list for MONITORING:
/mnt/iso *
NFS using ports 2049 TCP and 111 UDP and we need to check reachability using telnet host and port
Note- If firewall service is running then we need to add permanent ports in Firewall
#firewall-cmd --permanent --add-port=111/udp
#firewall-cmd --permanent --add-port=2049/tcp
Reload firewall service
#systemctl reload firewalld
To check firewall added port list
#firewall-cmd --list-ports
#mkdir iso
#mount -t nfs 192.168.11.41:/mnt/iso /iso
Note: - 192.168.11.41 (NFS Server IP )
No comments:
Post a Comment