摘要: 每次重启mongodb是真的麻烦,今天有时间就写个自启脚本: # vim mongod_up.sh #!/bin/bash mongod=/home/mongodb/bin/mongod #mongodb启动命令 mongod_conf=/home/mongodb/conf/mongodb.conf 阅读全文
posted @ 2021-07-13 17:17 每日一坑 阅读(237) 评论(0) 推荐(0)
摘要: 备份:mongodump -h 127.0.0.1:27017 -u username -p userpassword --authenticationDatabase "admin" -o mongbak/ 恢复: mongorestore -u username -p userpassword 阅读全文
posted @ 2021-06-04 10:04 每日一坑 阅读(98) 评论(0) 推荐(0)
摘要: 好久没配置网络居然忘记命令了,快速配置网络记录下 命令说明 : nmcli命令 连接设备 修改 网卡名称 ipv4.方法 手动 ipv4.地址 ‘ip地址/子网掩码’ ipv4.网关 ‘网关地址' 连接.开机自动 是 nmcli connection up '网卡名称' 如果需要连接外网,需要配置文 阅读全文
posted @ 2021-06-04 10:03 每日一坑 阅读(62) 评论(0) 推荐(0)
摘要: 最近新搭建了一台docker服务器,把本地镜像load导入的时候报错:devmapper: Thin Pool has 163029 free data blocks which is less than minimum required 163840 free data blocks. Creat 阅读全文
posted @ 2021-04-15 16:28 每日一坑 阅读(420) 评论(0) 推荐(0)
摘要: 修改不知道文件名的文件内容 find / -type f -exec sed -i 's/http:\/\/192.168.x.x/http:\/\/192.168.1.1/g' {} \; mtime、atime和ctime的使用,参考https://www.cnblogs.com/qiaopei 阅读全文
posted @ 2021-03-26 16:49 每日一坑 阅读(53) 评论(0) 推荐(0)
摘要: 前提:公司VMware虚拟机服务器需要迁移到新的服务器上,我直接把原虚拟机文件打包拷到新服务器上,直接扫描出来还原。 还原是还原了,查看网络配置,发现eth0没了,查看 /etc/sysconfig/network-scripts/ 也是没有eth0的,没有咋办,那就创建一个呗 有配置文件的就直接复 阅读全文
posted @ 2021-01-27 13:34 每日一坑 阅读(845) 评论(0) 推荐(0)
摘要: 80转443: server { listen 80; server_name huashengshu.top; rewrite ^(.*)$ https://${server_name}$1 permanent; } 404报错: http { proxy_intercept_errors on; 阅读全文
posted @ 2020-12-28 09:03 每日一坑 阅读(99) 评论(0) 推荐(0)
摘要: 生成密钥对,opensll版本1.1.1上,如何升级openssl查看升级openssh文章: openssl req -x509 -newkey rsa:4096 -sha256 -days 3650 -nodes -keyout ssl.key -out ssl.crt -subj "/CN=1 阅读全文
posted @ 2020-11-06 18:45 每日一坑 阅读(169) 评论(0) 推荐(0)
摘要: :% s/^/#/g 来在全部内容的行首添加 # 号注释 :1,10 s/^/#/g 在1~10 行首添加 # 号注释 awk '{$1="";print $0}' file 输出时,删除第一列 阅读全文
posted @ 2020-11-06 09:35 每日一坑 阅读(101) 评论(0) 推荐(0)
摘要: 好久没有配置yum源,不想进yum.repos.d一行一行写,偷个懒 先确认有没有安装yum-utils: # yum install yum-utils 添加镜像源: # yum-config-manger --add-repo file://iso/ #使用的本地挂载的镜像地址 最后还需要再yu 阅读全文
posted @ 2020-10-30 14:08 每日一坑 阅读(1118) 评论(0) 推荐(0)