For a while now I’ve been vaguely threatening to write a post or two about my work with SharePoint, but so far I havenāt actually managed to get around to it.
The reason is essentially simple: SharePoint is a huge tool my company makes available to me, and everybody else that works there. They installed and maintain it on their servers, and I am but a lowly user.
Thatās fine. The whole point of the development work I do on top of SharePoint is that anybody could do it. I donāt need any special admin rights and I donāt need to get the technical guys involved. The problem is that when it comes to blogging about my work on SharePoint, all my work is on my companyās internal intranet. If I wanted a SharePoint site for testing purposes Iād have to put a request in and I’m not sure it would be approved, I donāt want to build test things on an existing site, and I certainly donāt want to risk accidentally revealing some proprietary information in a screenshot or something.
So, I’m going to install my own copy of SharePoint in a virtual machine and take you through it in this blog post.
Wait, what? Why?
SharePoint server is a big, enterprise-grade tool that powers intranet and internet sites across the world. Why would I want to install it at home? Well aside from using it to blog about my work, I plan on using it to help me work.
When I develop new SharePoint tools for my job I keep then hidden at the start. Itās kind of a security-through-obscurity type deal, and even though I’m typically developing on a live site your average SharePoint user wonāt find what youāre working on if there isn’t a link to it on their screen. This is great when youāre launching new things, but if you want to update a tool thatās already been rolled out and is in use it presents some challenges. What do you do in this situation? The choices are either to create an entirely new version of the tool and possibly a duplicate of the data that powers it, or just bite the bullet and make changes to the live production code. Iād rather have my own sandbox environment I can play in without fear of breaking something.
Isn’t SharePoint server expensive?
Yes. But also no! Thereās a version calledĀ SharePoint FoundationĀ that Microsoft makes available for free, and itās perfect for our needs. Itās designed to run on Windows Server 2008 or 2012, but it can also be installed on 64-bit versions of Vista or Windows 7, which is what I’m going to do.
Why a virtual machine?
To setup SharePoint server you do need to install some pre-requisites and change some operating system options, and I donāt want to do that on my desktop computer.
OK, I’m in. Letās go!
Great!
Start by downloading and installing some virtualization software. My environment of choice isĀ VirtualBoxĀ so thatās what I’m going to be using. If you donāt have an existing preference for something else, then Iād recommend you do the same.
Creating the VirtualBox VM
- Open VirtualBox and hit theĀ newĀ button in the top left
- Give your virtual machine a name, select the correct OS type (Microsoft Windows) and version (Windows 7 64 Bit), and hitĀ next.
- Set the VMās memory size. Microsoft says SharePoint foundation requires 4gb of RAM. In a bold decision that may come back to bite me later on, I’m going to give it 1gb.
- Complete the remainder of the VM provisioning with the default options. Youāll end up with a 25gb virtual hard drive, but itās dynamically sized so it wonāt take up 25gb of your real-life hard drive.
- Your now back to the main VirtualBox window, and your virtual machine has been created ā but is empty.Ā Itās time to install Windows 7. Right-click your new virtual machine at the left of the VirtualBox window, go to the storage tab, select the DVD drive and click the little disc icon on the far-right of the window to point the virtual drive to the Windows 7 install media. This could be a physical disc in your drive, or an ISO disc image.
- Back at the main VirtualBox window, hit theĀ startĀ button up top. The virtual machine will open, and the windows install will begin. Iām not going to take you through all the install steps, but itās no different to installing Windows 7 on a real computer. When you create a user you can call it whatever you want, but you must set a password.
Installing prerequisites and configuring windows
Now that we have Windows 7 installed and running in our virtual machine, itās time to install a few prerequisites before we dive into installing SharePoint itself.
If you’ve already downloaded SharePoint Foundation then you may have noticed it includes an option entitledĀ Install Prerequisites. Bad news ā this only works on Windows Server and not Windows 7 or Vista, so you have some work to do.
Youāll need to download and install:
Next, we need to set a few options in the operating system. Open upĀ control panelĀ and go toĀ Turn Windows features on or off.
Here are the options weāre going to set:
Time to install SharePoint
Finally, weāre ready!
- If you havenāt done so already, downloadĀ SharePoint Foundation 2010Ā from Microsoftās website. Make sure you save the file rather than running it, becauseā¦
- ā¦running it doesn’t work. As I noted, SharePoint is designed to be a server application available to large groups of people, and it requires Windows Server as a result. Except it doesn’t. Read on.
- What we need to do is manually unpack the installation file, and change a setting before we can install.
- Move the downloaded file into a folder somewhere (on your desktop is fine), open a command prompt, and navigate to that folder.
- Type the following command, and extract the files from the archive into the same folder
SharePoint_SP2_en-us /extract
- The installation files are now extracted into the folder. Navigate to the FilesSetup folder. Thereās a file in there called config.xml. Open this with a text editor (notepad is fine)
- Inside the <Configuration> tag, paste the following line:
<Setting id=āAllowWindowsClientInstallā Value=āTrueā />
Save and close the file, and navigate back to the root of the folder you created.
- Run setup.exe by double-clicking, and weāre pretty much good to go! When asked to choose the installation you want, make sure you selectĀ Standalone
It may take a while, but if you’ve followed all the steps correctly, SharePoint Foundation 2010 will now install correctly. The final step of the installation is a configuration wizard. Donāt skip this step! Despite its name there are no options you need to select, but you do need to make sure that you run it. It will set everything up for you, and weāre done! When the configuration wizard is complete it will open the site automatically. You may need to log in with your windows username and password.
Ā Ā