ubuntu18.04.6LTS sources.list 源文件备份

sources.list路径:/etc/apt

# deb cdrom:[Ubuntu 18.04.6 LTS _Bionic Beaver_ - Release amd64 (20210915)]/ bionic main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://archive.ubuntu.com/ubuntu bionic main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu bionic universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic universe
deb http://archive.ubuntu.com/ubuntu bionic-updates universe
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://archive.ubuntu.com/ubuntu bionic multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://archive.ubuntu.com/ubuntu bionic-updates multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://archive.ubuntu.com/ubuntu bionic-backports main restricted universe multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner

deb http://archive.ubuntu.com/ubuntu bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://archive.ubuntu.com/ubuntu bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://archive.ubuntu.com/ubuntu bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse

### 如何在 Ubuntu 18.04 上安装 Jenkins LTS 版本 #### 准备工作 为了成功安装 Jenkins,在开始之前需确保拥有一个配置了非 root sudo 用户和防火墙的 Ubuntu 18.04 服务器,这可以通过遵循 Ubuntu 18.04 初始服务器设置指南来完成。推荐至少配备 1GB 的 RAM 来支持 Jenkins 运行环境[^1]。 #### 安装 Java 由于 Jenkins 是基于 Java 构建的应用程序,因此需要先安装 Java。对于 Ubuntu 18.04,应该安装 OpenJDK 8 或更高版本。通过执行以下命令可以实现这一点: ```bash sudo apt update sudo apt install openjdk-11-jdk ``` 确认 Java 已经正确安装并可用,可以通过下面这条指令查看当前使用的 Java 版本: ```bash java -version ``` #### 添加 Jenkins 密钥库与源列表 为了让系统能够识别来自官方仓库的安全更新以及下载最新的软件包,首先得导入 Jenkins GPG key 并创建一个新的 APT 源文件指向稳定版(LTS)存储库地址。具体做法如下所示: ```bash wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add - sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list' ``` #### 更新本地索引并安装 Jenkins 一旦完成了上述准备工作之后,则可以继续刷新本地APT缓存并将 Jenkins 软件加入到待安装队列当中去: ```bash sudo apt-get update sudo apt-get install jenkins ``` 如果遇到任何关于证书错误的信息提示,可能是因为 `ca-certificates` 需要被重新安装一次;此时只需运行下列命令即可解决问题后再尝试上面提到过的安装过程: ```bash sudo apt-get install --reinstall ca-certificates ``` 最后一步就是启动 Jenkins 服务并且允许其开机自启: ```bash sudo systemctl start jenkins sudo systemctl enable jenkins ``` 现在访问浏览器输入服务器 IP 地址加上端口号 (默认为 8080),即可以看到初始向导界面等待进一步配置啦!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值