我try 了Azure免费服务-1 GB内存的Linux VMB1,安装了Jenkins,允许端口80、22、8080,在浏览器中通过VM的PUBLIC_IP:8080登录到Jenkins,并输入了从Jenkins服务器获取的密码.

在那之后,我就无法获得jenkins 的主页.它显示为空白页面:

AzureLinuxVMB1SJenkins

我在这里try 了Azure Documentation for Jenkins服务器安装中列出的命令,因为它也允许相同的端口,并使用3.5 GB RAM的DSv1系列创建.

我能够获得Jenkins服务器的主页,就像它显示的Install Plugins菜单一样.

唯一的区别是RAM和vCPU. 其中,与Jenkins安装document中一样,提到最低硬件要求是1 GB RAM和256 GB ROM.

推荐答案

当您try 访问大小为Azure B1sVM上的Jenkins home page时,可能会出现空白页面的原因有几种.

如果您的VM没有足够的RAMCPU资源,则Jenkins homepage可能无法正确加载.在这种情况下,它可能很难正确显示页面.请查看您的VM上的RAM使用情况.此外,浏览器缓存有时会导致显示问题.考虑从不同的浏览器访问Jenkins,或者清除当前浏览器的缓存.

我已经在VM上安装了Jenkins Server,尺寸为B1s1 GB RAM

enter image description here

我可以用配置了RAM1 CPU1GBVM打开Jenkins homepage,只需稍加延迟.

enter image description here

我建议您遵循Jenkins对小型团队配置的要求,以便在您的VM上流畅地安装Jenkins.我使用的是标准的B2MS,2vCPU和8 GB的内存.

enter image description here

一旦您完成了您的VM设置,请确保允许端口8080.

enter image description here

假设您已经验证了其他先决条件,如JDK版本,如下所示-

enter image description here

Start with the Jenkins setup process as below-
Pull the Jenkins repo and append the package to the system.

enter image description here

更新您的系统sudo apt update

enter image description here

curl -fsSL https://pkg.jenkins.io/debian/jenkins.io-2023.key | sudo tee \
  /usr/share/keyrings/jenkins-keyring.asc > /dev/null

&;

echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
https://pkg.jenkins.io/debian binary/ | sudo tee \
  /etc/apt/sources.list.d/jenkins.list > /dev/null

安装Jenkins apt install jenkins -y

enter image description here

现在转到Azure Portalenter code here控制台.从概述部分复制公共IP地址,并将其粘贴到您的浏览器http://your-public-ip:8080中,它应该可以工作.如果您的浏览器没有加载,只需验证您是否可以使用curl localhost:8080本地访问Jenkins

enter image description here

enter image description here

如果失败,请验证您是否如上所述打开了端口8080.如果允许该端口,则您应该能够在您的浏览器上访问Jenkins,如下所示-

enter image description here

对于解锁Jenkins页面上显示的路径,您可以使用cat获取凭据

sudo cat /var/lib/jenkins/secrets/initialAdminPassword

将密码复制粘贴到管理员密码中,安装默认建议插件,即可访问Jenkins,如下所示-

enter image description here

插件安装完成后,如下所示

enter image description here

您将被重定向到登录页面,相应地设置您的凭据,然后单击下一步.

enter image description here

您已登录到Jenkins控制面板.

enter image description here

enter image description here

参考文献:Official Jenkins Installation document

Linux相关问答推荐

如何删除字符串中的`{{i:`and `}}`

如何告诉链接器不要在链接的共享库中查找某些符号?

awk 使用动态列号

将特定列转换为行

为什么`__vfprintf_internal`(`stdio.h`中的`printfn`)强制`$rbp`在我的x86-64机器上向前跳转6313864字节?

如何让 Flutter 用鼠标拖动而不是滚轮滚动? (Linux)

从 Ansible 中的 shell 命令输出中提取特定数据

`std::cout` 是如何实现的?

问题:Virtio rpmsg 总线 virtio0:收到的 msg 没有收件人 - 在 Yocto Hardknott - imx7d-pico

MessageBox 的 GTK 实现

任何方式以编程方式在android上运行shell命令?

SVN 错误:无法将字符串从本机编码转换为UTF-8

如何让 GNU 屏幕读取 .bash_profile/.bash_rc 更改?

qstat 和长作业(job)名称

如何在字符串中查找子字符串(或如何 grep 变量)?

如何在 shell 脚本中向文件中添加一行?

在文件夹中的 gzip 文件中查找字符串

在 Unix 上计算每行/字段的字符出现次数

readelf vs. objdump:为什么都需要

Linux 上的最大文件/目录数?