Preface: I've only done this in a development environment, but I've done it twice and it worked pretty well.
I did this the default Windows method, through PC info, as if it was any other machine rename.
Googling for how to do this led me this stackoverflow question which suggests using the PowerShell (SharePoint PowerShell) command
Rename-SPServer but luckily, one astute commenter let us know that if the server has already been renamed (which I had done the first time inadvertently), that you should use
stsadm. So, it appears that
Rename-SPServer might be the
correct way to do it, but I was successful with
stsadm. Run the command:
stsadm -o renameserver -oldservername <old server name> -newservername <new server name>
Then, to make sure SharePoint is aware of all the changes, take a run through the SharePoint Products Configuration Wizard and it will clean up repair any issues. See, it even says so:
Open up your sharepoint central administration. There's a usually a start menu shortcut to it, but that one won't work until you complete this step. Just type your new server name into the address bar manually. Note that this is not the Server Farm Administration, but rather Central Administration for your SharePoint Server. My Farm Administration is at
http://<machine name>[:80] but my server's Central Administration is at
http://<machine name>:<some port assigned in configuration>.
Make sure you show all mappings, so you get them for all ports you have configured. Then just click on each one to rename it. The Internal/Public Urls should show your old server name. Just update it in the same format to your new server name.
If you have a Visual Studio solution that you're developing and debugging on this server, you'll have to update the Site URL so Visual Studio knows where to deploy. Select your project under the solution, then open the properties window (it's not under project properties you get if you right click the project and select properties, it's actually in the properties window). Then, update the Site URL. After that, you should be good to go.