摘要:安装Jenkins 一、安装 Jenkins 前的环境准备(CentOS7) 1.添加yum仓库源 wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo 2.导入仓库源的key(秘钥)
阅读全文
摘要:HOST='xx.xx.xx.xx' USER='xx' PASSWD='xxxx' file_name="as.txt" # ftp -v -n
HOST<<EOFuser{USER} ${PASSWD} binary # ftp路径 cd /home/deploy # 本地路径 lc
阅读全文
摘要:crontab -l 查看定时任务 #定时备份mysql数据库 10 00 * * * /usr/local/shell/innobackupex.sh cat /usr/local/shell/innobackupex.sh 查看备份脚本 #!/bin/sh # MySQL端口 PORT='330
阅读全文
摘要:FTP 是File Transfer Protocol(文件传输协议)的英文简称,而中文简称为“文传协议”。用于Internet上的控制文件的双向传输。同时,它也是一个应用程序(Application)。基于不同的操作系统有不同的FTP应用程序,而所有这些应用程序都遵守同一种协议以传输文件。在FTP
阅读全文
摘要:获取当前pts [root@192_168_1_165 ~]# echo $SSH_TTY /dev/pts/3 [root@192_168_1_165 ~]# env | grep pts SSH_TTY=/dev/pts/3 检测指定pts的运行程序 [root@192_168_1_165 lu
阅读全文
摘要:def sh(self,cmds, print_msg=True): print('sh') msgStr = [] env = ###dev### compilePopen = subprocess.Popen(cmds,shell=True,stdout=subprocess.PIPE,clos
阅读全文
摘要:宿主机: 1、在Linux服务器上的处理 首先需要在Linux中安装python,并且安装pywinm库。安装之前首先需要安装isodate和xmlwitch两个依赖包,在安装pywinrm。下面是安装时用到的命令。 安装依赖包 pip install isodatepip install xmlw
阅读全文
摘要:什么是ZBar?ZBar是一个开源库,用于扫描、读取二维码和条形码。支持的二维码包括:EAN/UPC,QR等。 ubuntu16.04安装方式 sudo apt-get install libzbar-dev pip install zbar # 亲测有效 centos7 安装方式 yum inst
阅读全文
摘要:某个时间段的日志输出到新文件 sed -n '/2020-06-17 17:00:00/,/2020-06-17 18:50:59/p' nohup.out >> 061717.log 查看文件大小 ll -lh 061717.log 将最近200行文件输出到新文件 sudo tail -200 n
阅读全文
摘要:linux复制指定目录下的全部文件到另一个目录中复制指定目录下的全部文件到另一个目录中文件及目录的复制是经常要用到的。linux下进行复制的命令为cp。假设复制源目录 为 dir1 ,目标目录为dir2。怎样才能将dir1下所有文件复制到dir2下了如果dir2目录不存在,则可以直接使用cp -r
阅读全文
摘要:1、在Linux服务器上的处理 首先需要在Linux中安装python,并且安装pywinm库。安装之前首先需要安装isodate和xmlwitch两个依赖包,在安装pywinrm。下面是安装时用到的命令。 pip install isodate pip install xmlwitch pip i
阅读全文
摘要:# vim father.sh name='zhangsan' # vim child.sh source /mnt/father.sh echo $name # sh child.sh 输出内容: zhangsan
阅读全文
摘要:def getAllDirRE(path, sp = ""): #得到当前目录下所有的文件 filesList = os.listdir(path) #处理每一个文件 sp += " " for fileName in filesList: #判断是否是路径(用绝对路径) fileAbsPath =
阅读全文
摘要:from stat import S_ISDIR as isdir try: private_key = paramiko.RSAKey.from_private_key_file('/root/.ssh/id_rsa') t = paramiko.Transport((ip, 22)) t.con
阅读全文
摘要:前情:之前用java 1.8,因业务需求要用到1.7,多版本jdk安装后,echo $JAVA_HOME路径指的不是我想要的,把环境变量1.7注释掉仍然不起作用,把新安装的1.7删除重新编译,报错:JAVA_HOME is not defined correctly. We cannot execu
阅读全文
摘要:(1055, "Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'XX' which is not functionally dependent on columns i
阅读全文
摘要:linux安装python3 https://www.cnblogs.com/yhongji/p/9383857.html linux安装git yum install git linux安装mysql 5.7 https://www.cnblogs.com/daemon-/p/9009360.ht
阅读全文
摘要:|████████████████████████████████| 90 kB 9.5 MB/s ERROR: Command errored out with exit status 1: command: /usr/local/python3/bin/python3.7 -c 'import
阅读全文
摘要:Running setup.py install for python-ldap ... error ERROR: Command errored out with exit status 1: command: /usr/local/python3/bin/python3.7 -u -c 'imp
阅读全文