yum -y install java
添加JPackage源java
yum -y install wget wget http://www.jpackage.org/jpackage50.repo -P /etc/yum.repos.d/
安装Antweb
yum -y install ant
yum -y install maven
yum -y install tomcat
设置tomcat编码为UTF-8tomcat
# vi /etc/tomcat/server.xmlbash
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" URIEncoding="UTF-8" />
下载jenkins.war到webapps目录下app
wget http://mirrors.jenkins-ci.org/war/latest/jenkins.war -P /var/lib/tomcat/webapps/
设置tomcat自启动,并启动tomcatwebapp
chkconfig tomcat on
service tomcat start
访问Jenkins主页 http://localhost:8080/jenkinsmaven
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo sudo rpm --import http://pkg.jenkins-ci.org/redhat-stable/jenkins-ci.org.key yum install jenkins
设置jenkins自启动,并启动jenkins编码
chkconfig jenkins on service jenkins start
jenkins默认端口是8080,若是端口已被别的程序占用,可在jenkins配置文件/etc/sysconfig/jenkins中修改jenkins端口号spa
JENKINS_PORT="8001"
若是还安装有tomcat程序,还需修改AJP端口号插件
JENKINS_AJP_PORT="8010"
访问Jenkins主页 http://localhost:8001
Jenkins可以集成各式插件,如经常使用CI插件:deploy,junit,findbugs,pmd,checkstyle,clover, duplicate code,jmeter,selenium等
点击 “系统管理” -> “管理插件”
点击 “可选插件”,选择须要的插件
而后点击 “直接安装”