I currently have a SharePoint 2007 demonstration setup on a development environment. The SharePoint 2007 installation was originally setup for a specific client. So the host headers, computer name and farm credentials contained the client name. This all had to be changed. Carrying out another installation of SharePoint was something I did not want to do since I wanted to retain all the dummy data and sites.
You might be thinking: Why don’t I just change the host headers with the new client name? Well that’s because I am a bit OCD and I like everything to be consistent.
To rename, carry out the following. But remember to carry out these steps exactly because you might come across the problem I did where I couldn’t get to Central Admin or view my Intranet:
- Go to Central Admin > Operations > Alternate Access Mappings.
- Change the host headers as required.
If you changed the name of the server carry out the following command:
stsadm -o renameserver -oldservername <oldname> -newservername <newname>
- Rename the server to a new server name by going to My Computer > Properties > Computer Name and restart.
After restart you will need to update the farm login credentials since the computer name has been changed from Steps 3 and 4. If you do not update the farm credentials, you will get the dreaded “Cannot connect to database” message when trying to view your Intranet.
stsadm -o updatefarmcredentials -userlogin <domain\user> -password <password>
- Change the site names in IIS. This site names will need to reflect the changes you made in Step 1.
- Change the host headers in the host file (C:\Windows\System32\drivers\etc\hosts).