- 浏览: 2539913 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
Jenkins Configuration(1)Setup on Redhat
1. Configuration on Redhat
I follow the document I wrote before to install the jenkins on my red hat server. And I tried to change some configuration on that.
Command to restart the server:
>sudo /etc/init.d/jenkins restart
Place to change the port and server log place
>vi /etc/sysconfig/jenkins
Maybe, someone else install the jenkins before on that red hat, so I can not login on to that system.
I find a place to change the jenkins user configuration:
>cd /var/lib/jenkins/
>vi config.xml
<authorizationStrategy class="hudson.security.ProjectMatrixAuthorizationStrategy">
<permission>hudson.model.Hudson.Administer:my_google_account</permission>
</authorizationStrategy>
2. Update my jenkins
check the version of jenkins which I have
>rpm -qa | grep -i jenkins
jenkins-1.437-1.1
>rpm -e jenkins
Install the jenkins from rpm
>sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
>sudo rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
>yum install jenkins
3. Begin to configure a new project from github
configured maven, ant, jdk in my jenkins.
Try to install the plugins for git, they are as follow:
github-api
Github Authentication plugin
Jenkins GIT plugin
GitHub plugin
But I got this error message:
Failed to connect to repository : Command "git ls-remote -h git@github.com:luohuazju/easy.git HEAD" returned status code 128:stdout:
stderr: Host key verification failed.
fatal: The remote end hung up unexpectedly
Solution:
/var/lib/jenkins/.ssh
cp my private key to that location.
And then I generate the key with the user root, I change the jenkins user to 'root'. Maybe next time, I will generate the key with jenkins user.
And I should use this repository URL git@github.com:luohuazju/easy.git.
Then I can create the project which fetch codes from github.
4. Make the project work with JBOSS
This is for deploy one jar core package to JBOSS server default deploy directory.
…snip...
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jboss-maven-plugin</artifactId>
<version>1.5.0</version>
<configuration>
<jbossHome>/opt/jboss-as</jbossHome>
<serverName>default</serverName>
<fileName>target/${project.artifactId}-${project.version}.jar</fileName>
</configuration>
</plugin>
</plugins>
</build>
…snip…
The command will be
>mvn clean package install jboss:hard-deploy
And this is for the web project, we will deploy a war package to the jboss deploy directory.
<build>
<finalName>easyrestserver</finalName>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<versionRange>[2.0,)</versionRange>
<goals>
<goal>copy-dependencies</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<packagingExcludes>WEB-INF/lib/easyapi-1.0.jar,WEB-INF/classes/config.properties,WEB-INF/classes/log4j.properties</packagingExcludes>
<warSourceExcludes>index.jsp</warSourceExcludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.8</version>
<configuration]]>
<printSummary]]>false</printSummary]]>
<redirectTestOutputToFile]]>true</redirectTestOutputToFile]]>
<excludes]]>
<exclude]]>**/*_Roo_*</exclude]]>
</excludes]]>
</configuration]]>
</plugin]]>
<plugin]]>
<groupId]]>org.apache.maven.plugins</groupId]]>
<artifactId]]>maven-assembly-plugin</artifactId]]>
<version]]>2.2.1</version]]>
<configuration]]>
<descriptorRefs]]>
<descriptorRef]]>jar-with-dependencies</descriptorRef]]>
</descriptorRefs]]>
</configuration]]>
</plugin]]>
<plugin]]>
<groupId]]>org.apache.maven.plugins</groupId]]>
<artifactId]]>maven-deploy-plugin</artifactId]]>
<version]]>2.6</version]]>
</plugin]]>
<!-- IDE -->
<plugin]]>
<groupId]]>org.apache.maven.plugins</groupId]]>
<artifactId]]>maven-eclipse-plugin</artifactId]]>
<version]]>2.7</version]]><!-- Note 2.8 does not work with AspectJ aspect path -->
<configuration]]>
<downloadSources]]>true</downloadSources]]>
<downloadJavadocs]]>false</downloadJavadocs]]>
<wtpversion]]>2.0</wtpversion]]>
<additionalBuildcommands]]>
<buildCommand]]>
<name]]>org.eclipse.ajdt.core.ajbuilder</name]]>
<arguments]]>
<aspectPath]]>org.springframework.aspects</aspectPath]]>
</arguments]]>
</buildCommand]]>
<buildCommand]]>
<name]]>org.springframework.ide.eclipse.core.springbuilder</name]]>
</buildCommand]]>
</additionalBuildcommands]]>
<additionalProjectnatures]]>
<projectnature]]>org.eclipse.ajdt.ui.ajnature</projectnature]]>
<projectnature]]>com.springsource.sts.roo.core.nature
</projectnature]]>
<projectnature]]>org.springframework.ide.eclipse.core.springnature
</projectnature]]>
</additionalProjectnatures]]>
</configuration]]>
</plugin]]>
<plugin]]>
<groupId]]>org.apache.maven.plugins</groupId]]>
<artifactId]]>maven-idea-plugin</artifactId]]>
<version]]>2.2</version]]>
<configuration]]>
<downloadSources]]>true</downloadSources]]>
<dependenciesAsLibraries]]>true</dependenciesAsLibraries]]>
</configuration]]>
</plugin]]>
<plugin]]>
<groupId]]>org.codehaus.mojo</groupId]]>
<artifactId]]>tomcat-maven-plugin</artifactId]]>
<version]]>1.1</version]]>
</plugin]]>
<plugin]]>
<groupId]]>org.mortbay.jetty</groupId]]>
<artifactId]]>jetty-maven-plugin</artifactId]]>
<version]]>7.4.2.v20110526</version]]>
<configuration]]>
<webAppConfig]]>
<contextPath]]>/${project.name}</contextPath]]>
</webAppConfig]]>
</configuration]]>
</plugin]]>
<plugin]]>
<groupId]]>org.codehaus.mojo</groupId]]>
<artifactId]]>jboss-maven-plugin</artifactId]]>
<version]]>1.5.0</version]]>
<configuration]]>
<jbossHome]]>/opt/jboss-as</jbossHome]]>
<serverName]]>default</serverName]]>
<unpack]]>false</unpack]]>
</configuration]]>
</plugin]]>
</plugins]]>
</build]]>
The command will be
>mvn clean package jboss:hard-deploy
references:
http://sillycat.iteye.com/blog/1308891
http://sillycat.iteye.com/blog/1423479
1. Configuration on Redhat
I follow the document I wrote before to install the jenkins on my red hat server. And I tried to change some configuration on that.
Command to restart the server:
>sudo /etc/init.d/jenkins restart
Place to change the port and server log place
>vi /etc/sysconfig/jenkins
Maybe, someone else install the jenkins before on that red hat, so I can not login on to that system.
I find a place to change the jenkins user configuration:
>cd /var/lib/jenkins/
>vi config.xml
<authorizationStrategy class="hudson.security.ProjectMatrixAuthorizationStrategy">
<permission>hudson.model.Hudson.Administer:my_google_account</permission>
</authorizationStrategy>
2. Update my jenkins
check the version of jenkins which I have
>rpm -qa | grep -i jenkins
jenkins-1.437-1.1
>rpm -e jenkins
Install the jenkins from rpm
>sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
>sudo rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key
>yum install jenkins
3. Begin to configure a new project from github
configured maven, ant, jdk in my jenkins.
Try to install the plugins for git, they are as follow:
github-api
Github Authentication plugin
Jenkins GIT plugin
GitHub plugin
But I got this error message:
Failed to connect to repository : Command "git ls-remote -h git@github.com:luohuazju/easy.git HEAD" returned status code 128:stdout:
stderr: Host key verification failed.
fatal: The remote end hung up unexpectedly
Solution:
/var/lib/jenkins/.ssh
cp my private key to that location.
And then I generate the key with the user root, I change the jenkins user to 'root'. Maybe next time, I will generate the key with jenkins user.
And I should use this repository URL git@github.com:luohuazju/easy.git.
Then I can create the project which fetch codes from github.
4. Make the project work with JBOSS
This is for deploy one jar core package to JBOSS server default deploy directory.
…snip...
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jboss-maven-plugin</artifactId>
<version>1.5.0</version>
<configuration>
<jbossHome>/opt/jboss-as</jbossHome>
<serverName>default</serverName>
<fileName>target/${project.artifactId}-${project.version}.jar</fileName>
</configuration>
</plugin>
</plugins>
</build>
…snip…
The command will be
>mvn clean package install jboss:hard-deploy
And this is for the web project, we will deploy a war package to the jboss deploy directory.
<build>
<finalName>easyrestserver</finalName>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<versionRange>[2.0,)</versionRange>
<goals>
<goal>copy-dependencies</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore/>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<packagingExcludes>WEB-INF/lib/easyapi-1.0.jar,WEB-INF/classes/config.properties,WEB-INF/classes/log4j.properties</packagingExcludes>
<warSourceExcludes>index.jsp</warSourceExcludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<configuration>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.8</version>
<configuration]]>
<printSummary]]>false</printSummary]]>
<redirectTestOutputToFile]]>true</redirectTestOutputToFile]]>
<excludes]]>
<exclude]]>**/*_Roo_*</exclude]]>
</excludes]]>
</configuration]]>
</plugin]]>
<plugin]]>
<groupId]]>org.apache.maven.plugins</groupId]]>
<artifactId]]>maven-assembly-plugin</artifactId]]>
<version]]>2.2.1</version]]>
<configuration]]>
<descriptorRefs]]>
<descriptorRef]]>jar-with-dependencies</descriptorRef]]>
</descriptorRefs]]>
</configuration]]>
</plugin]]>
<plugin]]>
<groupId]]>org.apache.maven.plugins</groupId]]>
<artifactId]]>maven-deploy-plugin</artifactId]]>
<version]]>2.6</version]]>
</plugin]]>
<!-- IDE -->
<plugin]]>
<groupId]]>org.apache.maven.plugins</groupId]]>
<artifactId]]>maven-eclipse-plugin</artifactId]]>
<version]]>2.7</version]]><!-- Note 2.8 does not work with AspectJ aspect path -->
<configuration]]>
<downloadSources]]>true</downloadSources]]>
<downloadJavadocs]]>false</downloadJavadocs]]>
<wtpversion]]>2.0</wtpversion]]>
<additionalBuildcommands]]>
<buildCommand]]>
<name]]>org.eclipse.ajdt.core.ajbuilder</name]]>
<arguments]]>
<aspectPath]]>org.springframework.aspects</aspectPath]]>
</arguments]]>
</buildCommand]]>
<buildCommand]]>
<name]]>org.springframework.ide.eclipse.core.springbuilder</name]]>
</buildCommand]]>
</additionalBuildcommands]]>
<additionalProjectnatures]]>
<projectnature]]>org.eclipse.ajdt.ui.ajnature</projectnature]]>
<projectnature]]>com.springsource.sts.roo.core.nature
</projectnature]]>
<projectnature]]>org.springframework.ide.eclipse.core.springnature
</projectnature]]>
</additionalProjectnatures]]>
</configuration]]>
</plugin]]>
<plugin]]>
<groupId]]>org.apache.maven.plugins</groupId]]>
<artifactId]]>maven-idea-plugin</artifactId]]>
<version]]>2.2</version]]>
<configuration]]>
<downloadSources]]>true</downloadSources]]>
<dependenciesAsLibraries]]>true</dependenciesAsLibraries]]>
</configuration]]>
</plugin]]>
<plugin]]>
<groupId]]>org.codehaus.mojo</groupId]]>
<artifactId]]>tomcat-maven-plugin</artifactId]]>
<version]]>1.1</version]]>
</plugin]]>
<plugin]]>
<groupId]]>org.mortbay.jetty</groupId]]>
<artifactId]]>jetty-maven-plugin</artifactId]]>
<version]]>7.4.2.v20110526</version]]>
<configuration]]>
<webAppConfig]]>
<contextPath]]>/${project.name}</contextPath]]>
</webAppConfig]]>
</configuration]]>
</plugin]]>
<plugin]]>
<groupId]]>org.codehaus.mojo</groupId]]>
<artifactId]]>jboss-maven-plugin</artifactId]]>
<version]]>1.5.0</version]]>
<configuration]]>
<jbossHome]]>/opt/jboss-as</jbossHome]]>
<serverName]]>default</serverName]]>
<unpack]]>false</unpack]]>
</configuration]]>
</plugin]]>
</plugins]]>
</build]]>
The command will be
>mvn clean package jboss:hard-deploy
references:
http://sillycat.iteye.com/blog/1308891
http://sillycat.iteye.com/blog/1423479
发表评论
-
Stop Update Here
2020-04-28 09:00 310I will stop update here, and mo ... -
NodeJS12 and Zlib
2020-04-01 07:44 467NodeJS12 and Zlib It works as ... -
Docker Swarm 2020(2)Docker Swarm and Portainer
2020-03-31 23:18 361Docker Swarm 2020(2)Docker Swar ... -
Docker Swarm 2020(1)Simply Install and Use Swarm
2020-03-31 07:58 363Docker Swarm 2020(1)Simply Inst ... -
Traefik 2020(1)Introduction and Installation
2020-03-29 13:52 328Traefik 2020(1)Introduction and ... -
Portainer 2020(4)Deploy Nginx and Others
2020-03-20 12:06 419Portainer 2020(4)Deploy Nginx a ... -
Private Registry 2020(1)No auth in registry Nginx AUTH for UI
2020-03-18 00:56 428Private Registry 2020(1)No auth ... -
Docker Compose 2020(1)Installation and Basic
2020-03-15 08:10 364Docker Compose 2020(1)Installat ... -
VPN Server 2020(2)Docker on CentOS in Ubuntu
2020-03-02 08:04 444VPN Server 2020(2)Docker on Cen ... -
Buffer in NodeJS 12 and NodeJS 8
2020-02-25 06:43 376Buffer in NodeJS 12 and NodeJS ... -
NodeJS ENV Similar to JENV and PyENV
2020-02-25 05:14 464NodeJS ENV Similar to JENV and ... -
Prometheus HA 2020(3)AlertManager Cluster
2020-02-24 01:47 413Prometheus HA 2020(3)AlertManag ... -
Serverless with NodeJS and TencentCloud 2020(5)CRON and Settings
2020-02-24 01:46 330Serverless with NodeJS and Tenc ... -
GraphQL 2019(3)Connect to MySQL
2020-02-24 01:48 242GraphQL 2019(3)Connect to MySQL ... -
GraphQL 2019(2)GraphQL and Deploy to Tencent Cloud
2020-02-24 01:48 443GraphQL 2019(2)GraphQL and Depl ... -
GraphQL 2019(1)Apollo Basic
2020-02-19 01:36 320GraphQL 2019(1)Apollo Basic Cl ... -
Serverless with NodeJS and TencentCloud 2020(4)Multiple Handlers and Running wit
2020-02-19 01:19 306Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(3)Build Tree and Traverse Tree
2020-02-19 01:19 310Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(2)Trigger SCF in SCF
2020-02-19 01:18 285Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(1)Running with Component
2020-02-19 01:17 302Serverless with NodeJS and Tenc ...
相关推荐
第1章 Jenkins简述 4 1.1 Jenkins是什么? 4 1.2 为什么是Jenkins? 4 1.3 持续集成是什么? 4 1.4 安装Jenkins系统要求 4 第 2 章 安装Jenkins 5 2.1 下载Jenkins 5 2.2 开始Jenkins 5 2.3 连接Jenkins 6 第 3章 ...
jdk1.8支持的最后一个版本jenkins,验证可用Jenkins 2.346.1 jenkins.msi jdk1.8支持的最后一个版本jenkins,验证可用Jenkins 2.346.1 jenkins.msi jdk1.8支持的最后一个版本jenkins,验证可用Jenkins 2.346.1 ...
7. **安装与升级**:提供的两个文件`setup.exe`和`jenkins-1.602.msi`表明了安装Jenkins的两种方式,`setup.exe`可能是Windows平台上的安装程序,而`jenkins-1.602.msi`是Windows Installer包,用于更方便地在...
jenkins2.150下载rpm安装包,安装yum localinstall ./jenkins-2.150.1-1.1.noarch.rpm 安装后执行rcjenkins start启动,端口8080
在CentOS 8 上安装Jenkins需要使用...运行以下命令下载并导入GPG密钥 sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo sudo rpm –import https://jenkins-ci.org/
支持java8的jenkins插件,jenkins版本-Jenkins 2.346.1。解压替换jenkins插件目录plugins,就可以使用jenkins创建项目了。
2.346.1 版本是Jenkins的一个具体发行版,每个新版本通常会包含错误修复、性能改进以及新的特性和插件。这个版本可能包含了对之前版本问题的解决,提高了稳定性,并可能引入了对最新开发工具和技术的支持。在升级到...
在内网环境中部署Jenkins(版本2.346.1)时,由于网络限制,我们通常无法直接从官方仓库在线下载所需的插件。在这种情况下,我们需要采用离线方式安装插件,确保Jenkins能够正常运行并满足内网环境的需求。以下是...
jenkins.war和jenkins-2.60.1.zip Jenkins是一个开源的、提供友好操作界面的持续集成(CI)工具,起源于Hudson(Hudson是商用的),主要用于持续、自动的构建/测试软件项目、监控外部任务的运行(这个比较抽象,暂且...
【Jenkins 2.164.1 使用详解】 Jenkins 是一款开源的持续集成(Continuous Integration, CI)工具,广泛应用于自动化各种软件构建、测试和部署任务。版本2.164.1是 Jenkins 的一个重要里程碑,它带来了许多改进和新...
Jenkins 简介 Jenkins 是一个开源软件项目,...2 sudo rpm ‐‐import https://pkg.jenkins.io/redhat‐stable/jenkins.io.key 如果您以前从 Jenkins 导入过 key,那么 rpm --import 将失败,因为您已经有一个 key。
詹金斯配置Groovy脚本集合,用于自动配置Jenkins和第三方插件诸如Jenkins Job DSL之类的工具允许您以编程方式创建作业和其他资源。 但是,Jenkins本身的配置仍然是手动过程,容易出错。 这些脚本可用于创建可重现...
1. Jenkins离线安装: 要在离线环境中安装Jenkins,首先需要下载最新版本的Jenkins WAR文件,即"jenkins.war"。这个文件是Jenkins服务器的核心,包含了运行Jenkins服务的基本组件。用户可以通过在命令行中使用`java...
jdk1.8支持的最后一个版本jenkins,验证可用Jenkins Jenkins 2.289.3 jenkins.msi jdk1.8支持的最后一个版本jenkins,验证可用Jenkins Jenkins 2.289.3 jenkins.msi jdk1.8支持的最后一个版本jenkins,验证可用...
Jenkins1.509 Jenkins.war 1.509
这个压缩包包含Jenkins的基础环境——JDK8,Jenkins的核心文件——jenkins.war,以及一份关于Jenkins安装和配置的PDF指南,对于学习和部署Jenkins的初学者来说是非常有价值的资源。 首先,我们来详细了解一下...
If you want to get up and running with Jenkins, see Installing Jenkins for procedures on how to install Jenkins on your supported platform of choice. If you are a typical Jenkins user (of any skill ...
jenkins 2.346.1,jdk8 适用 git maven ssh插件
1. Jenkins 老版本的重要性:Jenkins 的每个版本都有可能包含新的功能、改进和修复的bug。然而,新版本可能会引入与现有项目不兼容的变化。因此,对于那些依赖于特定 Jenkins 版本的项目,使用老版本资源可以确保...
1.596.3 版本是 Jenkins 的一个历史版本,发布于2014年,这个版本包含了当时最新的特性和改进。 一、Jenkins 概述 Jenkins 提供了丰富的插件生态系统,支持多种编程语言和构建工具,如 Maven、Gradle、Ant,以及...