Created
April 6, 2021 01:33
-
-
Save cesardba/a952780ee79da535702ae91629f90173 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Estudando o OL8, encontrei alguns pontos interessantes sobre o dnf, abaixo seguem pontos que me chamaram a atenção: | |
Studying OL8, I found some interesting points about DNF, below are points that caught my attention: | |
1 - Histórico de instalação, quem nunca precisou saber quando foi instalado ou feito um update de pacotes? | |
Installation history, who never needed to know when packages were installed or updated? | |
[root@oelestudos1 ~]# dnf history | |
ID | Command line | Date and time | Action(s) | Altered | |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
31 | install nginx | 2021-04-06 01:04 | Install | 15 | |
30 | install dnf-automatic | 2021-04-06 00:48 | Install | 1 | |
29 | install tmux | 2021-04-06 00:12 | Install | 1 | |
28 | install logwatch | 2021-04-04 16:35 | Install | 6 | |
27 | install ftp | 2021-04-04 15:54 | Install | 1 | |
26 | install vsftpd | 2021-04-04 15:42 | Install | 1 | |
25 | -y remove kernel-uek-5.4.17-2011.7.4.el8uek | 2021-03-19 19:32 | Removed | 1 | |
24 | -y install http://129.146.131.238/oci-mar-2021/oci-linux-config-2.0-1.0.16.el8.noarch.rpm | 2021-03-19 19:26 | Upgrade | 1 EE | |
23 | -y install http://129.146.131.238/oci-mar-2021/oraclelinux-release-el8-1.0-16.0.1.el8.x86_64.rpm http://129.1 | 2021-03-19 19:26 | Upgrade | 7 EE | |
22 | -y install iperf3 | 2021-03-19 19:26 | Install | 2 | |
21 | -y install perf | 2021-03-19 19:26 | Install | 3 | |
20 | -y install trace-cmd | 2021-03-19 19:26 | Install | 1 EE | |
19 | -y install kernel-uek-devel | 2021-03-19 19:26 | Install | 3 | |
18 | -y install bcc | 2021-03-19 19:25 | Install | 6 | |
17 | -y install ltrace | 2021-03-19 19:25 | Install | 1 | |
16 | -y install dtrace | 2021-03-19 19:25 | Install | 1 | |
15 | -y install oswatcher | 2021-03-19 19:25 | Install | 3 EE | |
14 | -y install systemtap | 2021-03-19 19:25 | Install | 21 | |
13 | -y install oci-linux-config | 2021-03-19 19:25 | Install | 1 EE | |
12 | -y install tuned-profiles-oci-recommend | 2021-03-19 19:25 | Install | 2 | |
11 | -y install uptrack | 2021-03-19 19:24 | Install | 36 EE | |
10 | -y install https://objectstorage.us-phoenix-1.oraclecloud.com/p/H8i2z6l0-4HAPbIayw-5AMXEMw5l8JlKN7Lv-VlWqSXRB | 2021-03-19 19:24 | Install | 1 EE | |
9 | -y update --exclude=cuda *455* *460* | 2021-03-19 19:23 | I, U | 19 EE | |
8 | -y install oci-utils | 2021-03-19 19:23 | Install | 10 EE | |
7 | -y install mysql-release-el8 | 2021-03-19 19:22 | Install | 1 | |
6 | -y install oracle-epel-release-el8 | 2021-03-19 19:22 | Install | 1 | |
5 | -y install ksplice-release-el8 | 2021-03-19 19:22 | Install | 1 | |
4 | -y install oci-release-el8 | 2021-03-19 19:22 | Install | 1 | |
3 | -y install https://objectstorage.us-phoenix-1.oraclecloud.com/p/QEhSfbu-EXnz8pndSF6Gdo2v2QV7hFicBBg8jm6IfX-Q_ | 2021-03-19 19:22 | Install | 1 | |
2 | -y install oraclelinux-developer-release-el8 | 2021-03-19 19:22 | Install | 1 | |
1 | | 2021-03-19 19:15 | Install | 599 EE | |
| 2021-03-19 19:15 | Install | 599 EE | |
2 - Desfazer e refazer a instalação de um pacote. | |
Quem nunca atualizou um pacote e descobriu que a versão mais atual fez uma aplicação parar de funcionar, abaixo segue exemplo de undo e redo. | |
Undo and redo the installation of a package. | |
Who never updated a package and found that the most current version made an application to stop working, below follows an example of undo and redo. | |
[root@oelestudos1 ~]# dnf list installed | grep nginx | |
nginx.x86_64 1:1.14.1-9.0.1.module+el8.0.0+5347+9282027e @ol8_appstream | |
nginx-all-modules.noarch 1:1.14.1-9.0.1.module+el8.0.0+5347+9282027e @ol8_appstream | |
nginx-filesystem.noarch 1:1.14.1-9.0.1.module+el8.0.0+5347+9282027e @ol8_appstream | |
nginx-mod-http-image-filter.x86_64 1:1.14.1-9.0.1.module+el8.0.0+5347+9282027e @ol8_appstream | |
nginx-mod-http-perl.x86_64 1:1.14.1-9.0.1.module+el8.0.0+5347+9282027e @ol8_appstream | |
nginx-mod-http-xslt-filter.x86_64 1:1.14.1-9.0.1.module+el8.0.0+5347+9282027e @ol8_appstream | |
nginx-mod-mail.x86_64 1:1.14.1-9.0.1.module+el8.0.0+5347+9282027e @ol8_appstream | |
nginx-mod-stream.x86_64 1:1.14.1-9.0.1.module+el8.0.0+5347+9282027e @ol8_appstream | |
[root@oelestudos1 ~]# dnf history | |
ID | Command line | Date and time | Action(s) | Altered | |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
31 | install nginx | 2021-04-06 01:04 | Install | 15 | |
[root@oelestudos1 ~]# dnf history undo 31 -y | |
[root@oelestudos1 ~]# dnf list installed | grep nginx | |
[root@oelestudos1 ~]# | 2021-03-19 19:15 | Install | 599 EE | |
[root@oelestudos1 ~]# dnf history redo 31 -y | |
[root@oelestudos1 ~]# dnf list installed | grep nginx | |
nginx.x86_64 1:1.14.1-9.0.1.module+el8.0.0+5347+9282027e @ol8_appstream | |
nginx-all-modules.noarch 1:1.14.1-9.0.1.module+el8.0.0+5347+9282027e @ol8_appstream | |
nginx-filesystem.noarch 1:1.14.1-9.0.1.module+el8.0.0+5347+9282027e @ol8_appstream | |
nginx-mod-http-image-filter.x86_64 1:1.14.1-9.0.1.module+el8.0.0+5347+9282027e @ol8_appstream | |
nginx-mod-http-perl.x86_64 1:1.14.1-9.0.1.module+el8.0.0+5347+9282027e @ol8_appstream | |
nginx-mod-http-xslt-filter.x86_64 1:1.14.1-9.0.1.module+el8.0.0+5347+9282027e @ol8_appstream | |
nginx-mod-mail.x86_64 1:1.14.1-9.0.1.module+el8.0.0+5347+9282027e @ol8_appstream | |
nginx-mod-stream.x86_64 1:1.14.1-9.0.1.module+el8.0.0+5347+9282027e @ol8_appstream | |
3 - Verificar e atualizar o OL apenas atualizações de segurança? | |
Check and update the OL only security updates? | |
[root@oelestudos1 ~]# dnf updateinfo sec | |
Last metadata expiration check: 0:30:53 ago on Tue 06 Apr 2021 12:42:01 AM GMT. | |
Updates Information Summary: available | |
5 Security notice(s) | |
4 Important Security notice(s) | |
1 Moderate Security notice(s) | |
4 - Aplicar atualizações de segurança. | |
Apply security updates. | |
[root@oelestudos1 ~]# dnf update --security | |
[root@oelestudos1 ~]# dnf updateinfo sec | |
Last metadata expiration check: 0:43:08 ago on Tue 06 Apr 2021 12:42:01 AM GMT. | |
Updates Information Summary: available | |
2 Security notice(s) | |
1 Important Security notice(s) | |
1 Moderate Security notice(s) | |
Security: kernel-uek-5.4.17-2102.200.13.el8uek.x86_64 is an installed security update | |
Security: kernel-uek-5.4.17-2036.104.5.el8uek.x86_64 is the currently running version | |
5 - Verificar atualizações de segurança aplicadas. | |
Check for applied security updates. | |
[root@oelestudos1 ~]# dnf history | |
ID | Command line | Date and time | Action(s) | Altered | |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
34 | update --security | 2021-04-06 01:17 | I, U | 19 EE | |
33 | history redo 31 -y | 2021-04-06 01:10 | Install | 15 | |
32 | history undo 31 -y | 2021-04-06 01:08 | Removed | 15 | |
31 | install nginx | 2021-04-06 01:04 | Install | 15 | |
30 | install dnf-automatic | 2021-04-06 00:48 | Install | 1 | |
29 | install tmux | 2021-04-06 00:12 | Install | 1 | |
28 | install logwatch | 2021-04-04 16:35 | Install | 6 | |
27 | install ftp | 2021-04-04 15:54 | Install | 1 | |
26 | install vsftpd | 2021-04-04 15:42 | Install | 1 | |
25 | -y remove kernel-uek-5.4.17-2011.7.4.el8uek | 2021-03-19 19:32 | Removed | 1 | |
24 | -y install http://129.146.131.238/oci-mar-2021/oci-linux-config-2.0-1.0.16.el8.noarch.rpm | 2021-03-19 19:26 | Upgrade | 1 EE | |
23 | -y install http://129.146.131.238/oci-mar-2021/oraclelinux-release-el8-1.0-16.0.1.el8.x86_64.rpm http://129.1 | 2021-03-19 19:26 | Upgrade | 7 EE | |
22 | -y install iperf3 | 2021-03-19 19:26 | Install | 2 | |
21 | -y install perf | 2021-03-19 19:26 | Install | 3 | |
20 | -y install trace-cmd | 2021-03-19 19:26 | Install | 1 EE | |
19 | -y install kernel-uek-devel | 2021-03-19 19:26 | Install | 3 | |
18 | -y install bcc | 2021-03-19 19:25 | Install | 6 | |
17 | -y install ltrace | 2021-03-19 19:25 | Install | 1 | |
16 | -y install dtrace | 2021-03-19 19:25 | Install | 1 | |
15 | -y install oswatcher | 2021-03-19 19:25 | Install | 3 EE | |
14 | -y install systemtap | 2021-03-19 19:25 | Install | 21 | |
13 | -y install oci-linux-config | 2021-03-19 19:25 | Install | 1 EE | |
12 | -y install tuned-profiles-oci-recommend | 2021-03-19 19:25 | Install | 2 | |
11 | -y install uptrack | 2021-03-19 19:24 | Install | 36 EE | |
10 | -y install https://objectstorage.us-phoenix-1.oraclecloud.com/p/H8i2z6l0-4HAPbIayw-5AMXEMw5l8JlKN7Lv-VlWqSXRB | 2021-03-19 19:24 | Install | 1 EE | |
9 | -y update --exclude=cuda *455* *460* | 2021-03-19 19:23 | I, U | 19 EE | |
8 | -y install oci-utils | 2021-03-19 19:23 | Install | 10 EE | |
7 | -y install mysql-release-el8 | 2021-03-19 19:22 | Install | 1 | |
6 | -y install oracle-epel-release-el8 | 2021-03-19 19:22 | Install | 1 | |
5 | -y install ksplice-release-el8 | 2021-03-19 19:22 | Install | 1 | |
4 | -y install oci-release-el8 | 2021-03-19 19:22 | Install | 1 | |
3 | -y install https://objectstorage.us-phoenix-1.oraclecloud.com/p/QEhSfbu-EXnz8pndSF6Gdo2v2QV7hFicBBg8jm6IfX-Q_ | 2021-03-19 19:22 | Install | 1 | |
2 | -y install oraclelinux-developer-release-el8 | 2021-03-19 19:22 | Install | 1 | |
1 | | 2021-03-19 19:15 | Install | 599 EE | |
6 - Reverter atualizações de segurança. | |
Rollback security updates. | |
[root@oelestudos1 ~]# dnf history undo 34 -y | |
Last metadata expiration check: 0:47:51 ago on Tue 06 Apr 2021 12:42:01 AM GMT. | |
Undoing transaction 34, from Tue 06 Apr 2021 01:17:22 AM GMT | |
Install grub2-tools-efi-1:2.02-90.0.4.el8_3.1.x86_64 @ol8_baseos_latest | |
Install kernel-uek-devel-5.4.17-2102.200.13.el8uek.x86_64 @ol8_UEKR6 | |
Install kernel-uek-5.4.17-2102.200.13.el8uek.x86_64 @ol8_UEKR6 | |
Upgrade libstdc++-8.3.1-5.1.0.2.el8.x86_64 @ol8_baseos_latest | |
Upgraded libstdc++-8.3.1-5.1.0.1.el8.x86_64 @@System | |
Upgrade libgomp-8.3.1-5.1.0.2.el8.x86_64 @ol8_baseos_latest | |
Upgraded libgomp-8.3.1-5.1.0.1.el8.x86_64 @@System | |
Upgrade libgcc-8.3.1-5.1.0.2.el8.x86_64 @ol8_baseos_latest | |
Upgraded libgcc-8.3.1-5.1.0.1.el8.x86_64 @@System | |
Upgrade openssl-libs-1:1.1.1g-15.el8_3.x86_64 @ol8_baseos_latest | |
Upgraded openssl-libs-1:1.1.1g-12.el8_3.x86_64 @@System | |
Upgrade openssl-1:1.1.1g-15.el8_3.x86_64 @ol8_baseos_latest | |
Upgraded openssl-1:1.1.1g-12.el8_3.x86_64 @@System | |
Upgrade grub2-tools-1:2.02-90.0.4.el8_3.1.x86_64 @ol8_baseos_latest | |
Upgraded grub2-tools-1:2.02-90.0.2.el8_3.1.x86_64 @@System | |
Upgrade grub2-common-1:2.02-90.0.4.el8_3.1.noarch @ol8_baseos_latest | |
Upgraded grub2-common-1:2.02-90.0.2.el8_3.1.noarch @@System | |
Upgrade shim-x64-15.3-1.0.2.x86_64 @ol8_baseos_latest | |
Upgraded shim-x64-15-11.0.5.x86_64 @@System | |
Upgrade grub2-tools-extra-1:2.02-90.0.4.el8_3.1.x86_64 @ol8_baseos_latest | |
Upgraded grub2-tools-extra-1:2.02-90.0.2.el8_3.1.x86_64 @@System | |
Upgrade grub2-efi-x64-1:2.02-90.0.4.el8_3.1.x86_64 @ol8_baseos_latest | |
Upgraded grub2-efi-x64-1:2.02-90.0.2.el8_3.1.x86_64 @@System | |
Upgrade grub2-tools-minimal-1:2.02-90.0.4.el8_3.1.x86_64 @ol8_baseos_latest | |
Upgraded grub2-tools-minimal-1:2.02-90.0.2.el8_3.1.x86_64 @@System | |
Upgrade python2-libs-2.7.17-2.0.2.module+el8.3.0+el8+9687+03d85b1a.x86_64 @ol8_appstream | |
Upgraded python2-libs-2.7.17-2.0.1.module+el8.3.0+7833+4aaf98ce.x86_64 @@System | |
Upgrade python36-3.6.8-2.0.1.module+el8.3.0+el8+9688+bb1990d3.x86_64 @ol8_appstream | |
Upgraded python36-3.6.8-2.module+el8.3.0+7694+550a8252.x86_64 @@System | |
Upgrade python2-2.7.17-2.0.2.module+el8.3.0+el8+9687+03d85b1a.x86_64 @ol8_appstream | |
Upgraded python2-2.7.17-2.0.1.module+el8.3.0+7833+4aaf98ce.x86_64 @@System | |
Upgrade gcc-8.3.1-5.1.0.2.el8.x86_64 @ol8_appstream | |
Upgraded gcc-8.3.1-5.1.0.1.el8.x86_64 @@System | |
Upgrade cpp-8.3.1-5.1.0.2.el8.x86_64 @ol8_appstream | |
Upgraded cpp-8.3.1-5.1.0.1.el8.x86_64 @@System | |
Dependencies resolved. | |
7 - Verificar histórico das atualizadas desfeitas. | |
Check history of und updates. | |
[root@oelestudos1 ~]# dnf history | |
ID | Command line | Date and time | Action(s) | Altered | |
-------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
35 | history undo 34 -y | 2021-04-06 01:30 | D, E | 19 | |
34 | update --security | 2021-04-06 01:17 | I, U | 19 EE | |
33 | history redo 31 -y | 2021-04-06 01:10 | Install | 15 | |
32 | history undo 31 -y | 2021-04-06 01:08 | Removed | 15 | |
31 | install nginx | 2021-04-06 01:04 | Install | 15 | |
30 | install dnf-automatic | 2021-04-06 00:48 | Install | 1 | |
29 | install tmux | 2021-04-06 00:12 | Install | 1 | |
28 | install logwatch | 2021-04-04 16:35 | Install | 6 | |
27 | install ftp | 2021-04-04 15:54 | Install | 1 | |
26 | install vsftpd | 2021-04-04 15:42 | Install | 1 | |
25 | -y remove kernel-uek-5.4.17-2011.7.4.el8uek | 2021-03-19 19:32 | Removed | 1 | |
24 | -y install http://129.146.131.238/oci-mar-2021/oci-linux-config-2.0-1.0.16.el8.noarch.rpm | 2021-03-19 19:26 | Upgrade | 1 EE | |
23 | -y install http://129.146.131.238/oci-mar-2021/oraclelinux-release-el8-1.0-16.0.1.el8.x86_64.rpm http://129.1 | 2021-03-19 19:26 | Upgrade | 7 EE | |
22 | -y install iperf3 | 2021-03-19 19:26 | Install | 2 | |
21 | -y install perf | 2021-03-19 19:26 | Install | 3 | |
20 | -y install trace-cmd | 2021-03-19 19:26 | Install | 1 EE | |
19 | -y install kernel-uek-devel | 2021-03-19 19:26 | Install | 3 | |
18 | -y install bcc | 2021-03-19 19:25 | Install | 6 | |
17 | -y install ltrace | 2021-03-19 19:25 | Install | 1 | |
16 | -y install dtrace | 2021-03-19 19:25 | Install | 1 | |
15 | -y install oswatcher | 2021-03-19 19:25 | Install | 3 EE | |
14 | -y install systemtap | 2021-03-19 19:25 | Install | 21 | |
13 | -y install oci-linux-config | 2021-03-19 19:25 | Install | 1 EE | |
12 | -y install tuned-profiles-oci-recommend | 2021-03-19 19:25 | Install | 2 | |
11 | -y install uptrack | 2021-03-19 19:24 | Install | 36 EE | |
10 | -y install https://objectstorage.us-phoenix-1.oraclecloud.com/p/H8i2z6l0-4HAPbIayw-5AMXEMw5l8JlKN7Lv-VlWqSXRB | 2021-03-19 19:24 | Install | 1 EE | |
9 | -y update --exclude=cuda *455* *460* | 2021-03-19 19:23 | I, U | 19 EE | |
8 | -y install oci-utils | 2021-03-19 19:23 | Install | 10 EE | |
7 | -y install mysql-release-el8 | 2021-03-19 19:22 | Install | 1 | |
6 | -y install oracle-epel-release-el8 | 2021-03-19 19:22 | Install | 1 | |
5 | -y install ksplice-release-el8 | 2021-03-19 19:22 | Install | 1 | |
4 | -y install oci-release-el8 | 2021-03-19 19:22 | Install | 1 | |
3 | -y install https://objectstorage.us-phoenix-1.oraclecloud.com/p/QEhSfbu-EXnz8pndSF6Gdo2v2QV7hFicBBg8jm6IfX-Q_ | 2021-03-19 19:22 | Install | 1 | |
2 | -y install oraclelinux-developer-release-el8 | 2021-03-19 19:22 | Install | 1 | |
1 | | 2021-03-19 19:15 | Install | 599 EE | |
8 - Verificar histórico das atualizações de segurança desfeitas. | |
Check history of broken security updates. | |
[root@oelestudos1 ~]# dnf updateinfo sec | |
Last metadata expiration check: 0:50:07 ago on Tue 06 Apr 2021 12:42:01 AM GMT. | |
Updates Information Summary: available | |
5 Security notice(s) | |
4 Important Security notice(s) | |
1 Moderate Security notice(s) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment