1
0

More than 3 years have passed since last update.

VyOS 1.3系(buster) に apt で git をインストールする

Last updated at Posted at 2020-05-27

背景

この記事(VyOSのバックアップをGitHubとTFTPに自動でアップする - ぽぽぽぽーんのネットワークとOSS)を見て、VyOSのコンフィグをgitで管理したくなった。

しかし、2020年5月時点のVyOSの最新版 1.3 系では、以前使えていたset system package repositoryコマンドが廃止されている。

そこで、VYOS 1.2.X系 (apt パッケージの有効化) - Qiita を参考に、/etc/apt/sources.listにリポジトリを追加することで対応した。

実行環境

$ cat /etc/os-release 
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
[edit]

リポジトリの追加

VyOSのベースOS(debian)のコードネーム(buster)を確認し、リポジトリを追加する。
再起動すると白紙に戻ってしまうので注意。

echo "deb http://deb.debian.org/debian/ buster main" | sudo tee -a /etc/apt/sources.list
echo "deb http://security.debian.org/ buster/updates main" | sudo tee -a /etc/apt/sources.list

gitのインストール

後は普通にaptが使える。

sudo apt update
sudo apt install git

注意

apt upgradeもできるが、VyOS全体として整合が取れなくなる可能性があるのでやめた方がよい気がする。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0