最近工作中需要搭建SpringCloud的自动化部署平台,所以我们需要Jenkins做自动化部署。
1、获取源文件
$ wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat/jenkins.repo
2. 导入公钥
$ rpm --import https://jenkins-ci.org/redhat/jenkins-ci.org.key
3. 安装Jenkins
$ yum install jenkins -y
4. 配置文件
我们需要自定义Jenkins端口,打开配置文件
$ vim /etc/sysconfig/jenkins
修改端口号为8081(这里自定义就可以)