You're asking two different questions.
Does my dev server need to be exactly like my production server?
No.
You can do your development on whatever you want, and then deploy that code to whatever production environment you'd like.
Should my dev server be exactly like my production server?
Yes. - It makes life much easer.
If your development and production environments are different you will eventually have the "It works on my machine" developer moment, where some developer (maybe even you) writes (and hopefully extensively tests) some code on the development machine, then deploys it into production and it breaks horribly (missing/mismatched library versions, a different interpreter, package differences between the two systems, binaries not where the app expects them to be, etc.).
This means you'll spend hours (maybe days) re-writing parts of your code to deal with the fact that production isn't like the machine you developed on. Then one day you'll be in a release crunch and hacks start slipping in - if (is_production) { A } else { B }
- and someone later will see that and think it's acceptable.
Your code quickly spirals into an unmaintainable mess, and your only option is Seppuku.
Bottom line?
Spare yourself the pain, suffering, and ritual disemboweling and try to develop and test on the same platform you're eventually going to deploy to.