SlideShare a Scribd company logo
1 of 3
Download to read offline
Basic NFS Configuration
In this config will guide you trough a quick and basic configuration of NFS server on RHEL7
Linux system. We do not take any security concerns into the consideration, nor we will be
concerned with fine tuning and access control. In our scenario we define two hosts:
 NFS Server, IP 10.1.1.100
 NFS Client, IP 10.1.1.18
Assuming your already have a running Redhat 7 Linux system in order to setup NFS server you
will need to install few additional packages:
NFS Server configuration
Run the below commands to begin the NFS Server installation:
[nfs-server ]# yum install nfs-utils rpcbind
Next we export some arbitrary directory called /opt/nfs. Create /opt/nfs directory:
[nfs-server ]# mkdir -p /opt/nfs
and edit /etc/exports NFS exports file to add the below line while replacing the IP address
10.1.1.18 with the IP address of your client:
/opt/nfs 10.1.1.18(no_root_squash,rw,sync)
Next make sure to enable 2049 port on your firewall to allow clients requests:
[nfs-server ]# firewall-cmd --zone=public --add-port=2049/tcp --permanent
[nfs-server ]# firewall-cmd --reload
Start rpcbind daemon and NFS server in this order:
[nfs-server ]# service rpcbind start; service nfs start
Check the NFS server status:
[nfs-server ]# service nfs status
nfs-server.service - NFS Server
Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; disabled)
Active: active (exited) since Thu 2014-12-11 08:12:46 EST; 23s ago
Process: 2780 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS $RPCNFSDCOUNT
(code=exited, status=0/SUCCESS)
Process: 2775 ExecStartPre=/usr/sbin/exportfs -r (code=exited,
status=0/SUCCESS)
Process: 2773 ExecStartPre=/usr/libexec/nfs-utils/scripts/nfs-
server.preconfig (code=exited, status=0/SUCCESS)
Main PID: 2780 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/nfs-server.service
NFS Client configuration
To be able to mount NFS exported directories on your client the following packages needs to be
installed. Depending on your client's Linux distribution the installation procedure may be
different. On Redhat 7 Linux the installation steps are as follows:
[nfs-client ]# yum install nfs-utils rpcbind
[nfs-client ]# service rpcbind start
What remains is to create a mount point directory eg. /mnt/nfs and mount previously NFS
exported /opt/nfs directory:
[nfs-client ]# mkdir -p /mnt/nfs
[nfs-client ]# mount 10.1.1.110:/opt/nfs /mnt/nfs/
Test correctness of our setup between NFS Server and NFS client. Create an arbitrary file within
NFS mounted directory on the client side:
[nfs-client ]# cd /mnt/nfs/
[nfs-client ]# touch NFS.test
[nfs-client ]# ls -l
total 0
-rw-r--r--. 1 root root 0 Dec 11 08:13 NFS.test
Move the the server side and check whether our newly NFS.test file exists:
[nfs-server ]# cd /opt/nfs/
[nfs-server ]# ls -l
total 0
-rw-r--r--. 1 root root 0 Dec 11 08:13 NFS.test
Configuring permanent NFS mount
Now that we have a basic NFS configuration on RHEL7 Linux system done, next we can add
additional settings such as server persistence and permanent client mount using /etc/fstab. In
order to have our NFS exports permanently available after the NFS server system reboot we need
to make sure that nfs service starts after reboot:
[nfs-server ]# systemctl enable nfs-server
ln -s '/usr/lib/systemd/system/nfs-server.service'
'/etc/systemd/system/nfs.target.wants/nfs-server.service'
To allow client to mount NFS exported directory permanently after reboot we need to define a
mount procedure within /etc/fstab config file. Open /etc/fstab file and add the following
line:
10.1.1.110:/opt/nfs /mnt/nfs nfs defaults 0 0
Mount User Home Directory
In the following steps we will export a user home directory /home/rhel7. Since NFS needs full
access privileges to access /home/rhel7:
[nfs-server ]# ls -ld /home/rhel7/
drwx------. 2 rhel7 rhel7 59 Jul 17 14:22 /home/rhel7/
we will bind it to a new directory:
[nfs-server ]# mkdir -p /exports/rhel7
[nfs-server ]# mount --bind /home/rhel7/ /exports/rhel7/
To make the above permanent add the following line into your /etc/fstab file:
/home/rhel7 /exports/rhel7 none bind 0 0
Next, add another export line into /etc/exports file:
/exports/rhel7 10.1.1.18(no_root_squash,rw,sync)
Re-export all NFS directories:
[nfs-server ]# exportfs -ra
What has left is to mount the above user directory using our client host:
[nfs-client ]# mount 10.1.1.110:/exports/rhel7 /mnt/rhel7/
[nfs-client ]# cd /mnt/rhel7/
[nfs-client ]# ls
[nfs-client ]# touch RHEL7-test-nfs
[nfs-client ]# ls
RHEL7-test-nfs
Confirm that the file RHEL7-test-nfs exists on NFS server:
# ls -l /home/rhel7/
total 0
-rw-r--r--. 1 root root 0 Dec 11 09:13 RHEL7-test-nfs

