RavenDb 4 Part 1 - Installation

You are looking at revision 9 of this page, which may be out of date. View the latest version.  

Raven Server folder refers to the location where you extracted the RavenDb zip downloaded from their website.

Start administrator powershell prompt

curl.exe -LJO https://raw.githubusercontent.com/ravendb/ravendb/v4.1/scripts/certificates/powershell/generate-server-cert.ps1

Create two certificates:

.\generate-server-cert.ps1 -CN *.mooo.com -CertFile server.pfx
.\generate-server-cert.ps1 -CN *.mooo.com -CertFile client.pfx

Copy server.pfx to Raven Server folder C:\RavenDB-4.2.0-windows-x64\Server

In the RavenDb installation folder (e.g. C:\RavenDB-4.2.0-windows-x64\Server) rename settings.default.json to settings.json and replace the contents with:

(replace widgets.com with the domain you used when generating the certificates)

{
  "DataDir": "RavenData",
  "License.Eula.Accepted": true,
  "Setup.Mode": "Secured",
  "Security.Certificate.Path": "server.pfx",
  "Security.Certificate.Password": "",
  "ServerUrl": "https://0.0.0.0:8080",
  "ServerUrl.Tcp": "tcp://0.0.0.0:38888",
  "PublicServerUrl": "https://raven1.widgets.com:8080",
  "PublicServerUrl.Tcp": "tcp://raven1.widgets.com:38888"
}

//X509Certificate2 certificate = new X509Certificate2(Path.Combine(@"D:\temp\dotnetcore-webapp-spike\aspnetcoreapp\bin\Debug\netcoreapp2.2", "client.pfx"), "fred");

var store = new X509Store(StoreLocation.LocalMachine); x509.Open(OpenFlags.ReadOnly);

sc.exe create a_ravendemo binPath= "C:\temp\ravendemo\bin\Release\netcoreapp2.2\win10-x64\publish\ravendemo.exe --service"

dotnet new webapp -o ravendemo

dotnet add package RavenDB.Client --version 4.1.5 dotnet add package Microsoft.AspNetCore.Hosting.WindowsServices

dotnet publish -c Release -r win10-x64

Posted by: Wallace Turner
Last revised: 27 May, 2019 05:22 AM History
You are looking at revision 9 of this page, which may be out of date. View the latest version.

Comments

No comments yet. Be the first!

No new comments are allowed on this post.