Jenkins 基于java开发的持续集成工具

安装jenkins前需安装好java环境

我环境为redhat7.0
下载java安装包: http://download.oracle.com/otn-pub/java/jdk/8u172-b11/a58eab1ec242421181065cdc37240b08/jdk-8u172-linux-x64.rpm
安装java安装包: rpm -ivh jdk-8u172-linux-x64.rpm

下载tomcat 压缩包:wget http://mirror.bit.edu.cn/apache/tomcat/tomcat-9/v9.0.8/bin/apache-tomcat-9.0.8.tar.gz

解压tomcat 压缩包到 /usr/local/src/tomcat : tar zxvf apache-tomcat-9.0.8.tar.gz -C /usr/local/src/tomcat

下载jenkins.war 包:wget http://mirrors.shu.edu.cn/jenkins/war-stable/2.121.1/jenkins.war

复制下载好的jenkins.war 包到: cp jenkins.war /usr/local/src/tomcat/webapps/

tomcat会自动解压此包;

启动tomcat: /usr/local/src/tomcat/bin/startup.sh

防火墙放行 8080端口: iptables -I INPUT -p tcp --dport=8080 -j ACCEPT

浏览器输入 IP地址:http://IP地址:8080/jenkins

会提示 输入密码 初始化、 提示密码存放路径: cat /root/.jenkins/secrets/initialAdminPassword