More Related Content

What's hot

Linux one sles12sp3 installation lpar
Linux one   sles12sp3 installation lparLinux one   sles12sp3 installation lpar
Linux one sles12sp3 installation lparAditya Banuaji
 
Presentation Linux Server setup Advance Networking
Presentation   Linux Server setup Advance NetworkingPresentation   Linux Server setup Advance Networking
Presentation Linux Server setup Advance NetworkingTariqul Islam Shohag
 
บล๊อกเวปไซท์ บน Open WRT หรือ บน Ubiquiti NanoStation M5 หรือ บน airOS
บล๊อกเวปไซท์ บน Open WRT หรือ บน  Ubiquiti NanoStation M5 หรือ บน airOSบล๊อกเวปไซท์ บน Open WRT หรือ บน  Ubiquiti NanoStation M5 หรือ บน airOS
บล๊อกเวปไซท์ บน Open WRT หรือ บน Ubiquiti NanoStation M5 หรือ บน airOSTũi Wichets
 
2 how to-build_document_management_system
2 how to-build_document_management_system2 how to-build_document_management_system
2 how to-build_document_management_systemKichiemon Adachi
 
gcis-zenworks7.2
gcis-zenworks7.2gcis-zenworks7.2
gcis-zenworks7.2KARLY21
 
Install BIND9 on Ubuntu Server 12.04 LTS
Install BIND9 on Ubuntu Server 12.04 LTSInstall BIND9 on Ubuntu Server 12.04 LTS
Install BIND9 on Ubuntu Server 12.04 LTSMohd Khairulazam
 
SquirrelMail for webmail
SquirrelMail for webmailSquirrelMail for webmail
SquirrelMail for webmailAryman Gautam
 
Configuration of NTP Server on CentOS 8
Configuration of NTP Server on CentOS 8Configuration of NTP Server on CentOS 8
Configuration of NTP Server on CentOS 8Kaan Aslandağ
 
Snort296x centos6x 2
Snort296x centos6x 2Snort296x centos6x 2
Snort296x centos6x 2Trinh Tuan
 
How To Deploy A Cloud Based Webserver in 5 minutes - LAMP
How To Deploy A Cloud Based Webserver in 5 minutes - LAMPHow To Deploy A Cloud Based Webserver in 5 minutes - LAMP
How To Deploy A Cloud Based Webserver in 5 minutes - LAMPMatt Dunlap
 
Tutorial CentOS 5 untuk Webhosting
Tutorial CentOS 5 untuk WebhostingTutorial CentOS 5 untuk Webhosting
Tutorial CentOS 5 untuk WebhostingBeni Krisbiantoro
 
Building a moat bastion server
Building a moat   bastion serverBuilding a moat   bastion server
Building a moat bastion servernseemiller
 
Anthony McKeown Drupal Presentation
Anthony McKeown Drupal PresentationAnthony McKeown Drupal Presentation
Anthony McKeown Drupal PresentationTony McKeown
 

What's hot (20)

Linux one sles12sp3 installation lpar
Linux one   sles12sp3 installation lparLinux one   sles12sp3 installation lpar
Linux one sles12sp3 installation lpar
 
Firewalld LAB
Firewalld LABFirewalld LAB
Firewalld LAB
 
Presentation Linux Server setup Advance Networking
Presentation   Linux Server setup Advance NetworkingPresentation   Linux Server setup Advance Networking
Presentation Linux Server setup Advance Networking
 
