码迷,mamicode.com
首页 > 其他好文 > 详细

jenkins安装

时间:2018-05-13 21:09:51      阅读:128      评论:0      收藏:0      [点我收藏+]

标签:jenkins安装

1、安装maven

yum install net-tools
ifconfig
tar -zxvf apache-maven-3.5.2-bin.tar.gz -C /usr/local
cd /usr/local/
ll
cd apache-maven-3.5.2/
ll
ln -s /usr/local/apache-maven-3.5.2/bin/mvn /usr/bin/mvn
mvn --version
2、安装jdk打开端口

cd /opt/
rpm -ivh jdk-8u161-linux-x64.rpm
mvn --version
yum install git -y
rpm -ivh jenkins-2.109-1.1.noarch.rpm
firewall-cmd --zone=public --add-port=8080/tcp --permanent --》开放端口
firewall-cmd --reload --》重启防火墙
firewall-cmd --zone=public --list-ports --》查看开放端口
reboot
cat /var/lib/jenkins/secrets/initialAdminPassword
mvn --version

3、卸载jenkins

systemctl stop jenkins
rpm -e jenkins-2.109-1.1.noarch
find / -name jenkins
rm - rf /var/lib/jenkins
find / -name jenkins
4、安装jenkins

rpm -ivh jenkins-2.109-1.1.noarch.rpm
systemctl start jenkins
ps -ef| grep java
cat /var/lib/jenkins/secrets/initialAdminPassword
yum install git -y
systemctl restart jenkins
mvn -v
cd /usr/local/apache-maven-3.5.2/conf/
vim settings.xml
yum install vim -y --》安装vim编辑器
vim settings.xml
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>;
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>

5、安装插件组件
1、Publish over SSH
2、Maven Integration
3、Deploy to container Plugin

jenkins安装

标签:jenkins安装

原文地址:http://blog.51cto.com/guoshaoliang789/2115767

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!