Install Samba On CentOS
How do I use samba as file server?
Samba is a free software re-implementation of SMB/CIFS networking. Windows XP/2000 use samba as file server. It runs on both Linux and UNIX oses. 
First install samba on Linux using yum command:
 # yum install samba samba-client samba-common
# chkconfig smb –level 345 on
# chkconfig smb on
# /etc/init.d/smb start
  
How do I use NFS as file server?
Network File System (NFS), a protocol originally developed by Sun Microsystems in 1984. NFS server use to share files and directories from Linux system to rest of UNIX/Linux and Windows (using MS- UNIX services or third party tools) workstation.
First install NFS on Linux using yum command:# yum install nfslock portmap nfs