当前位置:网站首页>Mongodb源码部署以及配置
Mongodb源码部署以及配置
2022-07-25 13:57:00 【人形bug制造机9527】
#!/bin/sh
. /etc/profile
mongod --config /usr/local/mongodb/mongodb-linux-x86_64-ubuntu2004-5.0.9/etc/mongodb.conf
关闭
#!/bin/sh
. /etc/profile
mongod --shutdown --dbpath /usr/local/mongodb/mongodb-linux-x86_64-ubuntu2004-5.0.9/data/
重启
#!/bin/sh
. /etc/profile
mongod --shutdown --dbpath /usr/local/mongodb/mongodb-linux-x86_64-ubuntu2004-5.0.9/data/
sleep 5
mongod --config /usr/local/mongodb/mongodb-linux-x86_64-ubuntu2004-5.0.9/etc/mongodb.conf
mongo.service
[Unit]
Description=mongodb
After=network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
ExecStart=/usr/local/mongodb/mongodb-linux-x86_64-ubuntu2004-5.0.9/bin/start.sh
ExecReload=/usr/local/mongodb/mongodb-linux-x86_64-ubuntu2004-5.0.9/bin/restart.sh
ExecStop=/usr/local/mongodb/mongodb-linux-x86_64-ubuntu2004-5.0.9/bin/shutdown.sh
PrivateTmp=true
[Install]
WantedBy=multi-user.target
将mongo.service移动到systemclt的目录下
执行systemctl daemon-reload刷新文件systemctl start mongo.service启动mongosystemctl stop mongo.service停止mongosystemctl restart mongo.service重启mongosystemctl enable mongo.service开启开机自启systemctl disable mongo.service关闭开机自启systemctl statusmongo.service查看状态
边栏推荐
- 百度搜索打击盗版网文站点,SEOer应该关注哪些问题?
- NoSQL, relational database, row and column database comparison and analogy
- Concurrent tool set for concurrent programming
- Audio and video technology development weekly | 255
- Nodejs link MySQL error: Er_ NOT_ SUPPORTED_ AUTH_ MODEError: ER_ NOT_ SUPPORTED_ AUTH_ MODE
- Serious [main] org.apache.catalina.util.lifecyclebase Handlesubclassexception initialization component
- 刷题-洛谷-P1085 不高兴的津津
- 运动豪华还是安全豪华?亚洲龙与沃尔沃S60该入手哪款?
- Tensorflow2 installation quick pit avoidance summary
- einsum(): operands do not broadcast with remapped shapes [original->remapped]: [1, 144, 20, 17]->[1,
猜你喜欢

Common problems of wireless relay acquisition instrument

刷题-洛谷-P1152 欢乐的跳

Brush questions - Luogu -p1152 happy jump

百度搜索打击盗版网文站点,SEOer应该关注哪些问题?

Brush questions - Luogu -p1046 Tao Tao picking apples

刷题-洛谷-P1151 子数整数
Congestion control of TCP
![[directory blasting tool] information collection stage: robots.txt, Yujian, dirsearch, dirb, gobuster](/img/72/d3e46a820796a48b458cd2d0a18f8f.png)
[directory blasting tool] information collection stage: robots.txt, Yujian, dirsearch, dirb, gobuster

Brush questions - Luogu -p1035 series summation

What problems should SEOER pay attention to when baidu searches and attacks pirated websites?
随机推荐
刷题-洛谷-P1150 Peter的烟
命名空间与库
【Platform IO编译Hifive1-revB】*** [.pio\build\hifive1-revb\src\setupGPIO.o] Error 1的解决办法
Arduino code of key state machine for realizing single, double click, long press and other functions with esp32 timed interrupt
[directory blasting tool] information collection stage: robots.txt, Yujian, dirsearch, dirb, gobuster
刷题-洛谷-P1146 硬币翻转
飞沃科技IPO过会:年营收11.3亿 湖南文旅与沅澧投资是股东
Internal error of LabVIEW
How can information security engineers prepare for the soft exam in the second half of 2022?
wangeditor 富文本编辑器
Multidimensional pivoting analysis of CDA level1 knowledge points summary
Okaleido生态核心权益OKA,尽在聚变Mining模式
Setting of parameter configuration tool for wireless vibrating wire collector
Tm1638 LED digital display module Arduino drive code
Numpy quick start
OKA通证权益解析,参与Okaleido生态建设的不二之选
Alibaba mqtt IOT platform "cloud product circulation" practice - the two esp32 achieve remote interoperability through the IOT platform
Day1: 130 questions in three languages
Leetcode 205. isomorphic string (2022.07.24)
【力扣】1030.距离顺序排列矩阵单元格