作者:mobiledu2502853473 | 来源:互联网 | 2023-08-27 19:02
1、下载jenkinswar包https:jenkins.iodownload选择GenericJavapackage(.war)下载2、下载apachetomcat8https:
1、下载jenkins war包 https://jenkins.io/download/ 选择Generic Java package (.war)下载
2、下载apache tomcat 8 https://tomcat.apache.org/download-80.cgi
3、centos 安装jdk1.8
yum list installed |grep java
yum -y remove java-1.7.0-openjdk*
yum -y remove tzdata-java.noarch
yum -y install java-1.8.0-openjdk*
4、centos 启动tomcat 并把jenkins.war包放到tomcat webapps文件夹下
5、tomcat 配置jenkins home 和tomcat 内存 catalina.sh 文件添加
# OS specific support. $var _must_ be set to either true or false.
export JENKINS_HOME="/data/.jenkins"
JAVA_OPTS="-server -Xms8g -Xmx8g"
6、打包迁移jenkins home下的job目录 tar czf jobs.tar.gz jobs 解压 tar -xzvf jobs
7、开通jenkins连gitlab防火墙
8、开通jenkins连maven防火墙
9、配置maven 和node环境变量/etc/profile
export NODE_HOME=/data/jenkins/node-v10.8.0-linux-x64
export PATH=$NODE_HOME/bin:$PATH
export MAVEN_HOME=/data/jenkins/apache-maven-3.5.0
export PATH=$MAVEN_HOME/bin:$PATH
10、启动tomcat 并访问jenkins
欢迎关注自动化测试技术公众号 :为测