jenkins安装

1、需要安装的软件:

JDK

Git

Maven

Jenkins

2、JDK安装

3、git安装

[root@localhost ~]# yum install -y git

[root@localhost ~]# cd /home/git

[root@localhost git]# git init

[root@localhost git]# git config --global user.name "zhijun"

[root@localhost git]# git config --global user.email "zhijun@mail.com"

[root@localhost git]# git add test01

[root@localhost git]# git commit -m "zhijun"

4、Maven安装,制作yum仓库:

[root@localhost ~]# wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo

[root@localhost ~]# yum install apache-maven -y

使用mvn -v验证安装是否成功

5、jenkins安装,制作yum仓库

[root@localhost ~]# wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo

[root@localhost ~]# rpm --import http://pkg.jenkins-ci.org/redhat/jenkins-ci.org.key

[root@localhost ~]# yum install jenkins

修改端口

[root@localhost ~]# vi /etc/sysconfig/jenkins

JENKINS_PORT="8080"

启动服务

service jenkins start

[root@localhost usr]# cat /var/lib/jenkins/secrets/initialAdminPassword

eb4b99a8e9534178a983884eebe1c4ce

打开图形界面:192.168.1.2:8080

输入初始化密码


安装插件:


这里说明一下我安装的一些插件:

Publish Over SSH (远程Shell)

ssh 插件: SSH plugin

Git 插件:Git plugin、Git client plugin

Parameter 插件: Git Parameter Plug-In(用于给git传参,可选择具体部署哪一个分支)

Maven 插件: Maven Integration plugin(用于maven构建项目)


环境配置

点击 【系统管理】 –> 【Global Tool Configuration】

密钥配置:






新建项目:


为测试效果创建个文件



接下来看看部署效果



部署成功。

上一篇:slave复制中断 ,别滥用SQL_SLAVE_SKIP_COUNTER


下一篇:MySQL MHA搭建