I think there is an issue with Syntax which you are using.
first when you are configuring an yum server, first copy the Packages to directory /var/ftp/pub/
Secondly, once it is done, run the comman createrepo -v /var/ftp/pub/
Thirdly, go to: vim /etc/yum.repos.d/(filename).repo
in this file,
baseurl=file://(link where the packages are located)
(then save and quit)
then run the command
yum clean all
& yum list all
If you follow this steps you will able to configure the yum server.