简体   繁体   English

Jenkins 安装在 Ubuntu 上,使用 Vagrant - 无 Z293C9EA246FF9985986ZF 访问

[英]Jenkins installation on Ubuntu using Vagrant - NO HTTP access

I've been trying to install Jenkins on ubuntu using Vagrant.我一直在尝试使用 Vagrant 在 ubuntu 上安装 Jenkins。 Even though I am not getting any errors along the way I am not able to open http://localhost:8080即使一路上我没有收到任何错误,我也无法打开 http://localhost:8080

Here's my steps:这是我的步骤:

  1. Install Vagrant and Virtual Box on MAC在MAC上安装Vagrant和Virtual Box
  2. Create a folder for the vagrant为 vagrant 创建一个文件夹
  3. vagrant init bento/ubuntu-16.04 vagrant 初始化便当/ubuntu-16.04
  4. nano Vagrantfile - delete the hasztag from the port forwarding to 8080 nano Vagrantfile - 从转发到 8080 的端口中删除 hasztag
  5. Vagrant up Vagrant向上
  6. Vagrant ssh Vagrant ssh

Install git:安装 git:

  1. Sudo apt-get install git sudo apt-get install git
  2. Git --version Git --版本

Installing Java:安装 Java:

  1. sudo apt update sudo apt 更新
  2. Sudo apt-get upgrade sudo apt-get 升级
  3. sudo apt install default-jdk sudo apt install default-jdk
  4. sudo apt install default-jre sudo apt install default-jre

Install Jenkins:安装 Jenkins:

  1. wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | wget -q -O - http://pkg.jenkins-ci.org/debian/jenkins-ci.org.key | sudo apt-key add - sudo apt-key 添加 -

  2. sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list' sudo sh -c 'echo deb http://pkg.jenkins-ci.org/debian binary/ > /etc/apt/sources.list.d/jenkins.list'

  3. sudo apt-get install -y jenkins --allow-unauthenticated sudo apt-get install -y jenkins --allow-unauthenticated

  4. To check the password: vi /var/log/jenkins/jenkins.log检查密码: vi /var/log/jenkins/jenkins.log

  5. To start Jenkins: systemctl start jenkins systemctl status jenkins启动 Jenkins: systemctl start jenkins systemctl status jenkins

When I start the jenkins server I can do telnet 127.0.0.1 8080 but when I turn it off it doesn't work.当我启动 jenkins 服务器时,我可以执行 telnet 127.0.0.1 8080 但是当我关闭它时它不起作用。 Any idea why I cannot access GUI using the browser?知道为什么我不能使用浏览器访问 GUI 吗?

Try in ubuntu to do "curl http://localhost:8080", if response is not some error code page, like 4xx/5xx, check firewall and allow traffic on port 8080. Therefore try to access Jenkins from Host Machine.尝试在 ubuntu 中执行“curl http://localhost:8080”,如果响应不是一些错误代码页面,如 4xx/5xx,请检查防火墙并允许端口 8080 上的流量。因此尝试从机器访问 Z2ADAE54334C0A5CE23E3 主机。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM