1.war包方式:下载jenkins.war 文件比较稳定 https://jenkins.io/zh/doc/book/installing/#setup-wizard
运行命令:
java -jar jenkins.war 默认8080
java -jar jenkins.war --httpPort=9090 指定端口
访问localhost:9090
解锁 Jenkins:获取密码
/root/.jenkins/secrets/initialAdminPassword
2.第二种方式下载jenkins http://pkg.jenkins-ci.org/redhat/下载rpm包到本地
安装:sudo rpm -ih jenkins-2.168-1.1.noarch.rpm
要么下载jenkins的库
sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat/jenkins.repo
sudo rpm --import https://pkg.jenkins.io/redhat/jenkins.io.key
下载jenkins:
yum install jenkins
操作命令:
删除软件:yum remove jenkins-x.x.x.rpm或者yum erase jenkins-x.x.x.rpm
升级软件:yum upgrade jenkins或者yum update jenkins
查询信息:yum info jenkins
启动停止命令:
service jenkins start|stop|restart
start|stop|restart