Jenkins部署
Posted 卑微小胡
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Jenkins部署相关的知识,希望对你有一定的参考价值。
Jenkins部署
安装tomcat
安装jdk
[root@localhost ~]# dnf -y install java-11-openjdk java-11-openjdk-devel
#安装过程省略
#查看安装的版本
[root@localhost ~]# java -version
openjdk version "11.0.11" 2021-04-20 LTS
OpenJDK Runtime Environment 18.9 (build 11.0.11+9-LTS)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.11+9-LTS, mixed mode, sharing)
安装tomcat
tomcat官网tomcat.apache.org
[root@localhost ~]# ls
anaconda-ks.cfg apr-util-1.6.1.tar.bz2
apache-tomcat-9.0.37.tar.gz httpd-2.4.43
apr-1.7.0 httpd-2.4.43.tar.bz2
apr-1.7.0.tar.bz2 mysql-5.7.33-linux-glibc2.12-x86_64.tar.gz
apr-util-1.6.1 pass
[root@localhost ~]# tar xf apache-tomcat-9.0.37.tar.gz
[root@localhost ~]# mv apache-tomcat-9.0.37 /usr/local/tomcat
[root@localhost ~]# ls /usr/local/
apache bin include libexec sbin tomcat
apr etc lib mysql share
apr-util games lib64 mysql-5.7.33-linux-glibc2.12-x86_64 src
启动tomcat
[root@localhost ~]# cd /usr/local/tomcat/
[root@localhost tomcat]# bin/catalina.sh start
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /usr
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
Tomcat started.
搭建jenkins
将下载好的jenkins.war放进tomcat/webapps目录下
[root@localhost ~]# mv jenkins.war /usr/local/tomcat/webapps/
[root@localhost ~]# ls /usr/local/tomcat/webapps/
docs examples host-manager jenkins.war manager ROOT
登入http://localhost:8080/jenkins,进入Jenkins初始化页面
复制密码并粘贴到下面解锁 Jenkins
[root@localhost ~]# cat /root/.jenkins/secrets/initialAdminPassword
6274c52835e64d309a251dae0be7906d
以上是关于Jenkins部署的主要内容,如果未能解决你的问题,请参考以下文章