Skip to content

Instantly share code, notes, and snippets.

@alsyundawy
Last active July 16, 2024 19:55
Show Gist options
  • Save alsyundawy/74d004a3e82522cf1fe2e757bd7071bf to your computer and use it in GitHub Desktop.
Save alsyundawy/74d004a3e82522cf1fe2e757bd7071bf to your computer and use it in GitHub Desktop.
Ubuntu Mirror Repo
Ubuntu Mirror Repo
sudo timedatectl set-timezone Asia/Jakarta
systemctl disable --now systemd-resolved
systemctl disable --now systemd-networkd-wait-online.service
rm -rf /etc/resolv.conf
touch /etc/resolv.conf
echo 'search alsyundawy.net.id' > /etc/resolv.conf
echo 'nameserver 1.1.1.1' >> /etc/resolv.conf
echo 'nameserver 1.0.0.1' >> /etc/resolv.conf
sed -i "s/#\$nrconf{restart} = 'i';/\$nrconf{restart} = 'a';/" /etc/needrestart/needrestart.conf
sed -i 's/#$nrconf{kernelhints} = -1;/$nrconf{kernelhints} = 0;/' /etc/needrestart/needrestart.conf
$nrconf{kernelhints} = 0;
nano /etc/systemd/timesyncd.conf
service systemd-timesyncd restart
systemctl restart systemd-timesyncd
P.I.C.N.I.C.
(Problem in chair, not in computer)
touch /etc/cloud/cloud-init.disabled
dpkg-reconfigure cloud-init
apt-get purge cloud-init
rm -rf /etc/cloud/ && rm -rf /var/lib/cloud/
Jammy
sudo add-apt-repository --yes ppa:coolcomputers/all
sudo add-apt-repository --yes ppa:cappelikan/ppa
sudo add-apt-repository --yes ppa:isc/bind
sudo add-apt-repository --yes ppa:pettai/unbound
FOCAL
sudo add-apt-repository --yes ppa:coolcomputers/all
sudo add-apt-repository --yes ppa:cappelikan/ppa
sudo add-apt-repository --yes ppa:isc/bind
sudo add-apt-repository --yes ppa:pettai/unbound
apt-get update;apt-get upgrade -y;apt-get dist-upgrade -y;apt-get full-upgrade -y; apt-get --purge autoremove -y
apt install software-properties-common git htop iftop telnet traceroute rsync screen whois neofetch axel aria2 open-vm-tools bind9-utils zip unzip net-tools sysstat python3-pip ipset btop ufw apt-transport-https curl gnupg2 sudo arj bzip2 cabextract cpio rpm2cpio file gzip lhasa nomarch pax rar unrar p7zip-full unzip zip lrzip lzip liblz4-tool lzop unrar-free python3-certbot openvswitch-switch-dpdk host mtr iputils-ping traceroute sqlite3 eatmydata libeatmydata1 python-babel-localedata python3-babel python3-certifi python3-jinja2 python3-json-pointer python3-jsonpatch python3-jsonschema python3-markupsafe python3-pyrsistent python3-requests python3-tz python3-urllib3 -y
python3 -m pip install --upgrade pip setuptools six wheel urllib3 requests certbot certifi
apt install software-properties-common git htop iftop telnet traceroute rsync screen whois neofetch axel aria2 open-vm-tools bind9-utils zip unzip net-tools sysstat python3-pip ipset ufw apt-transport-https curl gnupg2 sudo arj bzip2 cabextract cpio rpm2cpio file gzip lhasa nomarch pax rar unrar p7zip-full unzip zip lrzip lzip liblz4-tool lzop unrar-free python3-certbot openvswitch-switch-dpdk host mtr iputils-ping traceroute sqlite3 eatmydata libeatmydata1 python-babel-localedata python3-babel python3-certifi python3-jinja2 python3-json-pointer python3-jsonpatch python3-jsonschema python3-markupsafe python3-pyrsistent python3-requests python3-tz python3-urllib3 -y
pip3 uninstall certbot certbot-nginx acme
Upgrade ubuntu 20.04 to 22.04
apt-get update;apt-get upgrade -y;apt-get dist-upgrade -y;apt-get full-upgrade -y; apt-get --purge autoremove -y;do-release-upgrade
Ubuntu 18.04 LTS (Bionic Beaver)
deb mirror://mirrors.ubuntu.com/mirrors.txt bionic main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt bionic-updates main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt bionic-backports main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt bionic-security main restricted universe multiverse
deb http://mirror.poliwangi.ac.id/ubuntu/ bionic main restricted universe multiverse
deb http://mirror.poliwangi.ac.id/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirror.poliwangi.ac.id/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirror.poliwangi.ac.id/ubuntu/ bionic-backports main restricted universe multiverse
deb http://mirror.poliwangi.ac.id/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mr.heru.id/ubuntu/ bionic main restricted universe multiverse
deb http://mr.heru.id/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mr.heru.id/ubuntu/ bionic-security main restricted universe multiverse
deb http://mr.heru.id/ubuntu/ bionic-backports main restricted universe multiverse
deb http://mr.heru.id/ubuntu/ bionic-proposed main restricted universe multiverse
Ubuntu 20.04 LTS (Focal Fossa)
deb mirror://mirrors.ubuntu.com/mirrors.txt focal main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt focal-updates main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt focal-backports main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt focal-security main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt focal-proposed main restricted universe multiverse
deb http://mirror.poliwangi.ac.id/ubuntu/ focal main restricted universe multiverse
deb http://mirror.poliwangi.ac.id/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirror.poliwangi.ac.id/ubuntu/ focal-security main restricted universe multiverse
deb http://mirror.poliwangi.ac.id/ubuntu/ focal-backports main restricted universe multiverse
deb http://mirror.poliwangi.ac.id/ubuntu/ focal-proposed main restricted universe multiverse
deb https://mirror.biznetgio.com/ubuntu focal main restricted universe multiverse
deb https://mirror.biznetgio.com/ubuntu focal-updates main restricted universe multiverse
deb https://mirror.biznetgio.com/ubuntu focal-security main restricted universe multiverse
deb https://mirror.biznetgio.com/ubuntu focal-backports main restricted universe multiverse
deb https://mirror.biznetgio.com/ubuntu focal-proposed main restricted universe multiverse
Ubuntu 22.04 LTS (Jammy Jellyfish)
deb mirror://mirrors.ubuntu.com/mirrors.txt jammy main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt jammy-updates main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt jammy-backports main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt jammy-security main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt jammy-proposed main restricted universe multiverse
deb http://mirror.poliwangi.ac.id/ubuntu/ jammy main restricted universe multiverse
deb http://mirror.poliwangi.ac.id/ubuntu/ jammy-updates main restricted universe multiverse
deb http://mirror.poliwangi.ac.id/ubuntu/ jammy-security main restricted universe multiverse
deb http://mirror.poliwangi.ac.id/ubuntu/ jammy-backports main restricted universe multiverse
deb http://mirror.poliwangi.ac.id/ubuntu/ jammy-proposed main restricted universe multiverse
deb https://mirror.biznetgio.com/ubuntu jammy main restricted universe multiverse
deb https://mirror.biznetgio.com/ubuntu jammy-updates main restricted universe multiverse
deb https://mirror.biznetgio.com/ubuntu jammy-security main restricted universe multiverse
deb https://mirror.biznetgio.com/ubuntu jammy-backports main restricted universe multiverse
deb https://mirror.biznetgio.com/ubuntu jammy-proposed main restricted universe multiverse
Ubuntu 24.04 LTS (Noble Numbat)
deb mirror://mirrors.ubuntu.com/mirrors.txt noble main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt noble-updates main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt noble-backports main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt noble-security main restricted universe multiverse
deb mirror://mirrors.ubuntu.com/mirrors.txt noble-proposed main restricted universe multiverse
deb http://mirror.poliwangi.ac.id/ubuntu/ noble main restricted universe multiverse
deb http://mirror.poliwangi.ac.id/ubuntu/ noble-updates main restricted universe multiverse
deb http://mirror.poliwangi.ac.id/ubuntu/ noble-security main restricted universe multiverse
deb http://mirror.poliwangi.ac.id/ubuntu/ noble-backports main restricted universe multiverse
deb http://mirror.poliwangi.ac.id/ubuntu/ noble-proposed main restricted universe multiverse
deb https://mirror.biznetgio.com/ubuntu noble main restricted universe multiverse
deb https://mirror.biznetgio.com/ubuntu noble-updates main restricted universe multiverse
deb https://mirror.biznetgio.com/ubuntu noble-security main restricted universe multiverse
deb https://mirror.biznetgio.com/ubuntu noble-backports main restricted universe multiverse
deb https://mirror.biznetgio.com/ubuntu noble-proposed main restricted universe multiverse
========================================================
@alsyundawy
Copy link
Author

