【Jenkins操作系列】安装Git和Maven和Jenkins

♀尐吖头ヾ 提交于 2020-07-28 03:49:01

apt-get: command not found,这个的出现是因为系统的原因。

Linux系统分为两种:

1.RedHat系列:Redhat、Centos、Fedora等

2.Debian系列:Debian、Ubuntu等

RedHat系列的包管理工具是yum

Debian系列的包管理工具是apt-get

查看系统版本:

cat /proc/version

 

 

 

安装Git

sudo yum install git

 

查看是否成功

git --version

输出结果: git version 1.8.3.1

顺便说一下,yum安装git被安装在/usr/libexec/git-core目录下

 

安装Maven

安装包

 

上传到服务器上,并解压缩到指定包下

tar -zxvf apache-maven-3.6.3-bin.tar.gz -C /usr/local/maven

配置环境变量

vi /etc/profile

export MAVEN_HOME=/usr/local/apache-maven-3.6.3

export PATH=$MAVEN_HOME/bin:$PATH 

 

刷新环境变量 

source /etc/profile

 

检查版本

mvn -v

 

安装Jenkins

sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo

sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key

sum yum install jenkins

 

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!