The differences and similarities of different stories to the book with require its own series of blog posts, will do that some other time.
For now, I will focus on the similarities between the two series:
1. Friendship plays an important role: be it Frodo and Samwise or Harry, Ron and Hermoine.
2. Or even Merry and Pip vs Fred and George. These two even seem similar in chatacters: pranksters yet loyal and important.
3. Nightriders and Dementors: they are creatures which are neither dead or alive and suck all joy and bring out a coldness. They can make a person worse tgan dead.
4. Gandalf vs Dumbledore. The wizened powerful wizards who are mentors to protagonists even look so similar.
5. Sauron vs Voldemort: both are dark wizards gone wrong who don't have their own form and fullpower and are trying to regain it. Both are severely feared and manipulative. Both are too powerful even in their formless form.
6. The ring vs the locket horcrux: it changes the nature of the person. It sucks the power out of the person and tries to take control over the person.
7. Protagonists need to destroy the sources of power of these dark wizards and embark tough journeys for the same.
8. Gollum vs Kreacher: similar looking elves.
The two classics are very different of course but have sufficient similarities to feel that maybe the origins of Harry Potter started with LOTR.