
MongoDB
一起讨论
记录工作中的干货
展开
-
MongoDB恢复备份数据
#!/bin/bash#By lumia98@vip.qq.com#导入MongoDB备份数据export PATH='/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/bin:/opt/app/mongodb-4021/bin'#MongoDB的地址Host='127.0.0.1'#MongoDB端口Port=27017#管理员用户UserName='root'#管理员密码Password='1234原创 2020-12-01 15:19:54 · 145 阅读 · 0 评论 -
MongoDB报错(too many open file)
错误信息2020-11-30T18:18:22.000+0800 I - [ftdc] Assertion: 13538:couldn't open [/proc/11915/stat] errno:24 Too many open files2020-11-30T18:18:22.065+0800 W FTDC [ftdc] Uncaught exception in 'Location13538: couldn't open [/proc/11915/stat] errno:2原创 2020-12-01 10:16:33 · 933 阅读 · 0 评论 -
Linux脚本shell检测端口(可用于zabbix)
#!/bin/bash# By lumia98@vip.qq.com# 检测系统端口脚本# Redis、Mongodb、kafka# 探测服务器地址127.0.0.1# zabbix触发器规则是0for p in {6379,27017,46457,2181,43335}; do # 如果3秒内端口不通,则不输出ok timeout 3 bash -c "</dev/tcp/127.0.0.1/$p &>/dev/null" if [ $? != 0 ];then原创 2020-11-30 15:54:37 · 525 阅读 · 0 评论 -
MongoDB备份脚本(正式环境)
[root@mongodb ~]# more /opt/script/mongodb-data.sh #!/bin/bash#Author:lumia98@vip.qq.com#备份MongoDB-4.0.2export PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/app/jdk/bin:/opt/app/tomcat/bin:/opt/app/mongodb/bin:/root/bin#mongo原创 2020-11-30 09:50:14 · 1064 阅读 · 0 评论 -
MongoDB安装
学习笔记By lumia98@vip.qq.com1、安装MongoDB# 下载MongoDB软件[root@test ~]$ wget https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-rhel80-4.0.21-rc1.tgz# 解压MongoDB[root@test ~]$ tar xf mongodb-linux-x86_64-rhel80-4.0.21-rc1.tgz# 创建MongoDB软件日志等目录,拷贝bin目录下原创 2020-11-27 17:25:04 · 118 阅读 · 0 评论