`
sillycat
  • 浏览: 2539948 次
  • 性别: Icon_minigender_1
  • 来自: 成都
社区版块
存档分类
最新评论

Jenkins Configuration(1)Setup on Redhat

 
阅读更多
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 楼 pch272215690 2014-07-15  
呵呵,鸟语很屌,嘚吧嘚吧。。。

相关推荐

    Jenkins学习笔记

    第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章 ...

    windows下验证可用Jenkins 2.346.1

    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 ...

    jenkins-1.602

    7. **安装与升级**:提供的两个文件`setup.exe`和`jenkins-1.602.msi`表明了安装Jenkins的两种方式,`setup.exe`可能是Windows平台上的安装程序,而`jenkins-1.602.msi`是Windows Installer包,用于更方便地在...

    jenkins2.150.1-1.1 centos redhat版RPM包

    jenkins2.150下载rpm安装包,安装yum localinstall ./jenkins-2.150.1-1.1.noarch.rpm 安装后执行rcjenkins start启动,端口8080

    在 CentOS 8 上安装Jenkins的方法

    在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/

    Jenkins 2.346.1插件

    支持java8的jenkins插件,jenkins版本-Jenkins 2.346.1。解压替换jenkins插件目录plugins,就可以使用jenkins创建项目了。

    jenkins.war包2.346.1版本

    2.346.1 版本是Jenkins的一个具体发行版,每个新版本通常会包含错误修复、性能改进以及新的特性和插件。这个版本可能包含了对之前版本问题的解决,提高了稳定性,并可能引入了对最新开发工具和技术的支持。在升级到...

    内网jenkins(2.346.1)部署离线下载插件

    在内网环境中部署Jenkins(版本2.346.1)时,由于网络限制,我们通常无法直接从官方仓库在线下载所需的插件。在这种情况下,我们需要采用离线方式安装插件,确保Jenkins能够正常运行并满足内网环境的需求。以下是...

    jenkins.war和jenkins-2.60.1.zip

    jenkins.war和jenkins-2.60.1.zip Jenkins是一个开源的、提供友好操作界面的持续集成(CI)工具,起源于Hudson(Hudson是商用的),主要用于持续、自动的构建/测试软件项目、监控外部任务的运行(这个比较抽象,暂且...

    jenkins 2.164.1 在用

    【Jenkins 2.164.1 使用详解】 Jenkins 是一款开源的持续集成(Continuous Integration, CI)工具,广泛应用于自动化各种软件构建、测试和部署任务。版本2.164.1是 Jenkins 的一个重要里程碑,它带来了许多改进和新...

    Jenkins 环境搭建.pdf

    Jenkins 简介 Jenkins 是一个开源软件项目,...2 sudo rpm ‐‐import https://pkg.jenkins.io/redhat‐stable/jenkins.io.key 如果您以前从 Jenkins 导入过 key,那么 rpm --import 将失败,因为您已经有一个 key。

    jenkins-configuration:一组用于配置Jenkins实例及其插件的实用程序

    詹金斯配置Groovy脚本集合,用于自动配置Jenkins和第三方插件诸如Jenkins Job DSL之类的工具允许您以编程方式创建作业和其他资源。 但是,Jenkins本身的配置仍然是手动过程,容易出错。 这些脚本可用于创建可重现...

    jenkins离线插件安装包大全

    1. Jenkins离线安装: 要在离线环境中安装Jenkins,首先需要下载最新版本的Jenkins WAR文件,即"jenkins.war"。这个文件是Jenkins服务器的核心,包含了运行Jenkins服务的基本组件。用户可以通过在命令行中使用`java...

    windows下安装Jenkins 2.289.3 jenkins.msi

    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

    Jenkins1.509 Jenkins.war 1.509

    jenkins压缩包,jdk8,jenkins.war以及Jenkins安装及配置的pdf

    这个压缩包包含Jenkins的基础环境——JDK8,Jenkins的核心文件——jenkins.war,以及一份关于Jenkins安装和配置的PDF指南,对于学习和部署Jenkins的初学者来说是非常有价值的资源。 首先,我们来详细了解一下...

    jenkins-user-handbook

    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 git maven ssh插件

    jenkins 2.346.1,jdk8 适用 git maven ssh插件

    jenkins老版本资源

    1. Jenkins 老版本的重要性:Jenkins 的每个版本都有可能包含新的功能、改进和修复的bug。然而,新版本可能会引入与现有项目不兼容的变化。因此,对于那些依赖于特定 Jenkins 版本的项目,使用老版本资源可以确保...

    jenkins_1.596.3.zip

    1.596.3 版本是 Jenkins 的一个历史版本,发布于2014年,这个版本包含了当时最新的特性和改进。 一、Jenkins 概述 Jenkins 提供了丰富的插件生态系统,支持多种编程语言和构建工具,如 Maven、Gradle、Ant,以及...

Global site tag (gtag.js) - Google Analytics