Jenkins安装

   

安装JDK

mkdir /root/JDK
cd /root/JDK
wget https://download.oracle.com/otn/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz?AuthParam=1606979543_43cb68ea54f23ecb15415f4de2a57500
tar -zxvf /root/JDK/jdk-8u131-linux-x64.tar.gz
vim /etc/profile
    export JAVA_HOME=/root/JDK/jdk1.8.0_131 
    export JRE_HOME=${JAVA_HOME}/jre 
    export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib 
    export PATH=${JAVA_HOME}/bin:$PATH
source /etc/profile

下载jenkins

wget https://mirrors.tuna.tsinghua.edu.cn/jenkins/war-stable/2.204.1/jenkins.war

启动Jenkins

java -jar jenkins.war --httpPort=8080

后台方式启动Jenkins

nohup java -jar jenkins.war --httpPort=8080 &

访问Jenkins

访问Jenkins的地址:http://ip地址:8080

/root/.jenkins/secrets/initialAdminPassword找到密码

选择左侧安装推荐的插件,等待安装即可。



发表评论