当前位置:网站首页>Mongodb source code deployment and configuration
Mongodb source code deployment and configuration
2022-07-25 14:00:00 【Humanoid bug maker 9527】
course 1
course 2
systemcl Manage startup and self startup
start-up
#!/bin/sh
. /etc/profile
mongod --config /usr/local/mongodb/mongodb-linux-x86_64-ubuntu2004-5.0.9/etc/mongodb.conf
close
#!/bin/sh
. /etc/profile
mongod --shutdown --dbpath /usr/local/mongodb/mongodb-linux-x86_64-ubuntu2004-5.0.9/data/
restart
#!/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
take mongo.service Move to systemclt Under the directory of
perform systemctl daemon-reload Refresh the file systemctl start mongo.service start-up mongosystemctl stop mongo.service stop it mongosystemctl restart mongo.service restart mongosystemctl enable mongo.service Turn on the power and start automatically systemctl disable mongo.service Turn off and start automatically systemctl statusmongo.service Check the status 
边栏推荐
- Internal error of LabVIEW
- 新唐NUC980设置DHCP或者静态IP
- Brush questions - Luogu -p1085 unhappy Jinjin
- Advantages of wireless relay acquisition instrument and wireless network for engineering monitoring
- 【目录爆破工具】信息收集阶段:robots.txt、御剑、dirsearch、Dirb、Gobuster
- Brush questions - Luogu -p1035 series summation
- Multidimensional pivoting analysis of CDA level1 knowledge points summary
- 百度搜索打击盗版网文站点,SEOer应该关注哪些问题?
- MySQL 01: Source command
- Common problems of wireless relay acquisition instrument
猜你喜欢

Leetcode1 -- sum of two numbers

Brush questions - Luogu -p1059 clear random number

刷题-洛谷-P1035 级数求和

Experiment the Arduino code of NTP network timing alarm clock with esp32+tm1638

Internal error of LabVIEW

在线问题反馈模块实战(十三):实现多参数分页查询列表

「数字安全」警惕 NFT的七大骗局

Applet H5 get mobile number scheme

Advantages of wireless relay acquisition instrument and wireless network for engineering monitoring

Brush questions - Luogu -p1047 trees outside the school gate
随机推荐
Congestion control of TCP
Amd epyc 9664 flagship specification exposure: 96 core 192 threads 480MB cache 3.8ghz frequency
Applet enterprise red envelope function
MXNet对DenseNet(稠密连接网络)的实现
@classmethod 装饰器
力扣(LeetCode)205. 同构字符串(2022.07.24)
AQS of concurrent programming
Alibaba mqtt IOT platform "cloud product circulation" practice - the two esp32 achieve remote interoperability through the IOT platform
sieve of eratosthenes
Okaleido生态核心权益OKA,尽在聚变Mining模式
Brush questions - Luogu -p1085 unhappy Jinjin
[原创]九点标定工具之机械手头部相机标定
手把手教学Yolov7的搭建及实践
@Classmethod decorator
刷题-洛谷-P1146 硬币翻转
telnet远程登录aaa模式详解【华为eNSP】
Leetcode -- addition of four numbers II
pytest.mark.parametrize及mock使用
移动端网站,独立APP,网站排名策略有哪些?
CDA level1 multi topic selection