记录所有用户登录系统的任何操作日志,以便有据可查。1.编辑/etc/profile文件vim/etc/profilehistoryUSER=`whoami`USER_IP=`who-uami2>/dev/null|awk‘{print$NF}‘|sed-e‘s/[()]//g‘`if["$USER_IP"=""];thenUSER_IP=`hostname`fiif[!-d/var/log/
分类:
系统相关 时间:
2020-06-17 10:33:52
阅读次数:
61
整个 CICD 流程大致如下: 这里 jenkins/gitlab/harbor 都是现成的哈,主要记录一下集成过程和其中遇到的问题。 1、创建一个流水线任务 2、填写项目描述 3、编写 pipeline 脚本和其中调用的 shell 脚本 pipeline { agent any environm ...
分类:
编程语言 时间:
2020-06-17 01:36:26
阅读次数:
209
1.结构 while condition do command done 例子: #!/bin/bash int=1 while (($int<=5)) do echo $int let "int++" done 2.无线循环的例子 while : do command done while tur ...
分类:
其他好文 时间:
2020-06-16 23:24:10
阅读次数:
77
详细看网址:https://blog.csdn.net/wrs120/article/details/77509070 压缩包和解压包的存放目录均为/usr/local/src/ 环境变量在/root/.bash_profile (自己添加) 一、安装前准备 1. 安装gcc # 安装命令 yum ...
分类:
数据库 时间:
2020-06-16 23:23:35
阅读次数:
270
#!/bin/bash echo "1. 对服务器硬件的监控" echo " 能够对服务器CPU进行监控,并输出CPU的信息" cpu=`cat /proc/cpuinfo |head -n 17` echo "CPU的信息为$cpu" echo " " echo " 2.能够对服务器内存进行监控, ...
分类:
系统相关 时间:
2020-06-16 21:54:51
阅读次数:
70
一、sonar安装步骤 (部署硬件要求2G以上内存) 1. 准备镜像 docker pull postgres docker pull sonarqube2. 编写脚本 1.start-postgresql.sh #!/bin/bash docker stop postgresql docker r ...
分类:
其他好文 时间:
2020-06-16 20:39:08
阅读次数:
81
问题背景 最近装个centos 7.6的环境,其中,基础环境包括,redis、nginx、mongodb、fastdfs、mysql等,其中,自启动使用的是systemctl,其他几个组件,都没啥问题,唯独,这个mongodb,是死活启动不了。 但是,我这里说的,不是启动不了,如果直接在shell里 ...
分类:
数据库 时间:
2020-06-16 18:52:31
阅读次数:
84
数据包封装 传输层及其以下的机制由内核提供,应用层由用户进程提供(后面将介绍如何使用socket API编写应用程序),应用程序对通讯数据的含义进行解释,而传输层及其以下处理通讯的细节,将数据从一台计算机通过一定的路径发送到另一台计算机。应用层数据通过协议栈发到网络上时,每层协议都要加上一个数据首部 ...
分类:
其他好文 时间:
2020-06-16 18:47:15
阅读次数:
71
https://docs.microsoft.com/zh-cn/powershell/azure/install-az-ps?view=azps-4.2.0 Azure PowerShell 在所有平台上都可使用 PowerShell 6.2.4 及更高版本。 它还可使用 Windows 上的 P ...
分类:
其他好文 时间:
2020-06-16 18:39:48
阅读次数:
76
在渲染进程(UI界面)中使用shell模块 //在文件管理器中打开 const { ..., shell } = require('electron'); const showFile = () => { if (!filePath) { return alert('This file has no ...
分类:
系统相关 时间:
2020-06-16 18:13:06
阅读次数:
67