Is it ok to have one wordpress installation for server.com and www.server.com?

This is something you can do with your DNS / Domain Name Host.

You choose in WordPress (WP-Admin > Settings > General ) if you want to use www.somename.com or just somename.com

enter image description here

If you login in to your Domain Name Host (I use 123-reg) then look for Manage DNS CNAME / A / TXT records

You can see on this screen I have an @ and www A Record which are both pointing to the same Destination IP Address.

enter image description here
The @ and the www A records are your www.somename.com or just somename.com