NuGet is such a great tool that it’s surprising we have gone without it for so long. Most enterprise developers will make heavy use of it to leverage external libraries. Before long most enterprise companies will see a need to share their own libraries internally. They need a private NuGet server. Thanks to the excellent guys building NuGet, it’s free and low effort to setup your own server. Below is how I did it:
- Install Windows Server 2008 R2
- Install SQL Server 2012 Express
- Install IIS
- Install .Net 4
- run C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis -iru
- Checkout code from https://github.com/NuGet/NuGetGallery.git
- Run build.bat
- Copy \PackagedWebsite to \\yourserver\c$\inetpub\wwwroot
I did run into a few snags installing it. Here are a few more steps I performed after the above installation steps.
- I had to configure the IIS AppPool to run as a NETWORK_SERVICE. This allows access to SQL Server.
- Create & Grant IIS_Users access to a Lucene folder C:\inetpub\wwwroot\NuGet\App_Data\Lucene
- Create & Grant IIS_USERS access to the folder C:\inetpub\wwwroot\App_Data\Files\packages.
Here are the steps they give which are excellent to: https://github.com/NuGet/NuGetGallery/wiki/Hosting-the-NuGet-Gallery-Locally-in-IIS