Downloading and Installing Linux
A free video tutorial from Packt Publishing
Tech Knowledge in Motion
4.0 instructor rating • 1573 courses • 298,695 students
Need MondoDB installed so that you can begin to store and retrieve data.
Learn more from the full courseLearning MongoDB
A comprehensive guide to MongoDB for ultra-fast, fault tolerant management of big data, including advanced data analysis
03:25:42 of on-demand video • Updated April 2015
- Install MongoDB on Linux and Windows, both manually and using packages
- Configure MongoDB to autostart and access your data using the command line and GUI clients
- Learn how to manage databases, including creation, pruning, backup, and recovery to fulfil your big data needs
- Master how to create map and reduce functions using step-by-step diagrams and examples
- Understand replica sets, failover verification, responsiveness, and load balancing for large scale applications
- Discover how redundancy and filesystem choices impact security
- Delve into advanced topics such as monitoring, automated deployment, sharding, and caching to boost your application
English [Auto] In this section will cover everything you need to know to get started with Mungiki be on Linux or Windows. This will include how to identify the correct download for your platform how to install mongered Eby both manually and using packages how to configure mongered so that it starts automatically when you boot your system. And finally how to access and work with data in your Moneghetti database. We need to install mogul DBI so that we can begin to store and retrieve data. Let's see how this is done. For this course I'm using cloud servers for Linux. I'm using a digital ocean Ubuntu server running version 14 point zero for LTE as it has 512 megabytes of for him and one CPQ for Windows. Amusing and your cloud server running Windows Server 2012 are too. It has 768 megabytes of RAM and a single shared CPQ in this video focus on downloading and installing Mongar TV on Linux the Magdi the web site provides binary downloads for various versions of Mongar DB. When you get to the home page click the downloads link you'll notice that for Windows and Linux there are a number of options. The most conspicuous is the choice between 32 bit and 64 bit operating systems. It's easy to find out whether you have a 32 or 64 bit operating system installed. On Linux the U.N. command with the Dash 8 argument will output how many bits your operating system is. You can see here that we're running on a 64 bit operating system back on the Moga TB Web site. We can now identify the correct download link will right click and choose Copy link address to get it on the clipboard so we can download in just a minute. First let's look at a few of the implications of the version of Magdi that we choose. Note that not all Magdi be features are available in the 32 bit version. The 32 bit version is further limited in that the maximum database size is 2 gigabytes for big data applications. This could be a roadblock. I generally prefer to stay close to the latest release for security and stability for the quickest install possible. I always try to download directly to the system where I plan to install Mochrie B supports SSL but there are binary distributions don't come with SSL enabled. This means it's necessary to build Mongo from source to enable SSL support. That process won't be covered in this video but will be covered in a later video. On Linux we can use see or L or W get to download the files since we copied it to the clipboard we can just type in W get paste in the URL and hit enter. The amount of time this takes to download will depend on your server. But most cloud servers have a pretty fast connection for this first part. I'm demonstrating a manual installation later in the same video. I'll show you how to install from a platform specific package. You don't need to unpack the files. We can combine the NTR Incans it processes with a single TARC command using tar. X does EVF and the filename This leaves us with a directory in our user directory that has all the Monga be buying areas. Note that no special privileges are required to run Monga D-B before we can run Monga TV we need to create paths where Mongar TV can store logs and data files. We start by using Make sure to create the data directory and then we read another make a command to create the logs directory. We can use ls and dash L.A. to confirm that our data and logs directories were created the way we expect a configuration file is necessary to provide the Magdi process with the path to the logs and data directories Magdi the configuration files conform to YAML which makes them easy to read. Since we put our logs and data in the Mongar directory that's a convenient place to create the configuration file. There are many options you can include in your configuration file for now. The most important are the paths to the logs and the data directories. Now we can start the Magdi server process and identify the config file that it should use using the dash dash config option. We'll leave Magdi running in this terminal and open another terminal window to verify that it started up as we expect. The first place I'd look at the running processes by grepping for Mogen we can see that process 10:53 is running and it identifies the correct configuration file know that the process is running as root but that's because we're logged in as root. Next time look at the log files using the tail command those in Mongo logs and we have the Moneghetti beat out log. If there were any errors on startup they would print out here. This shows that there is a currently running process and that there were no errors. No that the process is running as root only because we are currently locked in this room. If everything looks good in the logs and from a process standpoint it's easy to connect to the locally running Magdi be instance using the Mongar command. Since we didn't change any of the default paths ports or other connection details and were on localhost it's not necessary to provide any details. It's not necessary to provide any details to connect to the Margrethe instance now we're successfully connected in this manual install we've skipped over a number of details that will be important for our production deployment. These include creating a script to start the Mongar process with desire run levels meaning it will start automatically when the server boots running the Magdi process as an unprivileged user and properly assigning permissions and ownership for related files for stability. You'll also want to use a tool like log rotate to prevent using up all disk space storing log files as you'll see in a minute. Most of these concerns are taken care of for you when you install using the package method I'm about to show you. Let's clean up a bit so we can demonstrate the package installation first we exit out of the Magu client and then we can close this terminal window. We can also kill the mongered process by typing Control-C using the same techniques we used above to confirm that Magdi started successfully. We can confirm that the process is no longer running. First we do a process command grab for Mongo and we see that the process is no longer running. We can also do a quick tail on the log files. And see that it says D-B X is really exiting now at this point we can clean up the files from the manual installation and start fresh. And there's one more file there we want to remove Now our directories clean in order to install using the package method. We need to set up our server to communicate with the package repository. We start the process by importing the public key for that repository. With the public key imported we can update our package list and create a local package database for installation of Mongar DV files. And now we update the local package listing using sudo app update. Now we can use the system provided package management tools to install Mongar TV. In this case we use apt get packages can be installed separately for the Mongar TV server client tools shorting and charting service. The Mongar to be org option installs the entire collection. So this command will install all of them over D-B and after installing the packages the mortgagee process should already be running. We can confirm that the Magdi process is running just as we did before using the process command. Sure enough we see it there with process id 594 notice that the Magdi process is now owned by a normal user monger DBI not root. The locks are now managed in the standard location and log rotatable ensure they don't get out of hand. We can tell the log to look for any errors. With tail this shows that Monga started out as expected. Finally we can connect to Manco using the normal client. Notice that the Margrethe be by an Aries are now in the path. In this video we have identified our operating system and that it was 64 bits. We installed Magdi be using two processes manual and package based. We also learned three ways to verify the Mongar the processes running by viewing processes. Viewing the logs and establishing a connection in the next video will go through the process to install mulga DBI on Windows.