摘要: https://blog.csdn.net/cnmilan/article/details/8493977 CentOS 环境下 IPv6设置方法: 1)/etc/sysconfig/network 打开/关闭网络配置添加:NETWORKING_IPV6=yes #打开IPv6# IPV6_AUTO 阅读全文
posted @ 2019-11-30 12:56 刘镇维 阅读(3753) 评论(0) 推荐(0)
摘要: https://www.jianshu.com/p/17f5aa01853f 在linux计划任务中, cron 是周期性运行某任务,假如我只想在未来的某时间点只是要求任务运行一次,这就用到at命令了,因为at只适合用在未来的某时间点。 at服务: at是由atd服务提供的,在centos6和cen 阅读全文
posted @ 2019-11-27 10:09 刘镇维 阅读(1043) 评论(0) 推荐(0)
摘要: 转自: https://blog.csdn.net/min996358312/article/details/61420462 1、当函数使用时,即interval(),为比较函数,如:interval(10,1,3,5,7); 结果为4;原理:10为被比较数,后面1,3,5,7为比较数,将后面四个 阅读全文
posted @ 2019-11-15 09:31 刘镇维 阅读(7697) 评论(0) 推荐(0)
摘要: 需用sudo启动,密码是windows密码。 阅读全文
posted @ 2019-09-22 21:40 刘镇维 阅读(922) 评论(2) 推荐(1)
摘要: 1、执行保存账号命令 # 保存本地仓库的账号git config --local credential.helper store # 保存git全局账号git config --global credential.helper store 2、执行一般git命令,clone、pull等。输入账号密码 阅读全文
posted @ 2019-09-21 10:32 刘镇维 阅读(14166) 评论(0) 推荐(1)
摘要: BandwagonHost默认安装好了EPEL源,只是默认没有启用,所以很多软件都无法安装。我们需要手动启用一下,才能安装里面的软件。 阅读全文
posted @ 2019-01-04 18:15 刘镇维 阅读(229) 评论(0) 推荐(0)
摘要: 1、安装 brew install nginx 2、启动或重启 sudo brew services start nginxsudo brew services restart nginxsudo brew services stop nginx 3、配置文件 /usr/local/etc/ngin 阅读全文
posted @ 2018-12-06 10:48 刘镇维 阅读(189) 评论(0) 推荐(0)
摘要: 在 /etc/yum.repos.d/中创建nginx.repo 内容如下: [nginx]name=nginx repobaseurl=http://nginx.org/packages/centos/$releasever/$basearch/gpgcheck=0enabled=1 保存并退出 阅读全文
posted @ 2018-11-11 22:54 刘镇维 阅读(176) 评论(0) 推荐(0)
摘要: 1、官方推荐方式安装 参考https://www.gitlab.com.cn/installation/#centos-7?version=ce 这3行一般都是要执行的 防火墙不启用,那防火墙的命令就不用执行了 建议使用smtp来发邮件,这样就不用装postfix了现在服务器一般都会禁用25端口,用 阅读全文
posted @ 2018-08-15 17:07 刘镇维 阅读(627) 评论(0) 推荐(0)
摘要: “黑名单”会告诉代理工具,黑名单(国外)里面的网站要使用代理;“白名单”会告诉代理工具,白名单(大陆网站)里面的网站直接连接,其余使用代理。 黑名单PAC 黑名单PAC两条(任选其一):https://github.com/gfwlist/gfwlist/blob/master/gfwlist.tx 阅读全文
posted @ 2018-05-11 23:01 刘镇维 阅读(7984) 评论(0) 推荐(0)
摘要: ios竖屏拍照上传,图片被旋转问题 1.通过第三方插件exif-js获取到图片的方向2.new一个FileReader对象,加载读取上传的图片3.在fileReader的onload函数中,得到的图片文件用一个Image对象接收4.在image的onload函数中,利用步骤1中获取到的方向orien 阅读全文
posted @ 2018-04-02 11:34 刘镇维 阅读(206) 评论(0) 推荐(0)
摘要: 切换线上分支(本地没有该分支) git fetch origin git checkout -b 线上分支名 origin/线上分支名 代码比较 git diff branch1 branch2 # 显示出所有有差异的文件的详细差异git diff branch1 branch2 --stat # 阅读全文
posted @ 2018-04-02 10:20 刘镇维 阅读(1782) 评论(0) 推荐(0)
摘要: 还原数据库 整库还原,会覆盖原数据:# mongorestore -u 有root权限的用户名 -p 用户密码 --dir /数据库备份目录 --drop--drop 还原前先清除原数 如果备份是通过 --archive 选项创建的,那么你应该使用 mongorestore 的 --archive 阅读全文
posted @ 2018-01-16 15:48 刘镇维 阅读(260) 评论(0) 推荐(0)
摘要: https://brickyang.github.io/2017/03/02/Linux-%E8%87%AA%E5%8A%A8%E5%A4%87%E4%BB%BD-MongoDB/ 一、备份与还原 1、备份 备份到文件夹mongodump -u **用户名** -p **密码** -o **输出文件 阅读全文
posted @ 2017-12-14 10:44 刘镇维 阅读(258) 评论(0) 推荐(0)
摘要: 单字段去重 db.student.distinct("name"); 多字段去重 db.student.aggregate([{ $group:{ _id: {name: "$name", sex: "$sex"}, }}]) 如果还需要拿出collection中的其他字段,可以使用$push关键字 阅读全文
posted @ 2017-12-05 15:50 刘镇维 阅读(4122) 评论(0) 推荐(1)