jenkins-course
jenkins-course copied to clipboard
install_jenkins_debian.sh doesnot work
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?
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
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?
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?
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'
Thanks! It works!
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:
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