0%

报警的方式有很多,邮件,短信,微信,钉钉,最简单的方式这种脚本去发邮件,在此记录一下配置过程。

配置邮件发送

安装mailx

1
yum -y install mailx

安装好,自己就有软链接了

1
2
[root@vm03 ~]# ls -l /usr/bin/mail
lrwxrwxrwx 1 root root 5 May 6 02:07 /usr/bin/mail -> mailx
阅读全文 »

linux 客户端安装

安装客户端软件

1
2
rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
yum install zabbix-agent
阅读全文 »

Windows

我的jdk安装在 C:\Program Files\Java\jdk1.8.0_202 目录下,以下为配置过程:
1.我的电脑-(右键)属性-高级系统设置-高级-环境变量
2.系统变量-新建

1
2
变量名:JAVA_HOME
变量值:C:\Program Files\Java\jdk1.8.0_202
1
2
变量名:CLASSPATH
变量值:%JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\lib\dt.jar
1
2
变量名:Path
变量值:C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x86;C:\Program Files (x86)\Intel\OpenCL SDK\2.0\bin\x64;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;E:\Program Files\TortoiseSVN\bin;%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin

Linux

编辑/etc/profile 文件,在文件最后添加以下内容

1
2
3
export JAVA_HOME=/usr/local/jdk1.8.0_202/
export CLASSPATH=.:$JAVA_HOME/lib/:$JAVA_HOME/jre/lib/
export PATH=$JAVA_HOME/bin:$PATH

source /etc/profile
保留系统以前自己配置的项,不要动!

使用jenkins自动发布到tomcat时遇到一个问题,发布的时候不能自动删除tomcat下的工程目录,必须关闭tomcat之后,才能删除;提示如下

1
"org.codehaus.cargo.container.tomcat.internal.TomcatManagerException: The Tomcat Manager responded "FAIL - Unable to delete [C:\ths\Tomcat8082-alk\webapps\SuperStation]. The continued presence of this file may cause problems."
阅读全文 »

由于公司的svn和maven仓库地址都在内网,使用Centos系统搭建持续集成的时候,没有办法访问服务器,又不想换Windows环境;于是想办法在linux下拨通vpn!

阅读全文 »

Jenkins环境搭建完成了,项目自动化编译打包也调通了,但是我们不能保证每次都是正常的,根据自己的情况(构建失败,构建状态不稳定)配置邮件通知是有必要的;这篇文章我采用腾讯qq邮箱来发送,使用公司邮箱来接收;

常用的几种方式

  • 使用内置的邮件插进(使用全局的配置,只能有一个接收方)
  • 使用邮件扩展插件【Email Extension Plugin】(使用全局的配置,能有多个接收方,但是只能有一个发送方)
  • 使用邮件扩展插件【Email Extension Plugin】+Groovy脚本(实现每个Job对应不同的发送邮件,多个发送方)
  • 开发邮件转发中间件或者使用Foxmail这些工具来转发(每个Job发送到对应的邮箱,然后中间件负责转发到成员列表的邮箱。对发送插件没什么要求,只要能发送即可)
    (这篇文章只说一下前两种方式)
    阅读全文 »

jenkins里新建了一个maven风格的项目,打包过程中找不到ojdbc的包,然后手动下载,加载到本地仓库中了,jenkins依然提示找不到这个包。

1
2
3
[ERROR] Failed to execute goal on project atmosphere: Could not resolve dependencies for project com.ths:atmosphere:war:0.0.1-SNAPSHOT: Failure to find com.oracle:ojdbc14:jar:10.2.0.4.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal on project atmosphere: Could not resolve dependencies for project com.ths:atmosphere:war:0.0.1-SNAPSHOT: Failure to find com.oracle:ojdbc14:jar:10.2.0.4.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced
at org.apache.maven.lifecycle.internal.LifecycleDependencyResolver.getDependencies(LifecycleDependencyResolver.java:221)
阅读全文 »