jenkins-course icon indicating copy to clipboard operation
jenkins-course copied to clipboard

install_jenkins_debian.sh doesnot work

Open saeidehvalipour opened this issue 4 years ago • 7 comments

I try to use scripts for Debian os but when I run the script it gives me an Error, like below:

E: Unable to locate package docker-ce Failed to enable unit: File docker.service: No such file or directory Failed to start docker.service: Unit docker.service not found. install_jenkins_debian.sh: line 20: docker: command not found

Note: I am running it in mac os any clue?

saeidehvalipour avatar Apr 19 '20 16:04 saeidehvalipour

Hi,

Looks like docker can't be installed on your machine. You can still install docker manually first, then run the script from this repo. See for example https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-debian-9 with some step-by-step instructions to get the official docker repository added and install docker from there.

-Edward

wardviaene avatar Apr 19 '20 20:04 wardviaene

Hi again, I fixed it, thanks,

Now I am getting error for install_jenkins.sh for ubuntu "root@ubuntu-s-4vcpu-8gb-ams3-01". Error: install_jenkins.sh: line 7: syntax error near unexpected token newline' install_jenkins.sh: line 7: '

any thought?

saeidehvalipour avatar May 06 '20 16:05 saeidehvalipour

Hi agaian,

I tried even for debian scripts, I keep getting the same error?

root@debian-s-4vcpu-8gb-ams3-01:~# bash install_jenkins_debian.sh install_jenkins_debian.sh: line 7: syntax error near unexpected token newline' install_jenkins_debian.sh: line 7: <!DOCTYPE html>' root@debian-s-4vcpu-8gb-ams3-01:~#

Any thought?

saeidehvalipour avatar May 08 '20 07:05 saeidehvalipour

If you have installed docker yourself using the link I gave you, you don't need to run the whole script anymore. You can just copy paste the following lines (starting from line 18 in the install jenkins script):

run jenkins

mkdir -p /var/jenkins_home chown -R 1000:1000 /var/jenkins_home/ docker run -p 8080:8080 -p 50000:50000 -v /var/jenkins_home:/var/jenkins_home -d --name jenkins jenkins/jenkins:lts

show endpoint

echo 'Jenkins installed' echo 'You should now be able to access jenkins at: http://'$(curl -s ifconfig.co)':8080'

wardviaene avatar May 08 '20 07:05 wardviaene

Thanks! It works!

saeidehvalipour avatar May 10 '20 07:05 saeidehvalipour

Hi - I am unable to install docker manually. It is giving me error: E: Package 'docker-ce' has no installation candidate root@ubuntu-s-Girish-1gb-nyc1-01:~# apt-cache policy docker-ce docker-ce: Installed: (none) Candidate: (none) Version table:

girishnambiar avatar Jul 10 '20 01:07 girishnambiar

Are you using the latest version? If you're running a more recent version of ubuntu, use this version from master: https://github.com/wardviaene/jenkins-course/blob/master/scripts/install_jenkins.sh

wardviaene avatar Jul 10 '20 06:07 wardviaene