ssh基于key验证 1,在客户端生成公钥私钥对并将公钥拷到要连接的服务器上,验证是否成功 [root@localhost ~]# ssh-keygen Generating public/private rsa key pair. Enter file in which to save the k ...
分类:
其他好文 时间:
2021-05-23 22:59:40
阅读次数:
0
1.什么是shell 命令解释器,将abcd翻译成010101发给内核,让机器看懂,内核处理后,返回101010,shell反编译成dcba呈现给终端,让人看懂。 2.shell分类 shell类别 易学性 可移植性 编辑性 快捷性 Bourne Shell -- sh 容易 好 较差 较差 Kor ...
分类:
系统相关 时间:
2021-05-04 16:31:26
阅读次数:
0
官网下载Jenkins https://www.jenkins.io/zh/download/ 构建jenkins镜像 # docker build -t jenkins:2.277.3 . from ubuntu:latest run sed -i 's/ports.ubuntu.com/mirr ...
分类:
其他好文 时间:
2021-05-04 16:25:44
阅读次数:
0
Course Schedule III (H) There are n different online courses numbered from 1 to n. You are given an array courses where courses[i] = [durationi, lastD ...
分类:
其他好文 时间:
2021-05-04 16:09:30
阅读次数:
0
#!/bin/bash while read linedo echo $line txt=`echo $line |awk -F' ' '{print $1}'` id=`echo $line|awk -F' ' '{print $3}'` echo $txt echo $id sed "s/ws2 ...
分类:
系统相关 时间:
2021-05-03 12:39:24
阅读次数:
0
govendor简介 golang工程的依赖包经常使用go get命令来获取,例如:go get github.com/kardianos/govendor ,会将依赖包下载到GOPATH的路径下。 常用的依赖包管理工具有godep,govendor等,在Golang1.5之后,Go提供了 GO15 ...
分类:
其他好文 时间:
2021-05-03 12:03:26
阅读次数:
0
crontab 用于设置定时任务,通过 cat /etc/crontab 可查看 crontab 示例: $ cat /etc/crontab SHELL=/bin/bash PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root # For details s ...
分类:
其他好文 时间:
2021-05-03 11:54:27
阅读次数:
0
有时候需要做个某些服务的状态监控,用钉钉机器人发通知挺方便的。可以用shell脚本配合crontab检测状态,检测到异常就调用python脚本发起告警。 python内容 此处用的python3,需要先安装requests模块。pip install requests -i https://mirr ...
分类:
编程语言 时间:
2021-04-30 12:35:08
阅读次数:
0
11、题目要求 写一个脚本实现如下功能: 输入一个数字,然后运行对应的一个命令。 显示命令如下: *cmd meau** 1 - date 2 - ls 3 - who 4 - pwd 当输入1时,会运行date, 输入2时运行ls, 以此类推。 核心要点 case判断 参考答案 #!/bin/ba ...
分类:
系统相关 时间:
2021-04-29 12:01:03
阅读次数:
0
springboot项目部署在CentOS系统上时,如果遇到停电关机,公司的实施人员就得跑到甲方现场重新启动项目并测试,很是麻烦,这里探讨如何编写shell脚本控制springboot项目开机时自动启动; 不正之处,请不吝赐教! 以eureka的jar包为例子: 上传Jar包 将eureka的jar ...
分类:
编程语言 时间:
2021-04-29 11:42:09
阅读次数:
0