Monday, 15 February 2021

Mongodb3.4 installation

https://www.hugeserver.com/kb/install-mongodb-centos-6-7/ ION LOGIN Tel: 1.888.842.8570E-mailLive Chat Home Dedicated Hosting Dedicated Servers Overview Pricing Los Angeles Jacksonville Meppel Colocation Overview Custom Quote Special Promotion Virtual Hosting Virtual Servers Overview Pricing Hybrid Servers Overview Pricing Virtualization Solutions Virtualization Hardware Solutions Software Solutions Administration Company About Us Company Overview Our Team Carriers Blog Contact Partner Programs Reseller Program Referral Datacenters Overview Los Angeles Datacenter Jacksonville Datacenter Meppel Datacenter Why HugeServer ION Platform SLA Plus Testimonials Optimized Network Knowledgebase HugeServer Knowledgebase HugeServer Knowledgebase > Linux > CentOS > Install MongoDB 3.4 on CentOS 6 and 7 Install MongoDB 3.4 on CentOS 6 and 7 on May 7, 2017 by AmirLeave a comment Introduction MongoDB is a scalable, high-performance, open source NoSQL database. The database is document-oriented so it manages collections of JSON-like documents. Many applications can thus model data in a more natural way, as data can be nested in complex hierarchies and still be queryable and indexable. We are assuming that you have root permission, otherwise, you may start commands with “sudo”. MongoDB Logo Install MongoDB For installing the latest stable version of MongoDB you should add MongoDB repository first. Adding MongoDB Repository Move to the following directory: cd /etc/yum.repos.d/ Create the following file with your favorite text editor: nano mongodb-org-3.4.repo For the latest stable version of MongoDB paste the following line in the file then save and exit: [mongodb-org-3.4] name=MongoDB Repository baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.4/x86_64/ gpgcheck=1 enabled=1 gpgkey=https://www.mongodb.org/static/pgp/server-3.4.asc Installing MongoDB Update your repositories list executing the following command: yum repolist Now you can install the latest stable version of MongoDB using “Yum”: yum install mongodb-org -y Configuring SELINUX If you are using SELinux, you must configure SELinux to allow MongoDB to start on Red Hat Linux-based systems If SELinux is in enforcing mode, enable access to the relevant ports that the MongoDB deployment will use (e.g. 27017). semanage port -a -t mongod_port_t -p tcp 27017 Manage your MongoDB Service You can manage your MongoDB service with “systemctl”: For making MongoDB run at startup: systemctl enable mongod or chkconfig mongod on For Start/Stop MongoDB service: systemctl start mongod systemctl stop mongod or service mongod start service mongod stop See your MongoDB status: systemctl status mongod or service mongod status ========================================================================================================================================== =========================================================================================================================================== mongod.conf # mongod.conf # for documentation of all options, see: # http://docs.mongodb.org/manual/reference/configuration-options/ # where to write logging data. systemLog: destination: file logAppend: false path: /var/log/mongodb/mongod.log # Where and how to store data. storage: dbPath: /var/lib/mongo journal: enabled: true wiredTiger: engineConfig: cacheSizeGB: 5 journalCompressor: none collectionConfig: blockCompressor: snappy indexConfig: prefixCompression: true # engine: # mmapv1: # wiredTiger: # how the process runs processManagement: fork: true # fork and run in background pidFilePath: /var/run/mongodb/mongod.pid # location of pidfile # network interfaces net: port: 27017 # bindIp: 127.0.0.1 # Listen to local interface only, comment to listen on all interfaces. replication: replSetName: WAPRS01 oplogSizeMB: 100 #security: #operationProfiling: #replication: #sharding: ## Enterprise-Only Options #auditLog: #snmp:

No comments:

Post a Comment