Posts

Showing posts from June, 2017

Install MongoDB Community Edition on Ubuntu

--> install mongodb community edition 1. Import the public key used by the package management system.  sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 2. Create a list file for MongoDB. -> Ubuntu 12.04: echo "deb [ arch=amd64 ] http://repo.mongodb.org/apt/ubuntu precise/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list -> Ubuntu 14.04: 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 ->Ubuntu 16.04 echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list 3 Reload local package database.     sudo apt-get update 4 Install the MongoDB packages.     sudo apt-get install -y mongodb -org 5 Start MongoDB.      sudo service mongod start 6 Verify that MongoDB h

How-to-set-up-a-node-js-application-for-production-on-ubuntu-16-04

How To Set Up a Node.js Application for Production on Ubuntu 16.04 Introduction Node.js is an open source JavaScript runtime environment for easily building server-side and networking applications. The platform runs on Linux, OS X, FreeBSD, and Windows. Node.js applications can be run at the command line, but we'll focus on running them as a service, so that they will automatically restart on reboot or failure, and can safely be used in a production environment. Install Node.js First, you need to install the NodeSource PPA in order to get access to its contents. Make sure you're in your home directory, and use curl to retrieve the installation script for the Node.js 6.x archives: cd ~ curl -sL https://deb.nodesource.com/setup_6.x -o nodesource_setup.sh curl -sL https://deb.nodesource.com/setup_8.x -o nodesource_setup.sh You can inspect the contents of this script with vi (or your preferred text editor): vi nodesource_setup.sh And run the script under s