Reader small image

You're reading from  RavenDB 2.x Beginner's Guide

Product typeBook
Published inSep 2013
PublisherPackt
ISBN-139781783283798
Edition1st Edition
Right arrow
Author (1)
Khaled Tannir
Khaled Tannir
author image
Khaled Tannir

Khaled Tannir has been working with computers since 1980. He began programming with the legendary Sinclair Zx81 and later with Commodore home computer products (Vic 20, Commodore 64, Commodore 128D, and Amiga 500). He has a Bachelor's degree in Electronics, a Master's degree in System Information Architectures, in which he graduated with a professional thesis, and completed his education with a Master of Research degree. He is a Microsoft Certified Solution Developer (MCSD) and has more than 20 years of technical experience leading the development and implementation of software solutions and giving technical presentations. He now works as an independent IT consultant and has worked as an infrastructure engineer, senior developer, and enterprise/solution architect for many companies in France and Canada. With significant experience in Microsoft .Net, Microsoft Server Systems, and Oracle Java technologies, he has extensive skills in online/offline applications design, system conversions, and multilingual applications in both domains: Internet and Desktops. He is always researching new technologies, learning about them, and looking for new adventures in France, North America, and the Middle-east. He owns an IT and electronics laboratory with many servers, monitors, open electronic boards such as Arduino, Netduino, RaspBerry Pi, and .Net Gadgeteer, and some smartphone devices based on Windows Phone, Android, and iOS operating systems. In 2012, he contributed to the EGC 2012 (International Complex Data Mining forum at Bordeaux University, France) and presented, in a workshop session, his work on "how to optimize data distribution in a cloud computing environment". This work aims to define an approach to optimize the use of data mining algorithms such as k-means and Apriori in a cloud computing environment. He is the author of RavenDB 2.x Beginner's Guide, Packt Publishing. He aims to get a PhD in Cloud Computing and Big Data and wants to learn more and more about these technologies. He enjoys taking landscape and night time photos, travelling, playing video games, creating funny electronic gadgets with Arduino/.Net Gadgeteer, and of course, spending time with his wife and family. You can reach him at contact@khaledtannir.net.
Read more about Khaled Tannir

Right arrow

Time for action – exploring the Start.cmd file


We will open Start.cmd in the Notepad application to learn how RavenDB would be launched.

  1. In Windows Explorer, go to C:\RavenDB-Build-2375.

  2. Select the Start.cmd file and open it in the Notepad application. It should look like this:

What just happened?

In steps 1 and 2, we opened the Start.cmd file and took a look at its command line parameters.

The Raven.Server.exe file is launched with two parameters --debug and --browser. The debug parameter is used by developers for applications debugging purposes and the browser parameter is used to open the Management Studio in the web browser automatically.

Configuring the RavenDB server

Before launching the RavenDB server, you might need to configure it. We can do configuration by editing the Raven.server.exe.config file located in the Server directory. This is a text file and can be edited and modified with the Notepad application.

There are three key-values in the appSettings section. These keys settings that you can modify to meet your needs are:

  • Raven/Port: This setting represents the TCP/IP listening port

  • Raven/DataDir: This setting lets you define the directory where the data will be stored

  • Raven/AnonymousAccess: This setting defines the security level access which you can use to define which user can do which action on the server

Raven.Server.exe runs by default on port 8080. The Start.cmd file will run the Raven.Server.exe file with the command-line parameter –browser. This will automatically open the Management Studio in the web browser and point to this location: http://hostname:port/raven/studio.html.

Note

A few points to be noted about default values:

  • The * value assigned to the Raven/Port indicates that RavenDB will find the first available port from 8080 and upward. By default, RavenDB server selects the 8080 TCP/IP port if it is not already in use. And once this is done that port is fixed.

  • The path for the database directory is defined by the Raven/DataDir key. The use of ~\ indicates to start from the RavenDB root directory, in which case the path will start from the server-based directory. The default value is: ~\Database\System.

  • The Raven/AnonymousAccess key by default is set to Get and it determines what actions an anonymous user can do. You can control the access level by setting this key to one of these values; Get for read only, All for read/write, and None allows access to authenticated users only.

Launching the RavenDB server in the Console mode

When RavenDB is launched in the console mode it will open a CMD prompt window which will stay open until the user has entered one of the four available commands:

  • cls: This command is used to clear the screen

  • reset: This command is used to reset the RavenDB server

  • gc: This command is used to initiate the garbage collection

  • q: This command is used to shut down the RavenDB server and terminate the CMD prompt window

Previous PageNext Page
You have been reading a chapter from
RavenDB 2.x Beginner's Guide
Published in: Sep 2013Publisher: PacktISBN-13: 9781783283798
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Khaled Tannir

Khaled Tannir has been working with computers since 1980. He began programming with the legendary Sinclair Zx81 and later with Commodore home computer products (Vic 20, Commodore 64, Commodore 128D, and Amiga 500). He has a Bachelor's degree in Electronics, a Master's degree in System Information Architectures, in which he graduated with a professional thesis, and completed his education with a Master of Research degree. He is a Microsoft Certified Solution Developer (MCSD) and has more than 20 years of technical experience leading the development and implementation of software solutions and giving technical presentations. He now works as an independent IT consultant and has worked as an infrastructure engineer, senior developer, and enterprise/solution architect for many companies in France and Canada. With significant experience in Microsoft .Net, Microsoft Server Systems, and Oracle Java technologies, he has extensive skills in online/offline applications design, system conversions, and multilingual applications in both domains: Internet and Desktops. He is always researching new technologies, learning about them, and looking for new adventures in France, North America, and the Middle-east. He owns an IT and electronics laboratory with many servers, monitors, open electronic boards such as Arduino, Netduino, RaspBerry Pi, and .Net Gadgeteer, and some smartphone devices based on Windows Phone, Android, and iOS operating systems. In 2012, he contributed to the EGC 2012 (International Complex Data Mining forum at Bordeaux University, France) and presented, in a workshop session, his work on "how to optimize data distribution in a cloud computing environment". This work aims to define an approach to optimize the use of data mining algorithms such as k-means and Apriori in a cloud computing environment. He is the author of RavenDB 2.x Beginner's Guide, Packt Publishing. He aims to get a PhD in Cloud Computing and Big Data and wants to learn more and more about these technologies. He enjoys taking landscape and night time photos, travelling, playing video games, creating funny electronic gadgets with Arduino/.Net Gadgeteer, and of course, spending time with his wife and family. You can reach him at contact@khaledtannir.net.
Read more about Khaled Tannir