Its3 Drupal
Its3 DrupalIts3 Drupal
Its3 Drupal
 
Modul server debian 5
Modul server debian 5Modul server debian 5
Modul server debian 5
 
Ftp configuration
Ftp configurationFtp configuration
Ftp configuration
 
บล๊อกเวปไซท์ บน Open WRT หรือ บน Ubiquiti NanoStation M5 หรือ บน airOS
บล๊อกเวปไซท์ บน Open WRT หรือ บน  Ubiquiti NanoStation M5 หรือ บน airOSบล๊อกเวปไซท์ บน Open WRT หรือ บน  Ubiquiti NanoStation M5 หรือ บน airOS
บล๊อกเวปไซท์ บน Open WRT หรือ บน Ubiquiti NanoStation M5 หรือ บน airOS
 
Step by-step installation of a secure linux web dns- and mail server
Step by-step installation of a secure linux web  dns- and mail serverStep by-step installation of a secure linux web  dns- and mail server
Step by-step installation of a secure linux web dns- and mail server
 
Apache1.ppt
Apache1.pptApache1.ppt
Apache1.ppt
 
2 how to-build_document_management_system
2 how to-build_document_management_system2 how to-build_document_management_system
2 how to-build_document_management_system
 
gcis-zenworks7.2
gcis-zenworks7.2gcis-zenworks7.2
gcis-zenworks7.2
 
Install BIND9 on Ubuntu Server 12.04 LTS
Install BIND9 on Ubuntu Server 12.04 LTSInstall BIND9 on Ubuntu Server 12.04 LTS
Install BIND9 on Ubuntu Server 12.04 LTS
 
SquirrelMail for webmail
SquirrelMail for webmailSquirrelMail for webmail
SquirrelMail for webmail
 
Configuration of NTP Server on CentOS 8
Configuration of NTP Server on CentOS 8Configuration of NTP Server on CentOS 8
Configuration of NTP Server on CentOS 8
 
Snort296x centos6x 2
Snort296x centos6x 2Snort296x centos6x 2
Snort296x centos6x 2
 
How To Deploy A Cloud Based Webserver in 5 minutes - LAMP
How To Deploy A Cloud Based Webserver in 5 minutes - LAMPHow To Deploy A Cloud Based Webserver in 5 minutes - LAMP
How To Deploy A Cloud Based Webserver in 5 minutes - LAMP
 
Tutorial CentOS 5 untuk Webhosting
Tutorial CentOS 5 untuk WebhostingTutorial CentOS 5 untuk Webhosting
Tutorial CentOS 5 untuk Webhosting
 
Building a moat bastion server
Building a moat   bastion serverBuilding a moat   bastion server
Building a moat bastion server
 
Linux
LinuxLinux
Linux
 
Anthony McKeown Drupal Presentation
Anthony McKeown Drupal PresentationAnthony McKeown Drupal Presentation
Anthony McKeown Drupal Presentation
 

Similar to Nfs

Server configuration
Server configurationServer configuration
Server configurationAisha Talat
 
Free ipa installation and cluster configuration, freeipa client connection
Free ipa installation and cluster configuration, freeipa client connectionFree ipa installation and cluster configuration, freeipa client connection
Free ipa installation and cluster configuration, freeipa client connectionRustam Sariyev
 
NFS is an excellent way of sharing files between linux and other unix systems
NFS is an excellent way of sharing files between linux and other unix systemsNFS is an excellent way of sharing files between linux and other unix systems
NFS is an excellent way of sharing files between linux and other unix systemsAshish Mamgain
 
Linux network file system (nfs)
Linux   network file system (nfs)Linux   network file system (nfs)
Linux network file system (nfs)Raghu nath
 
Network File System (NFS)
Network File System (NFS)Network File System (NFS)
Network File System (NFS)abdullah roomi
 
LinuxKit Swarm Nodes
LinuxKit Swarm NodesLinuxKit Swarm Nodes
LinuxKit Swarm NodesMoby Project
 
Membangun web server,_e-mail_server_dan_ftp_server
Membangun web server,_e-mail_server_dan_ftp_serverMembangun web server,_e-mail_server_dan_ftp_server
Membangun web server,_e-mail_server_dan_ftp_serverIwan Kurniarasa
 
