Install Samba package
Check and remove any previously installed samba package
[root@server ~]# rpm -qa | grep samba
[root@server ~]# yum list installed | grep samba
If it installed, remove it using the below command
[root@server ~]# yum remove samba*
Now install samba
[root@server ~]# yum install samba* -y