Jenkins fails when running “service start jenkins”

前端 未结 21 2367
不知归路
不知归路 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:32

    I faced same issue while setting up jenkins, the problem is that java is not installed and hence not available in path.

    The simplest way is to use scp here to copy jdk binaries to aws ec2 box, script won't work if you make one as they keep on updating download urls(Orale, i mean): scp -i C:/Users/key-pair.pem jdk-8u191-linux-x64.tar.gz ec2- user@54.183.220.7:~/

    $cd /opt
    
    $sudo cp /home/ec2-user/jdk* .
    
    $sudo chmod +x jdk*
    
    $sudo tar xzf jdk-8u191-linux-x64.tar.gz
    
    $sudo tar xzf jdk-8u191-linux-x64.tar.gz
    
    $cd jdk1.8.0_191/
    
    $sudo alternatives --install /usr/bin/java java /opt/jdk1.8.0_191/bin/java 2
    
    $sudo alternatives --config java
    

    Here I download tar.gz file in loal windows and transferred over scp to AWS ec2-user, default dir. Hope it helps.

提交回复
热议问题