本文共 1592 字,大约阅读时间需要 5 分钟。
jenkins安装
配置好tomcat JAVA
wget https://mirrors.tuna.tsinghua.edu.cn/jenkins/war-stable/2.73.3/jenkins.warcp jenkins.war /usr/local/tomcat/webapps/
登陆 0.0.0.0:8080/jenkins 开始安装
cat /root/.jenkins/secrets/initialAdminPassword ##安装密码和登陆密码 是在这。
选择安装基本插件代码仓库git 代码编译Maven 代码环境 Tomcat
安装git
yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMakerwget https://github.com/git/git/archive/v2.15.0.tar.gztar zxvf v2.15.0.tar.gzcd git-2.15.0make configure./configure --prefix=/usr/local/git --with-iconv=/usr/local/libiconvmake all docmake install install-doc install-htmlvim /etc/profileexport PATH=/usr/local/git/bin:$PATHsource /etc/profilegit --version
Maven
wget http://mirror.bit.edu.cn/apache/maven/maven-3/3.5.2/binaries/apache-maven-3.5.2-bin.tar.gztar zxvf apache-maven-3.5.2-bin.tar.gzmv apache-maven-3.5.2 /usr/local/mavenvim /etc/profileexport M2_HOME=/usr/local/maven export M2=$M2_HOME/binexport PATH=$M2:$PATHsource /etc/profilemvn -versionApache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T15:58:13+08:00)Maven home: /usr/local/mavenJava version: 1.8.0_151, vendor: Oracle CorporationJava home: /usr/local/jdk8.0/jreDefault locale: en_US, platform encoding: UTF-8OS name: "linux", version: "3.10.0-327.el7.x86_64", arch: "amd64", family: "unix"
选择 系统管理 --Global Tool Configuration
选择系统管理--插件管理--可选插件,安装如下插件
Maven Integration pluginDeploy to container PluginGitHub Authentication pluginSSH plugin
邮箱设置
选择系统管理--系统配置--Jenkins Location 输入邮箱