Network file system (nfs)
Network file system (nfs)Network file system (nfs)
Network file system (nfs)Raghu nath
 
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLESQuick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLESJan Kalcic
 
Free radius billing server with practical vpn exmaple
Free radius billing server with practical vpn exmapleFree radius billing server with practical vpn exmaple
Free radius billing server with practical vpn exmapleChanaka Lasantha
 
Relax and Recover on POWER (Updated 05-2017)
Relax and Recover on POWER (Updated 05-2017)Relax and Recover on POWER (Updated 05-2017)
Relax and Recover on POWER (Updated 05-2017)Sebastien Chabrolles
 
Graphing Nagios services with pnp4nagios
Graphing Nagios services with pnp4nagiosGraphing Nagios services with pnp4nagios
Graphing Nagios services with pnp4nagiosjasonholtzapple
 
HP-UX 11iv3 Ignite-UX with NFSv4 and SSH Tunnel by Dusan Baljevic
HP-UX 11iv3 Ignite-UX with NFSv4 and SSH Tunnel by Dusan BaljevicHP-UX 11iv3 Ignite-UX with NFSv4 and SSH Tunnel by Dusan Baljevic
HP-UX 11iv3 Ignite-UX with NFSv4 and SSH Tunnel by Dusan BaljevicCircling Cycle
 
Lamp Server With Drupal Installation
Lamp Server With Drupal InstallationLamp Server With Drupal Installation
Lamp Server With Drupal Installationfranbow
 
