Enable Debian Sources for apt on Ubiquiti EdgeRouter
Table of Contents
As per Ubiquiti’s support article EdgeRouter - Add Debian Packages to EdgeOS, I enabled some apt sources on my EdgeRouter 6P.
Notes on Chosen Sources
EdgeOS v2.0.0 Release Uses Debian 9 (Stretch), adjust your sources if you use a version of EdgeOS based on a different Debian release.
I used the 3 sources I normally use on Debian Stretch.
Commands Used for Configuration
Until the er-6p is my default router, do runtime change tro routing table. (You do not want to do this!)
ubnt@edgerouter-6p:~$ ip r a default via 192.168.50.251 dev eth1
Enable Debain package sources, as user ubnt
:
configure
set system package repository stretch components 'main contrib non-free'
set system package repository stretch distribution stretch
set system package repository stretch url http://ftp.de.debian.org/debian/
set system package repository stretch-updates components 'main contrib non-free'
set system package repository stretch-updates distribution stretch-updates
set system package repository stretch-updates url http://ftp.de.debian.org/debian/
set system package repository stretch-security-updates components 'main contrib non-free'
set system package repository stretch-security-updates distribution stretch/updates
set system package repository stretch-security-updates url http://security.debian.org/debian-security
commit ; save ; exit
Verification
As user ubnt
:
(non-safe shell usage below, you really should check the files manually)
ubnt@edgerouter-6p:~$ for i in $(ls -1 /etc/apt/sources.list.d) ; do echo ; echo "File: ${i}"\ ; cat /etc/apt/sources.list.d/${i} ; done
File: stretch-security-updates.list
deb http://security.debian.org/debian-security stretch/updates main contrib non-free # stretch-security-updates #
File: stretch-updates.list
deb http://ftp.de.debian.org/debian/ stretch-updates main contrib non-free # stretch-updates #
File: stretch.list
deb http://ftp.de.debian.org/debian/ stretch main contrib non-free # stretch #
Using apt-get
on the EdgeRouter
Example:
sudo apt-get update
Do Not apt-get upgrade
WARNING: Ubiquiti warns against using apt-get upgrade
, heed that warning unless you know exactly what you are doing and you have a known-working backup.