repository debian

Debian 12
deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
deb http://deb.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
deb http://deb.debian.org/debian/ bookworm-backports main contrib non-free non-free-firmware

Debian 11
deb http://deb.debian.org/debian/ bullseye main contrib non-free
deb http://security.debian.org/debian-security bullseye-security main contrib non-free
deb http://deb.debian.org/debian/ bullseye-updates main contrib non-free
deb http://deb.debian.org/debian bullseye-backports main contrib non-free

Debian 10
deb http://deb.debian.org/debian/ buster main contrib non-free
deb http://security.debian.org/ buster/updates main contrib non-free
deb http://deb.debian.org/debian/ buster-updates main contrib non-free
deb http://deb.debian.org/debian buster-backports main contrib non-free

========================================================

#!/bin/sh

To add this repository please do:

if [ "$(whoami)" != "root" ]; then
SUDO=sudo
fi

${SUDO} apt-get update
${SUDO} apt-get -y install lsb-release ca-certificates curl
${SUDO} curl -sSLo /usr/share/keyrings/deb.sury.org-bind.gpg https://packages.sury.org/bind/apt.gpg
${SUDO} sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-bind.gpg] https://packages.sury.org/bind/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/bind.list'
${SUDO} apt-get update

========================================================

#!/bin/sh

To add this repository please do:

if [ "$(whoami)" != "root" ]; then
SUDO=sudo
fi

${SUDO} apt-get update
${SUDO} apt-get -y install lsb-release ca-certificates curl
${SUDO} curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg
${SUDO} sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
${SUDO} apt-get update

========================================================

curl https://nginx.org/keys/nginx_signing.key | gpg --dearmor | sudo tee /usr/share/keyrings/nginx-archive-keyring.gpg >/dev/null

gpg --dry-run --quiet --no-keyring --import --import-options import-show /usr/share/keyrings/nginx-archive-keyring.gpg

echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/mainline/debian lsb_release -cs nginx" | sudo tee /etc/apt/sources.list.d/nginx.list

echo -e "Package: *\nPin: origin nginx.org\nPin: release o=nginx\nPin-Priority: 900\n" \ | sudo tee /etc/apt/preferences.d/99nginx

========================================================

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment