Difference between revisions of "MongoDB"
From SME Server
Jump to navigationJump to search (MongoDB installation) |
|||
Line 10: | Line 10: | ||
Visible no \ | Visible no \ | ||
status disabled | status disabled | ||
+ | |||
signal-event yum-modify | signal-event yum-modify | ||
+ | |||
yum install mongodb-org --enablerepo=mongodb | yum install mongodb-org --enablerepo=mongodb | ||
− | + | ||
+ | If refuses to install because o GPG Key you can change '''GPGCheck''' above from '''Yes''' to '''No''' and try '''yum install...''' again or | ||
yum install mongodb-org --enablerepo=mongodb --nogpgcheck | yum install mongodb-org --enablerepo=mongodb --nogpgcheck | ||
Line 18: | Line 21: | ||
/etc/init.d/mongod start | /etc/init.d/mongod start | ||
− | + | Add the symlinks to start automatically: | |
+ | |||
ln -s /etc/init.d/mongod /etc/rc.d/rc6.d/K03mongodb | ln -s /etc/init.d/mongod /etc/rc.d/rc6.d/K03mongodb | ||
ln -s /etc/init.d/mongod /etc/rc.d/rc7.d/S57mongodb | ln -s /etc/init.d/mongod /etc/rc.d/rc7.d/S57mongodb | ||
− | + | ||
+ | Optional: create symlink to use mongo or mongodb as service name | ||
+ | |||
ln /etc/init.d/mongod /etc/init.d/mongodb | ln /etc/init.d/mongod /etc/init.d/mongodb | ||
Revision as of 17:47, 20 August 2019
How to install MongoDB 4.0
Install Official Repository
db yum_repositories set mongodb repository \ BaseURL https://repo.mongodb.org/yum/redhat/\$releasever/mongodb-org/4.0/x86_64/ \ EnableGroups no \ GPGCheck yes \ Name "MongoDB" \ GPGKkey https://www.mongodb.org/static/pgp/server-4.0.asc \ Visible no \ status disabled
signal-event yum-modify
yum install mongodb-org --enablerepo=mongodb
If refuses to install because o GPG Key you can change GPGCheck above from Yes to No and try yum install... again or
yum install mongodb-org --enablerepo=mongodb --nogpgcheck
Start Mongo
/etc/init.d/mongod start
Add the symlinks to start automatically:
ln -s /etc/init.d/mongod /etc/rc.d/rc6.d/K03mongodb ln -s /etc/init.d/mongod /etc/rc.d/rc7.d/S57mongodb
Optional: create symlink to use mongo or mongodb as service name
ln /etc/init.d/mongod /etc/init.d/mongodb
To ensure everything is all right:
signal-event post-upgrade signal-event reboot