Jenkins fails when running “service start jenkins”

前端 未结 21 2324
不知归路
不知归路 2021-01-30 20:46

I installed jenkins on Cnetos 7 using the following:

sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --impor         


        
21条回答
  •  失恋的感觉
    2021-01-30 21:17

    I was trying to install it in kubuntu 18.04, and i was already sure that i had java installed, I confirmed by trying

    java -version

    I got the output like that

    java version "1.8.0_91"
    Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
    Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
    

    Since I already know that my java PATH variables are defined in /etc/environment file, I added that file to the top of /etc/init.d/jenkins file

    source /etc/environment
    

    you can even remove the PATH from /etc/init.d/jenkins file, since it's already defined in /etc/environment

    after that, i restarted my jenkins server,and it seemed to start working fine from localhost:8080

提交回复
热议问题