Daniel15 / simple-nuget-server

A very simple PHP NuGet server
MIT License
116 stars 43 forks source link

Install directions/tips? #1

Closed cwb124 closed 10 years ago

cwb124 commented 10 years ago

I'd like to give this a try. We're looking for a very basic nuget feed for our environment.

Daniel15 commented 10 years ago

What's your environment like? I've only tested on Debian Linux + Nginx. If you're on a Windows server, I'd suggest using Microsoft's NuGet.Server instead.

For a Debian-based distro (including Ubuntu), installation is something along the lines of what I've written below. Installation using other Linux distributions will vary but it should be pretty similar.

1 - Copy app to your server, you could do a Git clone on the server or add it as a Git submodule if adding to a site that's already managed via Git:

cd /var/www
git clone https://github.com/Daniel15/simple-nuget-server.git
# Make db and packages directories writable
chown www-data:www-data db packagefiles
chmod 0770 db packagefiles

2 - Copy nginx.conf.example to /etc/nginx/sites-available and modify it for your environment:

3 - Edit inc/config.php and change ChangeThisKey to a randomly-generated string

4 - Enable the site (if creating a new site)

ln -s /etc/nginx/sites-available/nuget /etc/nginx/sites-enabled/nuget
/etc/init.d/nginx reload

5 - Set the API key and test it out. I test using nuget.exe (which is required for pushing)

nuget.exe setApiKey -Source http://example.com/ ChangeThisKey
nuget.exe push Foo.nupkg -Source http://example.com/

(if using Mono, run mono nuget.exe instead)

I've got a live installation for ReactJS.NET at http://reactjs.net/packages/. You can see its Nginx configuration at https://github.com/reactjs/React.NET/blob/master/site/nginx.conf

Daniel15 commented 10 years ago

Added the above instructions to the readme, let me know if you need any further assistance. Thanks!