centos7的服务器上安装jenkins

Jenkins安装步骤

1.安装JDK

        安装Jenkins前,确保要安装的机器上已经安装了jdk。

       使用java –version可以确认是否安装jdk,以及查看jdk的版本。

2.安装Jenkins

       导入仓库

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

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

      安装Jenkins

      yum install jenkins

(如果提示“没有可用的jenkins包”,则需要改vim /etc/yum.conf文件,使用reposdir=/etc/yum.repos.d   ,然后再执行安装jenkins命令)

      启动Jenkins

      systemctl start jenkins

3.配置Jenkins

输入服务器IP:8080访问Jenkins页面,如下图

 

找到红字标注的文件,查看解锁密码,如下图

 

将文件内的解锁密码输入,然后点击continue继续下一步

选择第一项就可以

 

大概安装ing

 

 

填好信息以后,就一路continue就OK 了。

4.安装Jenkins插件

需要安装的插件有:       


Amazon Web Services SDK
Ant    
Apache HttpComponents Client 4.x API
Authentication Tokens API Plugin
Autofavorite for Blue Ocean    
Bitbucket Branch Source
Bitbucket Pipeline for Blue Ocean
Blue Ocean    
Blue Ocean Core JS    
Blue Ocean Executor Info
Blue Ocean Pipeline Editor
bouncycastle API Plugin        
Branch API
Build Pipeline Plugin        
built-on-column
CloudBees AWS Credentials        
Command Agent Launcher Plugin        
Common API for Blue Ocean
Conditional BuildStep    
Config API for Blue Ocean
Config File Provider
Convert To Pipeline
Credentials
Credentials Binding
Dashboard for Blue Ocean
Design Language
disk-usage plugin
Display URL API
Display URL for Blue Ocean
Docker API Plugin
Docker Commons
Docker Pipeline
Durable Task
Email Extension
Email Extension Template Plugin
EnvInject API    
Environment Injector
Events API for Blue Ocean        
External Monitor Job Type Plugin    
Favorite        
Folders    
Git
Git client
Git Pipeline for Blue Ocean    
GIT server    
GitHub    
GitHub API Plugin    
GitHub Branch Source    
GitHub Pipeline for Blue Ocean    
Gradle        
Gradle Repo plugin        
Handy Uri Templates 2.x API        
HTML Publishe
i18n for Blue Ocean    
Infrastructure plugin for Publish Over X
Jackson 2 API
Jackson Databind Plugin
Javadoc Plugin
JavaScript GUI Lib: ACE Editor bundle plugin    
JavaScript GUI Lib: Handlebars bundle plugin
JavaScript GUI Lib: jQuery bundles (jQuery and jQuery UI) plugin
JavaScript GUI Lib: Moment.js bundle plugin
JavaScript GUI Lib: Numeral.js bundle plugin    
JavaScript GUI Lib: Twitter Bootstrap bundle plugin
JDK Parameter Plugin
JIRA
JIRA Integration for Blue Ocean
JIRA Trigger
JiraTestResultReporter plugin
jQuery
jQuery UI plugin    
JSch dependency    
JSoup
JSUnit plugin    
JUnit    
JUnit Attachments    
JWT for Blue Ocean
LDAP Plugin    
Localization: Chinese (Simplified)
Lockable Resources
Mail Commander Plugin for Jenkins-ci
Mailer    
MapDB API Plugin
Matrix Authorization Strategy    
Matrix Project Plugin
Matrix Tie Parent plugin
Maven Integration
Mercurial
Metrics
Metrics Disk Usage Plugin    
Metrics Ganglia Reporting Plugin
Multijob plugin
Oracle Java SE Development Kit Installer
OWASP Markup Formatter
PAM Authentication    
Parameterized Trigger plugin    
Pathignore Plugin    
Personalization for Blue Ocean
Pipeline
Pipeline Aggregator
Pipeline Dependency Walker Plugin
Pipeline Graph Analysis
Pipeline implementation for Blue Ocean
Pipeline Maven Integration
Pipeline NPM Integration Plugin
Pipeline Remote Loader
Pipeline SCM API for Blue Ocean
Pipeline Utility Steps
Pipeline: API        
Pipeline: Bamboo Step
Pipeline: Basic Steps
Pipeline: Build Step
Pipeline: Declarative
Pipeline: Declarative Agent API
Pipeline: Declarative Extension Points API
Pipeline: Deploymon.io Steps
Pipeline: GitHub
Pipeline: GitHub Groovy Libraries    
Pipeline: Groovy
Pipeline: Input Step
Pipeline: Job
Pipeline: Milestone Step
Pipeline: Model API
Pipeline: Multibranch
Pipeline: Multibranch with defaults    
Pipeline: Nodes and Processes
Pipeline: Phoenix AutoTest Plugin
Pipeline: REST API
Pipeline: SCM Step    
Pipeline: Shared Groovy Libraries
Pipeline: Stage Step    
Pipeline: Stage Tags Metadata
Pipeline: Stage View
Pipeline: Step API
Pipeline: Supporting APIs    
Plain Credentials Plugin
Plugin Usage - Plugin
Pub-Sub "light" Bus
Publish Over SSH    
Resource Disposer    
REST API for Blue Ocean
REST Implementation for Blue Ocean
ruby-runtime
Run Condition Plugin    
SCM API
SCM Filter Branch PR Plugin
SCM Sync Configuration Plugin
SCM to job plugin
Script Security
scripted Cloud Plugin    
Server Sent Events (SSE) Gateway    
Spring Initalzr plugin
SSH Credentials    
SSH plugin
SSH Slaves
Structs
Subversion    
Subversion Partial Release Manager plugin    
Subversion Revert Plugin
Subversion Workspace Cleaner
Timestamper
Token Macro
Variant    
Web for Blue Ocean
WMI Windows Agents
Workspace Cleanup Plugin
xUnit

5.安装maven

wget http://repos.fedorapeople.org/repos/dchen/apache-maven/epel-apache-maven.repo -O /etc/yum.repos.d/epel-apache-maven.repo

yum -y install apache-maven

6.安装Git

yum install -y git

7.安装node.js

      cd /usr/local/node/

   (此路径没有就新建一个)

     wget https://npm.taobao.org/mirrors/node/v6.5.0/node-v6.5.0-linux-x64.tar.gz

 

     解压安装包

tar -zxvf node-v6.5.0-linux-x64.tar.gz

     移除安装包

rm -rf node-v6.5.0-linux-x64.tar.gz

      创建软连接

ln -s /usr/local/node/node-v6.5.0-linux-x64/bin/npm /usr/local/bin/npm

ln -s /usr/local/node/node-v6.5.0-linux-x64/bin/node /usr/local/bin/node

      编辑/etc/profile,新增以下部分

vim /etc/profile

export PATH=/usr/local/node/node-v6.5.0-linux-x64/bin/:$PATH

echo $PATH

 

保存退出后,重新载入环境变量

source /etc/profile

 查看版本信息

  npm -v

 升级到指定版本号

 npm i -g npm@6.4.1

 安装yarn

npm install -g yarn

查看版本信息yarn -version

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值