Przejdź do głównej zawartości

Learning MongoDB

NoSQL databases are getting really popular lately. I decided to learn it and build solid skills that will let me using noSql databases in commercial projects.
The choice that I made is MongoDB. I have a friend who knows the topic very well and I'm of the opinion that it's easier to learn a new technology of your choice when you can look to help from someone trusted, at least on the beginning. So I've just started and in this article I describe the installation process on Ubuntu Linux.

I use Ubuntu 14. If you have a chance to worh with the same operating system and want to install Mongo, you can follow the instruction:


1. Import public key for apt package manager: sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
2. Create a file: echo "deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
3. Reload package database on your machine: sudo apt-get update
4. Install mongo package: sudo apt-get install -y mongodb-org
5. Final step (by default mongo runs on port 27017): sudo service mongod start
6. If you plan to connect to database from remmote machine, edit file: /etc/mongod.conf and add the following lines:
bind_ip = 0.0.0.0
port = 27017
and run the command: service mongod restart
Now you're set and you should be able to connect to database from any IP address.

You can use the following command to check if your mongo database is accessible from external hosts:

Then if everything is configured correctly, you should see the row similar to this:


My final thoughts and my resolution for this year. Some time ago I learned about Mongo University and I decided to start my course: M101N: MongoDB for .NET Developers. This online course is free and lasts 7 weeks.
The earliest edtion starts 30 May 2017 at 5PM UTC. This is edition that I'm registered for. It's worth to mention that .NET path is not the only option. You should find something for you if you know Python, Java or node.js. The full list is available on this website.
Please, look at the details and consider starting the class with me.


Komentarze

  1. Great article Darek, I've never try install MongoDB on Linux machine, currently I'm testing .Net Core on Ubuntu Linux, and I'll been using your article as a tutorial for preparing Mongo server for my application. Thanks for save my time!

    OdpowiedzUsuń

Prześlij komentarz

Popularne posty z tego bloga

Unleash the power of ChatGPT in your C# applications with NGpt - C# OpenAI GPT client

Meet NGpt - OpenAI GPT C# client library that will make your conversations with ChatGPT a breeze! Have you ever been struggling building your own smart AI application in C#? Well, now you can use ChatGpt inside your application! Introducing NGpt, the powerful .NET library that lets you integrate ChatGPT seamlessly into your C# applications. No more nigts spent on building your own AI solitions, no more convoluted logic and building complex business rules - just pure AI bliss. In this blog post, we'll dive into the wonderful world of NGpt and show you how easy it is to use. You might even find a few laughs along the way. The Magic of NGpt NGpt is a transient fault-tolerant .NET 6 OpenAI client that simplifies ChatGPT integration for C# developers. It's like your friendly neighborhood Spider-Man - always there to help you out when you need it most. With just your OpenAI API key, you can start coding AI applications in C# faster than you can say "Peter Parker." Let...

Specflow czyli BDD w praktyce

Dzisiaj pokażę w praktyce w jaki sposób zbieram wymagania korzystając z narzędzia Specflow. Na początku przypomnę nasze historie użtkownika. Potem skonfigurujemy dodatek Specflow Visual Studio. Na końcu pokażę jak wygląda język Gherkin i zaimplementujemy pierwszą historię użytkownika US1. Oto lista funkcjonalności, które będę implementował w aplikacji Perfect Life: US1: Jako użytkownik aplikacji mobilnej chcę ekran logowania aby mieć możliwość zapisywania swoich postępów US2: Jako użytkownik aplikacji mobilnej chcę mieć kalkulator wskaźnika BMI aby móc mierzyć poziom swojej kondycji US3: Jako użytkownik aplikacji mobilnej chcę widzieć wykresy aby móc wizualnie interpretować swoje postępy US4: Jako użytkownik aplikacji mobilnej chcę mieć możliwość rozwiązania quizu, żeby zbadać wskaźnik Body Age US5: Jako użytkownik aplikacji mobilnej chcę pobierać pliki PDF aby mieć dostęp do planów dietetycznych US6: Jako administrator aplikacji chcę zapisywać dane telemetryczne aby móc an...

Running Microsoft SQL Server on Linux with Docker

Probably you heard that Microsoft Sql Server can only run on Windows machines. Good news - This is not true anymore. You can easily install it on Linux machine too. In this article I show you 2 ways of installing Sql Server on Ubuntu 16 and demonstrate how to connect to the database from remote machine. OPTION 1: Slow way - Manual installation This is the most straightforward way of installing. You download packages and configure Sql Server interactively(you set password, port and choosing installation option - free or paid). This is the step by step instruction from microsoft https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu OPTION 2: Fast way - Running on docker with just 2 pure-command-line commands. My assumption is that your Ubuntu machine has already docker installed. You can check if Docker is already installed by tunning the command: docker. If you don't have docker installed, no problem: before continuing below instruction just install...