lsb_release -a
uname -mrs
cat /etc/debian_version
cd /home/admin/dwl/ dpkg --get-selections "*" > system-$(lsb_release --codename|cut -f2)-$(date +"%Y-%m-%d")_installed_packages.txt tar -cjf system-$(lsb_release --codename|cut -f2)-$(date +"%Y-%m-%d")-var-lib-dpkg.tar.bz2 /var/lib/dpkg tar -cjf system-$(lsb_release --codename|cut -f2)-$(date +"%Y-%m-%d")-var-lib-apt-extended_states.tar.bz2 /var/lib/apt/extended_states tar -cjf system-$(lsb_release --codename|cut -f2)-$(date +"%Y-%m-%d")-etc.tar.bz2 /etc chmod 600 system-* chown admin: system-*
mkdir -p ~/Data/sinp-<region>/system-upgrade/<instance>-srv/
cd ~/Data/sinp-<region>/system-upgrade/<instance>-srv/
scp admin@<instance>-<region>-sinp:/home/admin/dwl/system-* .
apt update
apt upgrade
apt full-upgrade
apt autoremove --purge
apt list ~o apt list ?obsolete aptitude search '~o'
apt remove <nom-paquet-1> <nom-paquet-1> <nom-paquet-…>
apt list --installed "?not(?origin(debian))" aptitude search '?narrow(?installed, ?not(?origin(Debian)))'
find /etc -name "*.dpkg-*" -o -name "*.ucf-*" -o -name "*.merge-error"
diff
pour voir les différences et application des changements aux fichiers de config existants..dpkg-*
après correction.dpkg --audit
dpkg --get-selections "*" > ~/curr-pkgs.txt
dpkg --get-selections | grep 'hold$'
systemctl reboot
ll /etc/apt/sources.list.d/
et aussi dans le fichier vi /etc/apt/sources.list
sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list
sed -i 's/buster/bullseye/g' /etc/apt/sources.list
vi /etc/apt/sources.list
/etc/apt/sources.list.d/
screen -S upgrade-system
apt update
apt upgrade --without-new-pkgs
apt full-upgrade
systemctl reboot
lsb_release -a
et cat /etc/debian_version
apt autoremove --purge
apt update
apt upgrade
apt full-upgrade
apt autoremove --purge
find /etc -name "*.dpkg-*" -o -name "*.ucf-*" -o -name "*.merge-error"
diff
pour voir les différences et application des changements aux fichiers de config existants. L'idée est de garder les modifications que nous avons fait et d'introduire les changements effectués par le mainteneur du paquet….dpkg-*
.apt install firewalld
update-alternatives --config iptables
choisir "iptables-legacy" docker compose down ; docker compose up -d
mv venv "venv.save$(date +"%Y-%m-%d")"
git pull
).pg_lsclusters
apt list --installed|grep postgresql
su - postgres
psql
SELECT datname, datcollate, datcollversion, pg_database_collation_actual_version(oid) FROM pg_database;
\c geonature2db
SELECT pg_describe_object(refclassid, refobjid, refobjsubid) AS "Collation", pg_describe_object(classid, objid, objsubid) AS "Object" FROM pg_depend d JOIN pg_collation c ON refclassid = 'pg_collation'::regclass AND refobjid = c.oid WHERE c.collversion <> pg_collation_actual_version(c.oid) ORDER BY 1, 2;
ALTER DATABASE geonature2db REFRESH COLLATION VERSION;
datname | datcollate | datcollversion | pg_database_collation_actual_version --------------+-------------+----------------+-------------------------------------- geonature2db | fr_FR.UTF-8 | 2.36 | 2.36 template1 | fr_FR.UTF-8 | 2.36 | 2.36 admin | fr_FR.UTF-8 | 2.36 | 2.36 gnatlas | fr_FR.UTF-8 | 2.36 | 2.36 postgres | fr_FR.UTF-8 | 2.36 | 2.36 telegraf | fr_FR.UTF-8 | 2.36 | 2.36 template0 | fr_FR.UTF-8 | | 2.36 (7 lignes)
pip install --user
à partir de Debian 12 :sudo apt install pipx
ssh geonat@db-<sinp-region>-sinp
pipx ensurepath
pipx install pipenv
source ~/.bashrc
pipx --version
/home/geonat/data/import-parser/
:cd ~/.local/share/virtualenvs/ ; rm -f import-parser-*
cd ~/data/import-parser/
pipenv install
/home/geonat/data/gn2pg/
:cd ~/.local/share/virtualenvs/ ; rm -f gn2pg-*
cd ~/data/gn2pg/
pipenv install
cd install; ./01_install_backend.sh
pip install --upgrade sentry-sdk[flask]
backend/requirements-common.txt
:lxml==4.9.4 fiona==1.8.22
requirements-common.txt
:psycopg2==2.9.5
requirements-common.txt
:Jinja2==2.11.3 psycopg2==2.9.5 MarkupSafe==2.0.1
requirements.txt
:greenlet==1.1.3
/opt/srvstatus/venv
: voir la section Installer le script /root/borg-env
: voir la section Installer Borg sur Bkp-Srv/home/backups/borg-env/
: voir la section Installer Borg sur Bkp-Srv/home/backups/osc-env/
: voir la section Installation d'OpenStack Clien OCSlsb_release -a
:No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 11 (bullseye) Release: 11 Codename: bullseye
uname -mrs
: Linux 5.10.0-27-cloud-amd64 x86_64
cat /etc/debian_version
: 11.8
apt list ~o
:gcc-8-base/now 8.3.0-6 amd64 [installé, local] libapt-inst2.0/now 1.8.2.3 amd64 [installé, local] libapt-pkg5.0/now 1.8.2.3 amd64 [installé, local] libboost-iostreams1.67.0/now 1.67.0-13+deb10u1 amd64 [installé, local] libboost-system1.67.0/now 1.67.0-13+deb10u1 amd64 [installé, local] libcwidget3v5/now 0.5.17-11 amd64 [installé, local] libdns-export1104/now 1:9.11.5.P4+dfsg-5.1+deb10u9 amd64 [installé, local] libffi6/now 3.2.1-9 amd64 [installé, local] libgcc1/now 1:8.3.0-6 amd64 [installé, local] libhogweed4/now 3.4.1-1+deb10u1 amd64 [installé, local] libicu63/now 63.1-6+deb10u3 amd64 [installé, local] libip4tc0/now 1.8.2-4 amd64 [installé, local] libip6tc0/now 1.8.2-4 amd64 [installé, local] libisc-export1100/now 1:9.11.5.P4+dfsg-5.1+deb10u9 amd64 [installé, local] libjson-c3/now 0.12.1+ds-2+deb10u1 amd64 [installé, local] libmpdec2/now 2.4.2-2 amd64 [installé, local] libnettle6/now 3.4.1-1+deb10u1 amd64 [installé, local] libprocps7/now 2:3.3.15-2 amd64 [installé, local] libpython3.7-minimal/now 3.7.3-2+deb10u6 amd64 [installé, local] libpython3.7-stdlib/now 3.7.3-2+deb10u6 amd64 [installé, local] libreadline7/now 7.0-5 amd64 [installé, local] linux-image-4.19.0-26-cloud-amd64/now 4.19.304-1 amd64 [installé, local] python3.7-minimal/now 3.7.3-2+deb10u6 amd64 [installé, local]
find /etc -name "*.dpkg-*" -o -name "*.ucf-*" -o -name "*.merge-error"
: /etc/default/rkhunter.ucf-dist /etc/firewalld/firewalld.conf.dpkg-dist /etc/ca-certificates.conf.dpkg-old /etc/ssh/sshd_config.ucf-dist /etc/sysctl.conf.dpkg-dist /etc/rkhunter.conf.dpkg-dist /etc/cron.daily/bsdmainutils.dpkg-remove /etc/cron.daily/rkhunter.dpkg-dist /etc/apt/apt.conf.d/50unattended-upgrades.ucf-dist /etc/cloud/cloud.cfg.dpkg-dist
sources.list
pour Debian 12 :
# Main deb http://deb.debian.org/debian bookworm main deb-src http://deb.debian.org/debian bookworm main # Security deb http://security.debian.org/debian-security bookworm-security main deb-src http://security.debian.org/debian-security bookworm-security main # Update deb http://deb.debian.org/debian bookworm-updates main deb-src http://deb.debian.org/debian bookworm-updates main # Backports deb http://deb.debian.org/debian bookworm-backports main contrib non-free deb-src http://deb.debian.org/debian bookworm-backports main contrib non-free
lsb_release -a
: No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 10 (buster) Release: 10 Codename: buster
uname -mrs
:Linux 4.19.0-22-cloud-amd64 x86_64
Linux 4.19.0-23-cloud-amd64 x86_64
Linux 4.19.0-24-cloud-amd64 x86_64
Linux 4.19.0-16-cloud-amd64 x86_64
Linux 4.19.0-25-cloud-amd64 x86_64
cat /etc/debian_version
: 10.13
aptitude search '?narrow(?installed, ?not(?origin(Debian)))
: i containerd.io - An open and reliable container runtime i A docker-buildx-plugin - Docker Buildx cli plugin. i docker-ce - Docker: the open-source application container engine i docker-ce-cli - Docker CLI: the open-source application container engine i A docker-ce-rootless-extras - Rootless support for Docker. i docker-compose-plugin - Docker Compose (V2) plugin for the Docker CLI. i A linux-image-4.19.0-16-cloud-amd64 - Linux 4.19 for x86-64 cloud (signed)
sources.list
de Debian 11 :
# Main deb http://deb.debian.org/debian bullseye main deb-src http://deb.debian.org/debian bullseye main # Security deb http://security.debian.org/debian-security bullseye-security main deb-src http://security.debian.org/debian-security bullseye-security main # Update deb http://deb.debian.org/debian bullseye-updates main deb-src http://deb.debian.org/debian bullseye-updates main # Backports deb http://deb.debian.org/debian bullseye-backports main contrib non-free deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free
find /etc -name "*.dpkg-*" -o -name "*.ucf-*" -o -name "*.merge-error"
:/etc/default/rkhunter.ucf-dist /etc/firewalld/firewalld.conf.dpkg-dist /etc/ca-certificates.conf.dpkg-old /etc/ssh/sshd_config.ucf-dist /etc/rkhunter.conf.dpkg-dist /etc/cron.daily/bsdmainutils.dpkg-remove /etc/cron.daily/rkhunter.dpkg-dist /etc/apt/apt.conf.d/50unattended-upgrades.ucf-dist /etc/cloud/cloud.cfg.dpkg-dist /etc/nginx/sites-available/default.dpkg-dist /etc/nginx/nginx.conf.dpkg-dist