Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install_jenkins_debian.sh doesnot work #12

Open
saeidehvalipour opened this issue Apr 19, 2020 · 7 comments
Open

install_jenkins_debian.sh doesnot work #12

saeidehvalipour opened this issue Apr 19, 2020 · 7 comments

Comments

@saeidehvalipour
Copy link

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?

@wardviaene
Copy link
Owner

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

@saeidehvalipour
Copy link
Author

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
Copy link
Author

saeidehvalipour commented May 8, 2020

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?

@wardviaene
Copy link
Owner

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'

@saeidehvalipour
Copy link
Author

Thanks! It works!

@girishnambiar
Copy link

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:

@wardviaene
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants