JVM Languages

Tools

Tag: Installation

In this post we will learn how to install Gradle in OS X. The following steps will guide our installation process to make Gradle available in our OS X machine. But before we start let’s take a look at the definition from wikipedia about Gradle.

Gradle is an open source build automation system that builds upon the concepts of Apache Ant and Apache Maven and introduces a Groovy-based domain-specific language (DSL) instead of the XML form used by Apache Maven of declaring the project configuration.

I. Using Homebrew

The short and simple answer is to use the Homebrew package manager for macOS. You can visit the website for detail on how to install the Homebrew. But to help you, I’ve copied the online script to install it below:

After installing Homebrew, just type the following command to install Gradle.

brew install gradle

Now, if you want to do it manually, here are the steps 😉

II. Manual Installation Steps

1. Download Gradle

To download visit Gradle Releases Page. Download the complete distribution which includes binaries, sources and offline documentation. For example you can download the latest release of Gradle, as of this update the version is gradle-4.0.2-all.zip.

In this post you will see how to install and running MongoDB database server on Windows 7. What is MongoDB? MongoDB is a NoSQL database. MongoDB is a non-relational JSON document store, a document oriented database. Non-relational means that it doesn’t support the relational algebra that most often expressed in SQL like what RDBMS such as Oracle or MySQL does. The document here is not a Microsoft Word documents or such, but it is a JSON (JavaScript Object Notation) documents.

And if you don’t know what it is look like, here are some examples of JSON documents:

Other characteristics of MongoDB are: it has a dynamic schema, it doesn’t support SQL language, it doesn’t support Joins, and it doesn’t support transactional across multiple collections.

MongoDB Installation

After you know a bit of MongoDB lets get started with the installation process. Here are the step by step of the MongoDB installation.

Downloads Windows 64-bit MongoDB installer at //www.mongodb.org/downloads. When this post is written the binary file name for Windows 64-bit is mongodb-win32-x86_64-2008plus-2.6.3-signed.msi.

After you have finish the download the installer double click the file to start the installation wizard.

Welcome to MongoDB Setup

Press the Next button for the next screen and check I accept the terms in the License Agreement check box and press the Next button to continue.

End-User License Agreement

The next step is to choose the setup type. There are three types of setup available, Typical, Custom and Complete. For now we will choose Complete. So click the Complete button to continued the installation process.

Choose Setup Type

Press the Install button to begin installation process.

Ready To Install MongoDB

After pressing the Install button you can see the screen of MongoDB installation process. Wait until the installation is done.

Installing MongoDB

And finally you have the MongoDB database installed. Click the Finish button to end the installation process.

Completed MongoDB Installation

The steps above have finalize your MongoDB installation. If you check in your C:\Program Files directory you will see the MongoDB installation directory in there. There will be a bin directory under C:\Program Files\MongoDB 2.6 Standard where all the MongoDB application files. Now you have install the database server lets run and check the database server.

Running MongoDB

For this step we will focus on two files from the bin directory of the MongoDB installation. The mongod.exe and mongo.exe. The first executable is the MongoDB database engine daemon while the second executable is the shell program to access the MongoDB.

To run the database do the following steps:

Create data directory. By default MongoDB look for \data\db directory in the root Drive from where you run the mongod. For example you can create C:\data\db. Or you can use the --dbpath argument to tell MongoDB where to store the data.

Open Command Prompt and cd to C:\Program Files\MongoDB 2.6 Standard\bin and type mongod to start the daemon.

MongoDB mongod

The screen above shows you that the MongoDB is successfully started, using the dbpath \data\db and it ready and listening for connections on the default port 27017.

Running The Shell

Open Command Prompt and cd to C:\Program Files\MongoDB 2.6 Standard\bin.

Run mongo.exe to start the shell. You’ll see a welcome message to the MongoDB shell.

MongoDB mongo shell

In the shell above we run a couple of commands:

use peopledb command ask the MongoDB to change to the persons collections, if it doesn’t exist Mongo will create one.

To add document to the collections we can call db.persons.insert(); and passing the JSON document as the arguments.

To query the collection we can use db.persons.find().

If you want for instance to find Julia in the collection you can do db.persons.find({"firstName" : "Julia"})

To close the shell we can call quit() command.

That’s all for now, I hope this post is useful for you. In the next post I will show you how to create a simple Java application that use Mongo Java Driver to store data using Java programming into the MongoDB database. So, see you in the next post. Thank you.

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here:
Cookie Policy