NGiNX, VHOSTS & SSL (let's encrypt)
NGiNX, VHOSTS & SSL (let's encrypt)NGiNX, VHOSTS & SSL (let's encrypt)
NGiNX, VHOSTS & SSL (let's encrypt)Marcel Cattaneo
 
Dru lavigne servers-tutorial
Dru lavigne servers-tutorialDru lavigne servers-tutorial
Dru lavigne servers-tutorialDru Lavigne
 
Your own minecraft server on a linode vps
Your own minecraft server on a linode vpsYour own minecraft server on a linode vps
Your own minecraft server on a linode vpsCleo Morisson
 

Similar to Nfs (20)

Server configuration
Server configurationServer configuration
Server configuration
 
Free ipa installation and cluster configuration, freeipa client connection
Free ipa installation and cluster configuration, freeipa client connectionFree ipa installation and cluster configuration, freeipa client connection
Free ipa installation and cluster configuration, freeipa client connection
 
NFS is an excellent way of sharing files between linux and other unix systems
NFS is an excellent way of sharing files between linux and other unix systemsNFS is an excellent way of sharing files between linux and other unix systems
NFS is an excellent way of sharing files between linux and other unix systems
 
Linux network file system (nfs)
Linux   network file system (nfs)Linux   network file system (nfs)
Linux network file system (nfs)
 
Network File System (NFS)
Network File System (NFS)Network File System (NFS)
Network File System (NFS)
 
LinuxKit Swarm Nodes
LinuxKit Swarm NodesLinuxKit Swarm Nodes
LinuxKit Swarm Nodes
 
Rhel3
Rhel3Rhel3
Rhel3
 
Membangun web server,_e-mail_server_dan_ftp_server
Membangun web server,_e-mail_server_dan_ftp_serverMembangun web server,_e-mail_server_dan_ftp_server
Membangun web server,_e-mail_server_dan_ftp_server
 
Network file system (nfs)
Network file system (nfs)Network file system (nfs)
Network file system (nfs)
 
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLESQuick-and-Easy Deployment of a Ceph Storage Cluster with SLES
Quick-and-Easy Deployment of a Ceph Storage Cluster with SLES
 
Free radius billing server with practical vpn exmaple
Free radius billing server with practical vpn exmapleFree radius billing server with practical vpn exmaple
Free radius billing server with practical vpn exmaple
 
Relax and Recover on POWER (Updated 05-2017)
Relax and Recover on POWER (Updated 05-2017)Relax and Recover on POWER (Updated 05-2017)
Relax and Recover on POWER (Updated 05-2017)
 
Graphing Nagios services with pnp4nagios
Graphing Nagios services with pnp4nagiosGraphing Nagios services with pnp4nagios
Graphing Nagios services with pnp4nagios
 
Samba
SambaSamba
Samba
 
HP-UX 11iv3 Ignite-UX with NFSv4 and SSH Tunnel by Dusan Baljevic
HP-UX 11iv3 Ignite-UX with NFSv4 and SSH Tunnel by Dusan BaljevicHP-UX 11iv3 Ignite-UX with NFSv4 and SSH Tunnel by Dusan Baljevic
HP-UX 11iv3 Ignite-UX with NFSv4 and SSH Tunnel by Dusan Baljevic
 
Lamp Server With Drupal Installation
Lamp Server With Drupal InstallationLamp Server With Drupal Installation
Lamp Server With Drupal Installation
 
Rac on NFS
Rac on NFSRac on NFS
Rac on NFS
 
NGiNX, VHOSTS & SSL (let's encrypt)
NGiNX, VHOSTS & SSL (let's encrypt)NGiNX, VHOSTS & SSL (let's encrypt)
NGiNX, VHOSTS & SSL (let's encrypt)
 
Dru lavigne servers-tutorial
Dru lavigne servers-tutorialDru lavigne servers-tutorial
Dru lavigne servers-tutorial
 
Your own minecraft server on a linode vps
Your own minecraft server on a linode vpsYour own minecraft server on a linode vps
Your own minecraft server on a linode vps
 

More from Md Shihab

Rhel 7 root password reset
Rhel 7 root password resetRhel 7 root password reset
Rhel 7 root password resetMd Shihab
 
RedHat/CentOs Commands for administrative works
RedHat/CentOs Commands for administrative worksRedHat/CentOs Commands for administrative works
RedHat/CentOs Commands for administrative worksMd Shihab
 
How to transfer core mode into gui in RedHat/centOs
How to transfer core mode into gui in RedHat/centOsHow to transfer core mode into gui in RedHat/centOs
How to transfer core mode into gui in RedHat/centOsMd Shihab
 
Assignment on windows firewall
Assignment on windows firewallAssignment on windows firewall
Assignment on windows firewallMd Shihab
 
Assignment on high availability(clustering)
Assignment on high availability(clustering)Assignment on high availability(clustering)
Assignment on high availability(clustering)Md Shihab
 

More from Md Shihab (12)

Maria db
Maria dbMaria db
Maria db
 
Mail
MailMail
Mail
 
Iscsi
IscsiIscsi
Iscsi
 
Dns
DnsDns
Dns
 
Dhcp
DhcpDhcp
Dhcp
 
Boot
BootBoot
Boot
 
Rhel 7 root password reset
Rhel 7 root password resetRhel 7 root password reset
Rhel 7 root password reset
 
Easy vlsm
Easy vlsmEasy vlsm
Easy vlsm
 
RedHat/CentOs Commands for administrative works
RedHat/CentOs Commands for administrative worksRedHat/CentOs Commands for administrative works
RedHat/CentOs Commands for administrative works
 
How to transfer core mode into gui in RedHat/centOs
How to transfer core mode into gui in RedHat/centOsHow to transfer core mode into gui in RedHat/centOs
How to transfer core mode into gui in RedHat/centOs
 
Assignment on windows firewall
Assignment on windows firewallAssignment on windows firewall
Assignment on windows firewall
 
Assignment on high availability(clustering)
Assignment on high availability(clustering)Assignment on high availability(clustering)
Assignment on high availability(clustering)
 

Recently uploaded

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

Nfs

  • 1. Basic NFS Configuration In this config will guide you trough a quick and basic configuration of NFS server on RHEL7 Linux system. We do not take any security concerns into the consideration, nor we will be concerned with fine tuning and access control. In our scenario we define two hosts:  NFS Server, IP 10.1.1.100  NFS Client, IP 10.1.1.18 Assuming your already have a running Redhat 7 Linux system in order to setup NFS server you will need to install few additional packages: NFS Server configuration Run the below commands to begin the NFS Server installation: [nfs-server ]# yum install nfs-utils rpcbind Next we export some arbitrary directory called /opt/nfs. Create /opt/nfs directory: [nfs-server ]# mkdir -p /opt/nfs and edit /etc/exports NFS exports file to add the below line while replacing the IP address 10.1.1.18 with the IP address of your client: /opt/nfs 10.1.1.18(no_root_squash,rw,sync) Next make sure to enable 2049 port on your firewall to allow clients requests: [nfs-server ]# firewall-cmd --zone=public --add-port=2049/tcp --permanent [nfs-server ]# firewall-cmd --reload Start rpcbind daemon and NFS server in this order: [nfs-server ]# service rpcbind start; service nfs start Check the NFS server status: [nfs-server ]# service nfs status nfs-server.service - NFS Server Loaded: loaded (/usr/lib/systemd/system/nfs-server.service; disabled) Active: active (exited) since Thu 2014-12-11 08:12:46 EST; 23s ago Process: 2780 ExecStart=/usr/sbin/rpc.nfsd $RPCNFSDARGS $RPCNFSDCOUNT (code=exited, status=0/SUCCESS) Process: 2775 ExecStartPre=/usr/sbin/exportfs -r (code=exited, status=0/SUCCESS) Process: 2773 ExecStartPre=/usr/libexec/nfs-utils/scripts/nfs- server.preconfig (code=exited, status=0/SUCCESS) Main PID: 2780 (code=exited, status=0/SUCCESS) CGroup: /system.slice/nfs-server.service NFS Client configuration To be able to mount NFS exported directories on your client the following packages needs to be installed. Depending on your client's Linux distribution the installation procedure may be different. On Redhat 7 Linux the installation steps are as follows: [nfs-client ]# yum install nfs-utils rpcbind [nfs-client ]# service rpcbind start What remains is to create a mount point directory eg. /mnt/nfs and mount previously NFS exported /opt/nfs directory:
  • 2. [nfs-client ]# mkdir -p /mnt/nfs [nfs-client ]# mount 10.1.1.110:/opt/nfs /mnt/nfs/ Test correctness of our setup between NFS Server and NFS client. Create an arbitrary file within NFS mounted directory on the client side: [nfs-client ]# cd /mnt/nfs/ [nfs-client ]# touch NFS.test [nfs-client ]# ls -l total 0 -rw-r--r--. 1 root root 0 Dec 11 08:13 NFS.test Move the the server side and check whether our newly NFS.test file exists: [nfs-server ]# cd /opt/nfs/ [nfs-server ]# ls -l total 0 -rw-r--r--. 1 root root 0 Dec 11 08:13 NFS.test Configuring permanent NFS mount Now that we have a basic NFS configuration on RHEL7 Linux system done, next we can add additional settings such as server persistence and permanent client mount using /etc/fstab. In order to have our NFS exports permanently available after the NFS server system reboot we need to make sure that nfs service starts after reboot: [nfs-server ]# systemctl enable nfs-server ln -s '/usr/lib/systemd/system/nfs-server.service' '/etc/systemd/system/nfs.target.wants/nfs-server.service' To allow client to mount NFS exported directory permanently after reboot we need to define a mount procedure within /etc/fstab config file. Open /etc/fstab file and add the following line: 10.1.1.110:/opt/nfs /mnt/nfs nfs defaults 0 0 Mount User Home Directory In the following steps we will export a user home directory /home/rhel7. Since NFS needs full access privileges to access /home/rhel7: [nfs-server ]# ls -ld /home/rhel7/ drwx------. 2 rhel7 rhel7 59 Jul 17 14:22 /home/rhel7/ we will bind it to a new directory: [nfs-server ]# mkdir -p /exports/rhel7 [nfs-server ]# mount --bind /home/rhel7/ /exports/rhel7/ To make the above permanent add the following line into your /etc/fstab file: /home/rhel7 /exports/rhel7 none bind 0 0 Next, add another export line into /etc/exports file: /exports/rhel7 10.1.1.18(no_root_squash,rw,sync) Re-export all NFS directories: [nfs-server ]# exportfs -ra What has left is to mount the above user directory using our client host: [nfs-client ]# mount 10.1.1.110:/exports/rhel7 /mnt/rhel7/ [nfs-client ]# cd /mnt/rhel7/ [nfs-client ]# ls [nfs-client ]# touch RHEL7-test-nfs [nfs-client ]# ls
  • 3. RHEL7-test-nfs Confirm that the file RHEL7-test-nfs exists on NFS server: # ls -l /home/rhel7/ total 0 -rw-r--r--. 1 root root 0 Dec 11 09:13 RHEL7-test-nfs