Informàtica / Computers
Seccions d'aquesta pàgina 21
- 01General
- 02X-Window
- 03Particions a l'MBR / Partitions on MBR
- 04Sistemes operatius / Operating systems
- 05Boot
- 06Desenvolupament / Development
- 07Perl
- 08Python
- 09Comercial / Commercial
- 10Virtualització / Virtualisation
- 11Contenidors / Containers
- 12Cloud Computing (external virtualisation)
- 13Parcs d'ordinadors / Clusters
- 14Seguretat / Security
- 15Quiosc / Kiosk
- 16Execució distribuïda / Distributed execution
- 17Accés remot / Remote access
- 18VPN (Virtual Private Network)
- 19Distributed software
- 20Enginyeria del programari / Software engineering
- 21Observabilitat / Observability
- General
- X-Window
- Particions a l'MBR / Partitions on MBR
- Sistemes operatius / Operating systems
- Boot
- Desenvolupament
/
Development
- Control de versions / Version control
- Llenguatges
/ Languages
- Utilitats / Tricks
- C
- C++
- Data model
- Types
- Guies d'estil / Style guides
- IDE
- Frameworks
- Unit testing
- Scratch
- Documentació / Documentation
- Perl
- Python
- Estructura de directoris / Directory structure
- Toolchain
- pkg-config
- autotools
- meson / ninja
- Compilació / Compilation
- Biblioteques compartides / Shared objects
- Comercial / Commercial
- Virtualització / Virtualisation
- Contenidors /
Containers
- Docker
- Kubernetes
- Info
- Desplegament / Deployment
- minikube
- AWS EKS
- Gestió
- Autoescalat
/ Autoscaling
- Computació al núvol / Cloud Computing
- Parcs d'ordinadors / Clusters
- Seguretat / Security
- Quiosc / Kiosk
- Execució distribuïda / Distributed execution
- Accés remot / Remote access
- Distributed
software
- Pàgines web dinàmiques / Dynamic web pages
- Aplicacions web / Web applications
- RIA (Rich Internet Application)
- Enginyeria del programari / Software engineering
- Observabilitat / Observability
01General#
- Computing.net (Tech Support for Business and You)
- SGI
- Dell Inspiron
- Playstation
- Programari/Software
- Maquinari / Hardware
- WWW
- Java
- PDA
- Prefixos binaris / Binary prefixes (wp)
- IEC 60027-2:2005 (The
international
systems of units, sec. 3.1)
kibi
Ki
2¹?
mebi
Mi
2²?
gibi
Gi
2³?
tebi
Ti
2??
pebi
Pi
2??
exbi
Ei
2??
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- IEC 60027-2:2005 (The
international
systems of units, sec. 3.1)
02X-Window#
| list | comparison | config | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Debian | Mandriva | |||||||||||||
| display manager (login/password) | /etc/X11/default-display-manager |
/etc/sysconfig/desktop
|
XDM | GDM | KDM SDDM |
WDM | SLiM | LXDM |
||||||
/etc/X11/xdm/Xaccess |
/usr/share/config/kdm/kdmrc
|
/etc/lxdm/ |
||||||||||||
New instance of kdm: kdmctl
reserve |
||||||||||||||
| desktop environment | wp | /etc/X11/wmsession.d/(available desktop environments at display manager)
|
IRIX Interactive Desktop (Indigo Magic) | GNOME | Xfce | KDE | CDE | LXDE |
|
|||||
| widget toolkit | wp | Motif | GTK+ | Qt | WINGs | |||||||||
| window manager | xwinman | wp |
|
twm (vtwm, tvtwm, CTWM, FVWM) | 4Dwm | (Sawfish) Metacity |
Xfwm4 | KWin | Window Maker | Enlightenment | ||||
|
||||||||||||||
| session manager |
xsm |
ksmserver |
LXSession | |||||||||||
| autostart |
Configure desktop -> Advanced -> Autostart | (LXSession) |
||||||||||||
| ~/.xinitrc |
|
|
||||||||||||
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
-
user's workstation remote machine
X clients
- application #1
- application #2
X clients
- application #3
X server
OS kernel OS kernel - screen
- keyboard
- mouse
hardware hardware Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- Linux X-Window
- X Window System protocols and architecture (wp)
- Display manager (login/password
screen)
- Debian
- /etc/X11/default-display-manager
- /usr/bin/kdm
- /etc/X11/default-display-manager
- Mandriva
- /etc/sysconfig/desktop
- DISPLAYMANAGER=KDM
- service dm restart
- /etc/sysconfig/desktop
- Problemes / Problems
- No es pot entrar / Cannot login
- E.g. after trying to install X drivers for Nvidia Optimus
- Solució / Solution
rm -f ~/.XAuthority*
- No es pot entrar / Cannot login
- Debian
- Gestor de sessió / Session manager
(wp)
- How
to
prevent KDE from restoring previous session
- KDE Components > Session Manager > Select "Start with an empty session"
- How
to
prevent KDE from restoring previous session
- X over SSH2 - A tutorial
- Auto start
- Desktop
Application
Autostart Specification
~/.config/autostart//etc/xdg/autostart/
- X11
~/.xinitrc
- KDE
- Desktop
Application
Autostart Specification
- Auto login
- How to Enable Automatic Login on Linux
- mcc (Mandriva/Mageia Control Centre):
- Arrencada -> Set up autologin to automatically log in
| aplicacions | |
||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| entorns d'escriptori |
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil. |
||||||||||||||||||||||||||||||||||
| widgets / toolkits |
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil. |
||||||||||||||||||||||||||||||||||
| gestors de finestres |
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil. |
||||||||||||||||||||||||||||||||||
| gràfics | |||||||||||||||||||||||||||||||||||
| sistemes operatius creuats / màquines virtuals |
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil. |
||||||||||||||||||||||||||||||||||
| sistemes operatius |
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil. |
||||||||||||||||||||||||||||||||||
| arquitectura |
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil. |
||||||||||||||||||||||||||||||||||
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- Gnome
(GTK) (wp)
- Applications
- Firefox, Kompozer, MCC ...
- Themes
urpmi gtk-chtheme gnome-themes-standard gnome-themes-extras- Directories
- /usr/share/icons/
- /usr/share/themes/
- Gtk Theme Creation Guide
- The 50 Best Linux GTK Themes
- 5 Beautiful GNOME (GTK) Themes (New Or Recently Updated)
- 7 Brilliant GNOME GTK Themes
- Applications
- KDE
(Qt) (wp)
- Applications
- ...
- Themes
- ...
- Applications
- wine
-
file toto.exe installation
usage
to run:
Mageia
wine management
urpmi qtbase5-database-plugin-sqlite q4wine
win32 programs
PE32 executable (GUI) Intel 80386, for MS Windows (activate 32 bit repositories)
urpmi wine wine32WINEPREFIX=~/.toto_win_32 WINEARCH=win32 winecfgWINEPREFIX=~/.toto_win_32 WINEARCH=win32 wineexplorer
WINEPREFIX=~/.toto_win_32 WINEARCH=win32 wine iexploreWINEPREFIX=~/.toto_win_32 WINEARCH=win32 wine toto.exe
win64 programs
PE32+ executable (GUI) x86-64, for MS Windows urpmi wine64WINEPREFIX=~/.toto_win_64 WINEARCH=win64 winecfgWINEPREFIX=~/.toto_win_64 WINEARCH=win64 wine64 explorerWINEPREFIX=~/.toto_win_64 WINEARCH=win64 wine64 iexploreWINEPREFIX=~/.toto_win_64 WINEARCH=win64 wine64 toto.exe
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- Instal·lació / Installation
- Mageia
- optional: if you will also want to execute win32 programs, activate 32-bit repository
-
32-bit 64-bit wine32 (those 32-bit binaries that are also used on 64-bit for 32-bit support):
- /usr/bin/{wine,wine-preloader}
- /usr/lib/wine/
wine64 (all 64-bit files (suggests 'wine32')):
- /usr/bin/{wine64,wine64-preloader}
- /usr/lib64/wine/
wine (all other files (requires 'wine32')) (not needed if you install wine64):
- /etc/rc.d/init.d/wine
- /usr/bin/{msiexec,notepad,regedit,regsvr32,wineboot,wineconsole,winefile,winemine,winepath,wineserver}
- /usr/share/doc/wine/
- /usr/share/wine/
- /etc/rc.d/init.d/wine
- /usr/bin/{msiexec,notepad,regedit,regsvr32,wineboot,wineconsole,winefile,winemine,winepath,wineserver}
- /usr/share/doc/wine/
- /usr/share/wine/
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- to run win64 programs
urpmi wine64- Més informació sobre el paquet
wine64-2.0.2-1.mga6.x86_64
This is the Win64 version of Wine. This version can only be used to run
64-bit Windows applications as is. For running 32-bit Windows applications,
you need to also install the 'wine32' package from the 32-bit repository.
- to run win32 programs
urpmi wine32
- gui
urpmi qtbase5-database-plugin-sqlite q4wine
- From source
- dependencies
- Mageia
- activate 32-bit repositories
urpmi gcc flex bison- urpmi --ignorearch libx11-devel libfreetype2-devel libxrender-devel libxml2-devel libjpeg-devel libglu-devel libalsa2-devel libxslt-devel libgnutls-devel
- activate 32-bit repositories
- Mageia
git clone git://source.winehq.org/git/wine.gitcd wine./configuremakesudo make install
- dependencies
- From source using rpmbuild (Mageia):
- wine + wine-staging
(e.g. v4.18 + staging):
- install
wine....src.rpm
cd ~/rpmbuild/SOURCESwget https://dl.winehq.org/wine/source/4.x/wine-4.18.tar.xz- wget https://dl.winehq.org/wine/source/4.x/wine-4.18.tar.xz.sign
wget https://github.com/wine-staging/wine-staging/archive/v4.18/wine-staging-4.18.tar.gz- cd
~/rpmbuild/SPECS - wine.spec
%define mainver 4.18
#define bugfix 1
...
%define staging 1
...
%define mono_version 4.9.3
...
%{_datadir}/%{name}/%{name}bus.inf
%{_datadir}/%{name}/%{name}hid.inf
- rpmbuild -ba wine.spec
- Problemes / Problems
- Errors
de construcció del RPM:
No s'ha trobat el fitxer: /root/rpmbuild/BUILDROOT/wine-4.18-1.mga7.x86_64/usr/lib64/wine/*.cpl.so
No s'ha trobat el fitxer: /root/rpmbuild/BUILDROOT/wine-4.18-1.mga7.x86_64/usr/lib64/wine/*.ocx.so
No s'ha trobat el fitxer: /root/rpmbuild/BUILDROOT/wine-4.18-1.mga7.x86_64/usr/lib64/wine/*.tlb.so
- Errors
de construcció del RPM:
- install
wine....src.rpm
- wine-mono
- install wine-mono....src.rpm
cd ~/rpmbuild/SOURCESwget http://dl.winehq.org/wine/wine-mono/4.9.3/wine-mono-4.9.3.tar.gz- cd
~/rpmbuild/SPECS - wine-mono.spec
Version: 4.9.3
...
#Patch0:...
#Patch1:...
...
#patch0...
#patch1...
...
#MAKEOPTS=%{_smp_mflags} WINE=%{wine} MSIFILENAME=wine-mono-%{version}.msi ./build-winemono.sh.static
MAKEOPTS=%{_smp_mflags} WINE=%{wine} MSIFILENAME=wine-mono-%{version}.msi make msi
- rpmbuild -ba wine-mono.spec
- wine + wine-staging
(e.g. v4.18 + staging):
- Mageia
- Utilització / Usage
- Win32 programs
- WINEPREFIX=~/.toto_win_32 WINEARCH=win32 winecfg
- Aplicacions
- Versió de Windows: ...
- Aplicacions
- WINEPREFIX=~/.toto_win_32 WINEARCH=win32 wine iexplore
wine"c://Program Files (x86)/SCARM/scarm.exe"
- WINEPREFIX=~/.toto_win_32 WINEARCH=win32 winecfg
- Win64 programs
- WINEPREFIX=~/.toto_win_64 WINEARCH=win64 winecfg
- WINEPREFIX=~/.toto_win_64 WINEARCH=win64 wine iexplore
- Win32 programs
- Impressió / Print
- Install and configure CUPS PDF
- winetricks
- winetricks - install wine application perquisites with ease
- dotnet
- .local/share/wineprefixes/
- Example
winetricks 7zipWINEPREFIX=~/.local/share/wineprefixes/7zip/ wine "c://Program Files (x86)/7-Zip/7z.exe"
- Wine application
database
- League of Legends
- Lightworks
- wine/linux
- WineHQ Bug 25374
- Solution:
urpmi cabextractwget http://www.kegel.com/wine/winetrickschmod +x ./winetrickswinetricks gdiplus d3dx9_36 vcrun2008 vcrun6 msxml3...
- Problemes / Problems
- League of legends
Wine cannot find the FreeType font library. To enable Wine to use TrueType fonts please install a version of FreeType greater than or equal to 2.0.5.- Solució / Solution
- install libfreetype6, 32-bit version
- Mageia
- enable 32-bit repositories
urpmi libfreetype6
- Mageia
- install libfreetype6, 32-bit version
- Solució / Solution
- err:module:import_dll Library libgcc_s_sjlj-1.dll
(which is needed by
L"C:\\windows\\system32\\gecko\\2.21\\wine_gecko\\nspr4.dll")
not found
- Solució / Solution
- Wine-gecko depends on libgcc
- Mageia
urpmi mingw32-gcccp /usr/i686-w64-mingw32/sys-root/mingw/bin/libgcc_s_sjlj-1.dll ~/.toto_win_32/drive_c/windows/system32
- Solució / Solution
- zlib1.dll not found:
- Access violation at address 00000000 (e.g. with SCARM)
0010:err:winediag:SECUR32_initNTLMSP ntlm_auth was not found or is outdated. Make sure that ntlm_auth >= 3.0.25 is in your path. Usually, you can find it in the winbind package of your distribution.- Solució / Solution
- Mageia
urpmi samba-winbind-clients
- Mageia
- Solució / Solution
- 0017:fixme:ntdll:NtLockFile
I/O completion on lock not implemented yet
- ...
- when running 32-bit programs with Wine 1:6.0, e.g.
WINEPREFIX=~/.toto_win_32 WINEARCH=win32 winecfg002c:err:module:DelayLoadFailureHook failed to delay load user32.dll.CreateDialogParamW
002c:err:module:DelayLoadFailureHook failed to delay load shell32.dll.SHGetFolderPathW- Solució / Solution
- ...
-
- ReactOS
- Supported Hardware/Network cards
- Install on VirtualBox
- VirtualBox (ReactOS wiki)
- Installing ReactOS on VirtualBox
- Installing ReactOS as a guest os (VirtualBox)
03Particions a l'MBR / Partitions on MBR#
| MBR (/dev/hda) (Master Boot Record / Partition Sector): 512B (C=0, H=0, S=1) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| back-up | restore | MBC | particions / partitions (/dev/hdax) | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| points to boot sector (first 512 bytes of the active partition) | name | view / edit | create | filesystem |
image | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| extract | create | bootloader (ARCS) |
create (format) |
check and repair | resize | create | recover | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| DOS | fdisk /mbr |
c:, d:, e: ... | ptedit | fdisk | format | dell restore | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Ranish Partition Manager (part244) | Norton Ghost | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| win32 | mkbt -c a: bootsect.bin | MBR: fixmbr VBR: fixboot |
NTLDR: boot.ini | ptedit32 | |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| xosl | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Linux |
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil. |
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
|
|
|
|
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Irix | dvhtool |
|
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil. |
|
|
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
04Sistemes operatius / Operating systems#
- Comparison of operating systems (wp)
- UNIX / Linux
- Macintosh
- MS Windows
- eComStation (OS/2)
- eyeOS
- ChromeOS
- Chromebook
- A new kind of computer: Chromebook (Google Chrome Blog)
- New computers for the browser-based world (Google Enterprise Blog)
- How to get Google Chrome OS download ISO file
05Boot#
- Guide to x86 Bootstrapping (and Partitioning)
- Booting (Wikipedia)
- Bootloader (wp)
(wp: Comparison
of
boot-loaders)
- Primary boot loader
- BIOS
- Access to BIOS information
dd if=/dev/mem bs=1k skip=768 count=256 2>/dev/null | strings -n 8 | lessdmidecode
- Access to BIOS information
- EFI / UEFI (wp)
- Unified EFI Forum (wp)
- [SOLVED] Trying to install GRUB2 on a UEFI system
- Modify EFI information:
- efibootmgr
(next boot, ...)
urpmi gcc pciutils-devel libzlib-devel- make
- make install
- efibootmgr
(next boot, ...)
- BIOS
- Second-stage boot
loader
- Lilo
- GNU
Grub
- GNU Grub 1 (wp)
- GNU Grub 2 (wp)
- Dual boot (Ubuntu)
- VGA modes
- GRUB on Ubuntu
- Chain
- Chainload to the MBR of a second drive (*)
- Grub 1:
- on sda, /boot/grub/menu.lst
title mbr_on_second_disk
rootnoverify (hd1)
chainloader (hd1)+1
- on sdb, /boot/grub/menu.lst
- make sure all entries point to (hd1,...) (bug on Mageia 1)
- on sda, /boot/grub/menu.lst
- Grub 1:
- 17. Bootloader main options (Mageia)
- 18. Bootloader expert use (Mageia)
- Re: menu entries on the Grub loader for on my 2nd hard-disk cannot boot
- Chainload to the MBR of a second drive (*)
- Avoid auto load grub
- ESC-key
- Shift-key
- How
do
I stop auto load grub?
- timeout=0
- Syslinux
- Primary boot loader
- Linux boot
- DOS boot from USB key
- FSType: 0E (bootable-> 80)
- HOWTO Create a DOS boot USB flash drive (Gentoo Linux)
- WeetHet - Boot from USB Flash drive
- Windows-based Format Utility for
HP Drive Key or DiskOnKey USB Device
(no funciona amb A: ni B:)
- take DOS files from: A: (virtual floppy containing a bootable image)
- Multiboot
- Understanding MultiBooting and Booting Windows from an Extended Partition (Goodells)
- How To Multi-Boot Operating Systems (Disc drives & partitions table)
- Dual-Boot Linux and Windows 2000/Windows XP with GRUB HOWTO
- Particions / Partitions
- Paricions a l'MBR / Partitions on MBR
- Linux partitions
- SGI IRIX disks
- Dell partitions (Goodells)
- 3 (4) partitions:
- DE / 06
- 07
- (0F)
- DB / 0C
- Utility partition
- Restore partition
- 3 (4) partitions:
- Imatges / Images
- CD
- Ultimate Boot CD (MS Windows)
- BartPE (MS Windows)
- Disquet / Floppy (mount with Virtual Floppy)
- Bootdisk
- BootCD
- CDBurnerXP
- Tools / DosBootimage.IMA (DR-DOS 7.03)
- CD
- Wake up
| MBR | dev | dev | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| name | sector | code | name | partition | sector | bootloader | name | part | sector | |||
| name | config | |||||||||||
| PC | BIOS | HDD MBR | boot (first: 512B) | MBC | HDD | boot / active | boot (first: 512B) | lilo | lilo.conf | HDD | (any) | first |
| NTLDR | boot.ini | |||||||||||
| floppy | boot | |||||||||||
| CDROM | ||||||||||||
| USB | ||||||||||||
| SGI | ||||||||||||
| Dreambox | first stage | serial | ||||||||||
| NAND flash (JFFS2) | 2nd stage | first: 128KB | 2nd stage loader | NAND flash | boot | |||||||
| CF | first | |||||||||||
| tftp | ||||||||||||
| CF | first | |||||||||||
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
06Desenvolupament / Development#
- Programari / Software
- Extreme Programming vs. Interaction Design
- Distributed Computing: An Introduction
- Architectural patterns
- Multitier
architecture
- Presentation tier
- Application Tier / Business logic / Logic tier
- Data tier
- Model–view–controller (MVC)
- Model View Presenter
- Multitier
architecture
- Eines / Tools
- Profiling
- GNU prof (binutils.rpm)
- memprof
- Profiling with Eclipse
- Profiling
- Control
de
versions / Version control
- Sistemes / Systems
- CVS
- Git
- Subversion
- Allotjament / Hosting
- Comparison of source code software hosting facilities
- Bitbucket
(Atlassian) (wp)
- Bitbucket with SSH
- Passos / Steps
- Bitbucket:
- create new repository in accountname_i:
- repo_a
- create new repository in accountname_i:
- local computer
- from scratch
mkdir /path/to/your/projectcd /path/to/your/projectgit init- without SSH identity
git remote add origin git@bitbucket.org:accountname_i/repo_a.git
echo "My Name" >> contributors.txtgit add contributors.txtgit commit -m 'Initial commit with contributors'git push -u origin master
- from existing project
cd /path/to/my/repo- without SSH identity
git remote add origin git@bitbucket.org:accountname_i/repo_a.git
- with
SSH identity
git remote add origin git@bitbucket-identity1:accountname_i/repo_a.git
git push -u origin --all # pushes up the repo and its refs for the first timegit push -u origin --tags # pushes up any tags
- from scratch
- Bitbucket:
- Github
- GitLab
- GitLab with SSH
- Markdown
- About
- Docs
- Install GitLab
- Installation methods
- Cloud provider guides
- AWS
- AMIs
- GitLab Enterprise Edition
- GitLab Community Edition
ssh -i your_private_key.pem ubuntu@x.x.x.x-
sudo gitlab-ctl status -
sudo gitlab-ctl reconfigure
-
- Manual installation
- AMIs
- AWS
- Reference architectures
- Steps after installing
- Install GitLab
- Storage
- Reduce
repository size
- Dependencies
- from source
- git-filter-repo
pip install git-filter-repo
- git-filter-repo
- Mageia
- ...
- from source
- Steps
- Purge files from repository history
- (wait 30 minutes)
- Repository cleanup
- Dependencies
- Reduce
repository size
- CI/CD
- Info
- Use CI/CD to build your application
- GitLab CI CD Tutorial for Beginners [Crash Course] (TechWorld withNana)
- Exemples / Examples
- .gitlab-ci.yml
variables:
MY_FIRST_VAR: "my_first_var_value"
stages:
- my_test_stage
- my_build_stage
my_test_1.job:
stage: my_test_stage
image: python:3.x....
before_script:
- apt-get update && apt-get install make
script:
- make test
my_test_2.job:
stage: my_test_stage
image:
before_script:
script:
my_build_job:
stage: my_build_stage
services:
- ...
before_script:
script:
- .gitlab-ci.yml
- Info
- Pivotal integration
- Gitlab - Pivotal Tracker integration
- Steps
- Pivotal
- get an API token from: Profile / API Token
- GitLab
- put the API token from Pivotal into:
- Project / Settings / Services / PivotalTracker
- commit your changes specifying the
story ID:
git commit -m "[#story_id] your comments as usual"git push
- check the activity for your stoy in Pivotal
- put the API token from Pivotal into:
- Pivotal
- Sistemes / Systems
- Preguntes i respostes
/ Questions and answers
- Stack
Overflow (C, C++, PHP, Java, ...)
- cerca amb un tag concret:
- paraula1 paraula2 [tag1] ...
- cerca amb un tag concret:
- Code Project
- Code Guru
- Stack
Overflow (C, C++, PHP, Java, ...)
- Llenguatges / Languages
- Comparison of programming languages (Wikipedia)
- List of hello world programs
- Bjarne Stroustrup's FAQ
- Utilitats
i trucs
- Preguntes i respostes / Questions and answers
- Debugging macros (tracer / cerr)
- File
alteration
monitor (wp)
- How do I make my program watch for file modification in C++?
- Linux
- How can I tell which process is causing disk activity?
- inotify
(wp)
- API
- tools
- incron
- Scheduling jobs based on filesystem activity with incron (linux.com)
- Pseudo Synchronous Replication to Amazon S3 (s3rep.sh)
- Simple tools produce powerful results (Rob Searles)
- Triggering Commands On File/Directory Changes With Incron
- Which process was responsible for an event signalled by inotify?
- command line
$$- a dollar sign$@- the watched filesystem path$#- the event-related file name$%- the event flags (textually)$&- the event flags (numerically)
- inotail - tail replacement using inotify
- inoticoming - trigger actions when files hit an incoming directory
- inotify-tools - command-line programs
providing a simple interface to inotify
- inotifywait
- inotifywatch
- iwatch - realtime filesystem monitoring program using inotify
- incron
- exemples / examples
- dnotify
- FAM
File Alteration Monitor (sgi)
- gamin - File and directory monitoring system
- lm-profiler (app-laptop/laptop-mode-tools) (urpmi laptop-mode-tools)
- pyinotify
- fschange
- dazuko
- raw view:
echo 1 > /proc/sys/vm/block_dump
while true; do dmesg -c | grep -v pdflush | grep -v reiserfs/0; sleep 0.5; done
- IRIX
- MS Windows
- Formats de
serialització de dades / Data serialization formats
- JSON
- YAML (wp)
- Sintaxi / Syntax
- YAML syntax (Ansible)
- Cadenes / Strings
- YAML Multiline - Find the right syntax for your YAML multiline strings
- escapes (like \n) only work when inside double quotes; they don't work inside plain or single quotes
-
block scalar type block chomping indentation replace newlines with spaces (folded) > keep newlines (literal) | Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
single newline at end (clip)
no newline at end (strip) - all newlines from end (keep) + Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
number of spaces to be ignored n Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
-
converted from json equivalent
- |2
443
- " 443\n"
- |
toto
- "toto\n"
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- Eines / Tools
- Sintaxi / Syntax
- C
- Programming in C: UNIX System Calls and Subroutines using C.
- Using C on the Unix system (O'Reilly)
- Programming in C. UNIX System Calls and Subroutines using C. ()
- Biblioteques / Libraries
- Threads
- printf
- colors
- Colored printf messages in Linux
- Colores en printf
printf("\33[XXm ... \33[0m");
printf("\33[XX;YYm ... \33[0m");
- colors
- Crides a sistema
/ Calls to system
popen()- Getting stdout from an executed application
in MSWindows:_popen(), però no funciona des d'aplicacions; només des de línia de comandes. Alternatives:CreatePipe/CreateProcessShellExecuteno permet capturar la sortida estàndard
CreatePipe/CreateProcess(MSWindows)- CreateProcess does not return extected value (simple example with CreatePipe, CreateProcess, ReadFile)
- C++ popen command without console (merges everything) (CreatePipe/CreateProcess, POSIX)
- Is there any way of stopping _popen opening a dos window? (popen, CreateProcessA, ShellExecute)
- Microsoft
- hide console-window on executing _popen
system()execvp
- Opcions / Options
- Commandline option parser (GOption)
- Object-oriented C
- C++
- Reference
- C/C++ Reference (cppreference)
- C++ Reference (cplusplus)
- z/OS V1R10.0 XL C/C++ Run-Time Library Reference (examples)
- Getting started (MS Windows)
- Tutorial / examples
- Llibres / Books
- Programming in C++. Rules and Recommendations
- C++ Annotations (C -> C++)
- C++ con clase
- Crides a sistema / Calls to system
- Biblioteques C++ Libraries
- Standard Template Library STL (SGI)
- Boost
- Get
Boost
(MS Windows)
- Free downloads (Boost Consulting)
- Boost for Visual C++ Developers (msdn)
- What's New in Boost Threads? (Dr. Dobb's) (boost 1.35)
- The Boost.Threads Library (Dr. Dobb's) (*)
- Compilació / Compilation
- Getting
Started on Unix Variants
cd ~/src/
wget https://dl.bintray.com/boostorg/release/1.67.0/source/boost_1_67_0.tar.bz2
tar xjf boost_1_67_0.tar.bz2
cd boost_1_67_0
./bootstrap.sh
./b2
sudo ln -s /home/<user>/src/boost_1_67_0 /usr/local/src/boost_1_67_0
- Getting
Started on Unix Variants
- Xarxa / Network
- Initiation au développement C++ sur les sockets (pdf fr)
- Brief Socket Tutorial
- Practical TCP/IP Sockets in C
-
unix MSWindows
include libc6-dev
glibc-develnetdb.h netinet/in.h netinet/tcp.h sys/socket.h Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
include Winsock winsock2.h Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- asio
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
-
C C++ standard c++ library
(std::)boost (boost::) GNU Common C++ windows.h
(data types)
MFC others
basic types
STL containers <vector>
<list>
<queue>
<stack>
...
"boost/array"
"boost/filesystem"
...path
...
algorithms
char* nomfitxer strings <string> string (*)
CString
strcat +
<stdio.h> scanf IO stream <iostream> cin >> ...
printf cout << ...
printf( "%02x", number) cout.setf( ios::hex, ios::basefield )
cout << setw(2) << setfill('0') << number"boost/format" format()
FILE *fitxer <fstream> ifstream,
ofstream (*) fitxer
"boost/iostreams"
HANDLE
CFile
fitxer = fopen( nomfitxer ) fitxer.open(nomfitxer.c_str())
CreateFile
fitxer = popen( comanda, "r")
"boost/process"
CreateProcess
pstreams
fscanf fitxer >> ...
fprintf fitxer << ...
fread
ReadFile
fwrite
fgets
fputs
char* cadena <sstream> stringstream cadena(stringstream::in | stringstream::out);
sscanf istringstream cadena;
src_cadena >> ..."boost/regex" (regex)
"boost/spirit"
sprintf dst_cadena << ...
printf("%02x", number) <iomanip> fitxer << setw(2) << setfill('0') << number "boost/format" cout < format( "%02x." ) % number;
sprintf(dest_cadena, "%02x", number) dest_cadena.setf( ios::hex, ios::basefield );
dest_cadena << setw(2) << setfill('0') << numberdest_cadena = str( format( "%02x." ) % number );
<iosfwd> streamsize
exceptions <exception> exception
bad_alloc
bad_cast
runtime_error
logic_error
...(Error and exception handling)
C library ctime <time.h> time
gmtime
asctime
..."boost/date-time"
<string.h>
cstring <string.h> memcpy
memset
strcpy
strncpy
...
atoi
atofcstdlib
<stdlib.h>atoi
atof
strtol
...
malloc
...
freopen
...cstdio
<stdio.h>freopen
remove( filename )
...
...
"boost/thread" (*)
"boost/program_options" ini file
ccRTP
boost/asio (network)
ascii(...)
int(...)
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- Reference
- C#
- Why free software shouldn't depend on Mono or C# (FSF)
- C# (wp)
- Implementacions / Implementations (frameworks)
- ...
- Data model (max. values: <limits.h>):
- types:
unix win32 unsigned u8 uint8_t unsigned char u16 uint16_t unsigned short u32 uint32_t unsigned int u64 uint64_t unsigned __int64 signed s8 int8_t char s16 int16_t short s32 int32_t int s64 int64_t __int64 Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- Endianness
- Cross platform preprocessor defines
- Which Cross Platform Preprocessor Defines? (__WIN32__ or __WIN32 or WIN32 )?
- GCC: Common predefined macros
- Microsoft Visual predefined macros
-
compiler
macro
GNU gcc
__GNUC__
MS Visual
_WIN32
_WIN64
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- Guies
d'estil
/ Style layout
- Coding conventions (wp)
- Refactoring / beautifier(wp)
- Best C++ Code Formatter/Beautifier [closed]
- GUI
- command line (called by GUI)
- Artisitc style (AStyle)
- Uncrustify
- indent
- StyleRevisor
-
guia doc implmentation emacs coding style
C - GNU
Coding
Standards
- 7.3 Makeing releases: README, INSTALL...
Documenting the code (Doxygen) c-mode (BOCM)
C++ cc-mode
C#
Java - Java Programming Style Guide (JavaRanch)
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- GNU
Coding
Standards
- Estructura de directoris /
Source tree (C,C++) (UNIX):
code dist toolchains unix ms windows unix gcc MSVisual files option files option /usr/local/toto_1_2 c:\Program Files\toto\toto_1_2
include toto module1 module2 Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
/usr/include (#include) [-I/usr/local/toto_1_2/include] (1) (#include) /I c:\Program Files\toto\toto_1_2\include src module1 module2 Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
lib libtoto.a libtoto_1_2.lib libtoto.so.1.2 toto_1_2.lib
toto_1_2.dll
toto_1_2D.dllAquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
/usr/lib -ltoto [-L/usr/local/toto_1_2/lib] (2) [lib]toto_1_2[D].lib /link /LIBPATH:c:\Program Files\toto\toto_1_2\lib bin /usr/bin
build gcc msvc60 msvc71 (2003) msvc80 (2005) Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- List of build automation software (wp)
- Toolchain
(*)
- Components
- ...
- Compiler
- gcc
- Binary utils
- binutils
- C standard library
- GNU Libc (glibc)
- uClibc
- dietlibc
- Components
- pkg-config
- Install
- CentOS
sudo yum install pkgconfig
- CentOS
- list all available libraries
pkg-config --list-all
- generate .pc files:
- ...
- check if a library exists:
pkg-config --exists --print-errors "libavcodec >= 53.34.0 libavutil >= 51.22.0"
- get cflags for zlib libraries:
pkg-config --cflags --libs libavcodec
- get paths where pc files are searched:
pkg-config --variable pc_path pkg-config
- add a path to search for additional .pc files (after paths
specified by
PKG_CONFIG_PATH, default paths are checked; no need to put default paths in the variable):export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig/:/usr/local/lib/pkgconfig/
- Install
- CMake
- CMakeList.txt
- cmake
- ccmake
- cmake-gui
- Eclipse
- Eclipse cdt4 generator
- How to configure Eclipse CDT for cmake?
- Dependències / Dependencies
- compile from source
cd ~/src/wget https://cmake.org/files/v3.12/cmake-3.12.1.tar.gztar xvzf cmake-3.12.1.tar.gzcd cmake-3.12.1./bootstrapmakesudo make install
- Mageia (cmake 3.7; if you need a more recent
version, compile it from source)
urpmi cmake gdb
- compile from source
- Option 1: (recommended) use an Eclipse plugin
- Option 2: (not recommended, as this will create a
Makefile project, without C++ Build section in project
Properties) let cmake create the project files for
Eclipse
- Passos / Steps
~/src/myproject/- CMakeList.txt
cmake -G"Eclipse CDT4 - Unix Makefiles" -D CMAKE_BUILD_TYPE=Debug .- will create
~/src/myproject/.project~/src/myproject/.cproject
- will create
- launch Eclipse
- File / Import... / General / Existing
Projects into Workspace / Select root
directory
~/src/myproject/
- File / Import... / General / Existing
Projects into Workspace / Select root
directory
- Passos / Steps
- The Autotools
- Autotools tutorial
- An
introduction
to Autotools (automake)
- "The Autotools are tools that will create a GNU Build System for your package. Autoconf mostly focuses on configure and Automake on Makefiles."
-
package
install
tool
purpose
written in language
environment
variable
takes
calls
generates
name
desc
Mageia
CentOS
configure
Makefile
make
MAKE
Makefile
- object files (.o)
- executable files
autoconf
"Autoconf is an extensible package of M4 macros that produce shell scripts to automatically configure software source code packages."
autoconf
autoconf
autoconf
AUTOCONFconfigure.ac
- configure
autoheader
AUTOHEADER
- config.h.in
autom4te
AUTOM4TE
autoreconf
perl
- autoconf
- autoheader
- aclocal
- automake
- autopoint
- libtoolize
autoscan
autoupdate
automake
automake
automake
aclocal
ACLOCAL
- aclocal.m4
- autom4te.cache/
automake
AUTOMAKE
Makefile.am (variable definitions)
- Makefile.in
- src/
- test/
- doc/
- config.guess ->
- compile ->
- missing ->
- install-sh ->
- config.sub ->
- depcomp ->
- test-driver ->
gettext
"Set of tools that provides a framework to help other GNU packages produce multi-lingual messages"
gettext-devel
autopoint
AUTOPOINT
GNU Libtool
"GNU libtool is a generic library support script. Libtool hides the complexity of using shared libraries behind a consistent, portable interface."
libtoolize-base
libtoolize
Prepare a package to use libtool.
LIBTOOLIZE
M4
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- autoconf
- Provided tools
autoconfautoreconf- it calls to aclocal, autoconf
- Problemes / Problems
configure.ac:32: error: possibly undefined macro: AC_DEFINE- problem is caused by conflicts with another version of aclocal (automake)
- Solució / Solution
export ACLOCAL=/usr/bin/aclocal
autoreconf -i
# autoconf
- Provided tools
- automake
- Uses autoconf
- Compilació / Compilation
- Dependencies
- CentOS
- NOTE: package in CentOS 7 official distribution is version 1.13.1
- CentOS
- Steps
curl -s -O -L http://ftpmirror.gnu.org/automake/automake-1.14.1.tar.xztar xJf automake-1.14.1.tar.xzcd automake-1.14.1configure --prefix=/usrmakesudo make install
- Dependencies
- Provided tools
- Problemes / Problems
./configure: line xxxx: syntax error near unexpected token `common_lib_checking,'
./configure: line xxxx: `PKG_CHECK_MODULES(common_lib_checking, fuse >= ${min_fuse_version} libcurl >= 7.0 libxml-2.0 >= 2.6 )'- Solució / Solution
- if compiling automake, use
configure --prefix=/usr - check that you are not using mixed versions of (aclocal, automake)
- version 1.13 of automake (from CentOS repositories) works
- compiled version 1.14 of automake mixed with version 2.69 of autoconf, autoheader (from CentOS repositories) gives this error
- check that automake and aclocal are
installed in the same dir (/usr/bin vs
/usr/local/bin)
which automakewhich aclocal
- workaround:
uninstall 1.14 and reinstall 1.13
cd ~/src/automake-1.14sudo make uninstallsudo yum reinstall automakewhich automakeautomake --version # should return 1.13which aclocalaclocal --version # should return 1.13
- if compiling automake, use
- Solució / Solution
- meson / ninja
- Compilació / Compilation
- What is the difference between g++ and gcc?
- Problemes / Problems
- Si s'ha compilat un programa en C amb gcc (i no amb g++) (fent servir "-Wc++-compat"?), potser quan s'executa dóna l'error "undefined symbol: __cxa_pure_virtual". Per a resoldre-ho, cal afegir -lsupc++ (/usr/lib/gcc/i586.../4.5.2/libsupc++.a, que és un subconjunt de libstdc++) al final de tot. Nota: la inclusió de libstdc++ ja es fa quan es compila amb g++.
- Compilació creuada / Crossed compilation
- shared objects
- Biblioteques compartides en Linux / Shared libraries in Linux
- Static, Shared Dynamic and Loadable Linux Libraries (Linux tutorial)
- Shared objects for the object disoriented!
- Program Library HOWTO
- Using static and shared libraries across platforms
- ld and WIN32 (cygwin/mingw) (export-all-symbols)
- Static and dynamic libraries (Herbert) (*)
- Shared libraries with Eclipse
- Shared libraries with GCC on Linux
-
toolchain objecte / object biblioteca / library executable creation list of functions details creation list of objects list of functions creation list of libraries
static dynamic static dynamic static dynamic with static libs with dynamic libs static dynamic gcc / g++
(binutils)cc [-o toto1.o] -c toto1.c nm toto1.o
objdump toto1.o ar cr libtoto_static.a toto1.o toto2.o cc -shared -o libtoto_shared.so toto1.o toto2.o
- ar -tvf libtoto_static.a
- objdump -a libtoto_static.a
nm libtoto_static.a - nm -D libtoto_shared.so
- objdump -T libtoto_shared.so
- cc -o toto_main toto_main.c -Lpath_static -ltoto_static
- cc -o toto libtoto_static.a toto_main.o
- note: "-ltoto_static" = "libtoto_static.a", in path_static
- ld -o toto toto.a -ltoto toto_main.o
- cc -o toto toto_main.c -Lpath_shared -ltoto_shared
- Nota: si existeix tant libtoto_shared.so com libtoto_shared.a, tindrà preferència la .so
ldd toto MS Visual cl toto1.c
dumpbin /all toto.obj (to find CRT option) lib -out:libtoto_static.lib toto1.obj toto2.obj
lib -list libtoto_static.lib
link -out:toto.exe toto.obj
- depends toto.exe (Dependency walker)
- cygwin: objdump -p toto.exe | grep "DLL Name"
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- IDE
- Frameworks:
| framework | .NET | Java Platform | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| specification | implementation | specification | impl | |||||||
| MS .NET | MS .NET compact framework | Mono | SSCLI | Portable .NET | ||||||
| language | (C# compiler) |
|
||||||||
| framework | libraries | BCL | (partial) |
|
||||||
| intermediate language / bytecode | CLI: |
CIL | MSIL | x | x | Java bytecode (.class) | ||||
| runtime / virtual machine | VES |
CLR | JVM |
|
||||||
| OS | ||||||||||
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- Unit testing
- Multiple phone web-based application framework (wp)
- Scratch (MIT)
- Documentació / Documentation
- Comparison of documentation generators (wp)
- Documenting the code (Doxygen)
07Perl#
- CPAN
- Modules
08Python#
09Comercial / Commercial#
- Suïssa / Switzerland
- Estat Espanyol / Spain
- 100 Mejores de informática
- Acuista
- Alternate
- Área PC
- Audiotronics
- Cablematic
- Cajasdeordenador
- Diotronic
- Ibertrónica
- Ie3 (botiga)
- Infopid
- Kibutz
- Life
- MR.Micro (Point of View: netbooks with Linux)
- OfertasPC
- Óptize
- Pista 0
- PC Componentes
- Asus Limpus (Linux)
- PC Green
- Pricoinsa
- Revolution
- StockServer
- Traxtore
- EUA / USA
10Virtualització / Virtualisation#
- Comparison of virtual machines (Wikipedia)
- x86 virtualization (Wikipedia)
- Virtual Machines are No Security Blanket (Linux Magazine)
- Virtualization technology (VT)
- Comproveu que la vostra CPU
pot fer virtualització / Check that your CPU is able to do
virtualisation:
egrep '^flags.*(vmx|svm)' /proc/cpuinfo- Intel: vmx
- AMD: svm
- Comproveu que la BIOS
té la virtualització habilitada / Check that the
virtualisation is enabled on BIOS:
- Security:
- VT: enabled
- Security:
- Carregueu el mòdul del kernel adequat / Load the needed kernel module:
- Intel (vmx):
modprobe kvm_intel - AMD (svm):
modprobe kvm_amd
- Intel (vmx):
- Comproveu que la vostra CPU
pot fer virtualització / Check that your CPU is able to do
virtualisation:
- libvirt
- Installation
- Mageia
urpmiqemu libvirt-utils libguestfs-tools[virt-manager]systemctl status libvirtd
- CentOS
- ftp://ftp.cesca.cat/centos/7/os/x86_64/
- Mageia
- Documentation
- FAQ
- Wiki
- Virtual
Networking
- /etc/libvirt/<hypervisor>/networks/
- Virtual
Networking
- Usage
systemctl status libvirtd
- virsh
- Virsh
Command
Reference
- Chapter 1. Commands listed by group
-
group
examples
Wiki Domain management
Domain monitoring
- list --all
Host and hypervisor
- nodeinfo
Interface
Network filter
(Virtual) Networking
- net-list --all
- net-edit default
- net-dumpxml default
- net-update ...
Virtual Networking Node device
Secrets
(Domain) Snapshot
- snapshot-create-as
Storage pool
Storage volume
Virsh
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- Virsh
Command
Reference
- libguestfs
- virt-sysprep (Reset, unconfigure or customize a virtual machine so clones can be made)
libguestfs-test-tool
rpm -q qemu-system-x86
- Problemes / Problems
- libvirt: error : no connection driver available for qemu:///session
- Applications using libvirt
- virt-manager
- Installation
- virt-manager
- Installation
- QEMU
- Resizing a QEMU virtual machine, partition, and filesystem (dd)
- Resizing qemu images (MSWindows copy /b)
- Usage in Mandriva 2010.0
- install and start kvm
qemu-kvm -hda linux.img -cdrom toto.iso -boot d
- Qemu 0.8.1 sur Mandriva 2006
- Creation of disk files
2GB file: qemu-img create linux.img 2G- 2GB raw file:
dd if=/dev/zero of=linux.img seek=2 obs=1GB count=0
- Boot from iso image:
qemu -boot d -cdrom toto.iso -hda linux.img
- Mount raw file
- QEMU Official OS Support List Version (claunia)
- KVM
(extension for QEMU: hardware acceleration)
urpmi kvmmodprobe kvm_intel- Used by Android AVD
- Incompatible with VirtualBox
No s'ha pogut obrir una sessió per a la màquina virtual wct_frontend_ajs.
VT-x is being used by another hypervisor (VERR_VMX_IN_VMX_ROOT_MODE).
VirtualBox can't operate in VMX root mode. Please disable the KVM kernel extension, recompile your kernel and reboot (VERR_VMX_IN_VMX_ROOT_MODE).
Resultat Codi:NS_ERROR_FAILURE (0x80004005)
Component:ConsoleWrap
Interfície:IConsole {872da645-4a9b-1727-bee2-5585105b9eed}- Workaround
- When using VirtualBox, disable hardware virtualisation acceleration (can only be done if hosted os is 32-bit)
- Solution
- Nested virtualization (virtual machines inside a
virtual machine)
echo "options kvm-intel nested=y" | sudo tee /etc/modprobe.d/kvm-intel.conf
- VM Back
- VMWare
- VMWare / QEmu utilities
- VMPlayer
(free)
- urpmi gcc kernel-*-devel
- VMware Player Documentation
- Virtualización con WMware Server/Client (TodoLinux)
- Problems with kernel > 3.1
- Shrink
- not valid with ext4, xfs file systems
- install VMWare tools
vmware-toolbox- Shrink tab
- VMWare tools
- Overview of VMware Tools
- General VMware Tools installation instructions
(/usr/lib/vmware/isoimages)- Dins de la màquina virtual / from guest OS:
- urpmi make gcc kernel-<...>-devel-latest (linux_userspace_headers no és suficient)
- cd /media/cdrom
- tar xvzf...
- cd /tmp/vmware-tools-distrib
- ./vmware-install.pl
- Reconfigurar: /usr/bin/vmware-config-tools.pl
- Desinstal·lar: /usr/bin/vmware-uninstall-tools.pl
- You can now run VMware Tools by invoking the
following command:
"/usr/bin/vmware-toolbox" during an X server session.
To enable advanced X features (e.g., guest resolution fit, drag and drop, and
file and text copy/paste), you will need to do one (or more) of the following:
1. Manually start /usr/bin/vmware-user
2. Log out and log back into your desktop session; and,
3. Restart your X session.
To use the vmxnet driver, restart networking using the following commands:
/etc/init.d/network stop
rmmod pcnet32
rmmod vmxnet
modprobe vmxnet
/etc/init.d/network start
- Appliances
- VMware virtual appliance marketplace
- VMware (linhost.info)
- Settings
vmware-modconfig –console –install-all(3.0)vmware.config.pl(2.0)
- Xarxa / Network
vmware-config-network.pl- VMWare
Networking: select eth1 instead of eth0
/etc/vmware/networking-
VERSION=1,0
add_bridge_mapping eth1 -1
add_bridge_mapping eth0 0
[...]
-
- /etc/vmware/networking
VNET_0_INTERFACE eth1
- The different modes of VMWare network
- VMware Player 2.5 118166 x86_64 Linux RPM missing vmware-config.pl after install
- Bridged network does not work on Windows 7 host
- Workaround:
- ifdown eth0
- service vmware restart
- vmplayer
- EasyVMX!: Create virtual machines to run in VMware Player
- qemu-img vmdk
- VMWare Player Image Creation
- Host OS Linux. Install from ISO image:
- knoppix.vmx:
- ide1:0.fileName = "knoppix.iso"
- ide1:0.deviceType = "cdrom-image"
- knoppix.vmx:
- Drivers
- Intel PRO/1000 MT (e1000)
- Vmware tools
- VMware Tools Installation Instructions
- iso
- Installing VMware Tools within X
- vmware disk manager (growing virtual disk)
- VMWare utilities homepage
- VM
Back
- VM tools (vmw, vmshrink, vmftp, vmtsr, vmcmd-tools)
- About .VMDK Files
- mount virtual disk files (pdf)
- DiskMount (from MSWindows)
- vmware-mount (from Linux)
- mount-vmfs (from Unix)
- Problemes / Problems
- #error only <linux/bitops.h> can be included directly
- Problems with kernel >=2.6.23
- Bug 39577 VMware Player cannot compile modules in 2008.1 RC2
- patch for kernel
- Problems with VMPlayer 2.5.2 and kernel 2.6.29 (Mandriva 2009.1)
- Virtual
Box (Oracle)
- VirtualBox virtual appliances
- Usage
- service virtualbox start
- VirtualBox
- Command line
- VBoxManage
VBoxManage list vmsVBoxManage startvm "my_vm_name"
- VirtualBox’s Little Secret: The Command Line (Linux Magazine)
- VBoxHeadless,
the
remote desktop server
nohup VBoxHeadless --startvm vm_name &
- VBoxManage
- settings
- old:
- ~/.VirtualBox/
- VBoxSVC.log
- ~/.VirtualBox/
- new:
- ~/.config/VirtualBox/
- VBoxSVC.log
- ~/.config/VirtualBox/
- old:
- Nested virtualization
- [feature-request] Nested Virtualization: VT-in-VT
- Virtualization inside a virtualizer, discussions
- Workaround:
- use kvm instead
- Mida de la pantalla / Screen size
- Ubuntu (in the virtual machine)
- Screen
Resolution
Problem with Ubuntu 14.04 and VirtualBox
sudo apt-get install virtualbox-guest-dkms
- Screen
Resolution
Problem with Ubuntu 14.04 and VirtualBox
- How
can
I Increase Screen Resolution?
VBoxManage setextradata global GUI/MaxGuestResolution 720,576
- Ubuntu (in the virtual machine)
- How
to
mount a VirtualBox VDI image:
modprobe nbd max_part=16qemu-nbd -c /dev/nbd0 toto.vdimkdir/mnt/vdi_imagemount -t ext4 /dev/nbd0p1 /mnt/vdi_image- you will get /dev/nbd0p1
- Disc / Disk
- Increase disk size (e.g. from 10GiB to 15GiB, 15360MBytes)
- Resizing VirtualBox's disk size [duplicate]
- Increase
VirtualBox Disk Size
- Linux guests without using LVM (Logical Volume Manager)
- Linux guests using LVM (most common?)
- stop virtual machine
- from real computer: resize disk
- list all available disks
VBoxManage list hddsVBoxManage list hdds | grep -4 myname
- resize to 15360MiB (15GiB):
VBoxManage modifymedium disk <filename_or_uuid_from_list> --resize 15360
- list all available disks
- start and connect to virtual machine
- resize partition (e.g. resize partition /dev/sda2
so as it uses all available space in disk)
lsblk- example before resizing partition sda2 to
15GB (15360 MBytes)
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 15G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 11G 0 part
├─almalinux-root 253:0 0 9,8G 0 lvm /
└─almalinux-swap 253:1 0 1,2G 0 lvm [SWAP]
sr0 11:0 1 1024M 0 rom
- example before resizing partition sda2 to
15GB (15360 MBytes)
fdisk /dev/sda- p: print partitions
- d: delete partition
- Nombre de partició (1,2, default 2):
- n: new partition
- Partition type
p primary (1 primary, 0 extended, 3 free)
e extended (container for logical partitions)
Select (default p): - Nombre de partició (2-4, default 2):
First sector (2099200-31457279, default 2099200):
Last sector, +sectors or +size{K,M,G,T,P} (2099200-31457279, default 31457279):
Created a new partition 2 of type 'Linux' and of size 14 GiB.
Partition #2 contains a LVM2_member signature.
Do you want to remove the signature? [Y]es/[N]o: n
- Partition type
- t 8e: change partition type to "Linux LVM"
(if that was the original type)
- Nombre de partició (1,2, default 2):
Hex code (type L to list all codes): 8e
Changed type of partition 'Linux' to 'Linux LVM'.
- Nombre de partició (1,2, default 2):
- w: write to disk
partprobelsblk- example after resizing partition sda2 to
14GB
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 15G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 14G 0 part
├─almalinux-root 253:0 0 9,8G 0 lvm /
└─almalinux-swap 253:1 0 1,2G 0 lvm [SWAP]
sr0 11:0 1 1024M 0 rom
- example after resizing partition sda2 to
14GB
- (additional step when guest os is using LVM)
resize LVM:
sudo -i
pvresize /dev/sda2Physical volume "/dev/sda2" changed
1 physical volume(s) resized or updated / 0 physical volume(s) not resized
pvs- check for some value for PFree (last
column)
PV VG Fmt Attr PSize PFree
/dev/sda2 almalinux lvm2 a-- <14,00g 3,00g
- check for some value for PFree (last
column)
- lsblk
- before resizing lvm:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 15G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 14G 0 part
├─almalinux-root 253:0 0 9,8G 0 lvm /
└─almalinux-swap 253:1 0 1,2G 0 lvm [SWAP]
sr0 11:0 1 1024M 0 rom
- before resizing lvm:
df -hTS. fitxers Tipus Mida En ús Lliure %Ús Muntat a
devtmpfs devtmpfs 3,8G 0 3,8G 0% /dev
tmpfs tmpfs 3,8G 48K 3,8G 1% /dev/shm
tmpfs tmpfs 3,8G 8,6M 3,8G 1% /run
tmpfs tmpfs 3,8G 0 3,8G 0% /sys/fs/cgroup
/dev/mapper/almalinux-root xfs 9,8G 9,8G 33M 100% /
/dev/sda1 xfs 1014M 337M 678M 34% /boot
tmpfs tmpfs 777M 0 777M 0% /run/user/1969
lvextend -l+100%FREE /dev/mapper/almalinux-root
- lsblk
- after resizing lvm
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 15G 0 disk
├─sda1 8:1 0 1G 0 part /boot
└─sda2 8:2 0 14G 0 part
├─almalinux-root 253:0 0 12,8G 0 lvm /
└─almalinux-swap 253:1 0 1,2G 0 lvm [SWAP]
sr0 11:0 1 1024M 0 rom
- after resizing lvm
- resize filesystem
- ext2/3/4
resize2fs /dev/sda2- resize2fs /dev/mapper/almalinux-root
- resize2fs /dev/mapper/ubuntu--vg-ubuntu--lv
- xfs
sudo dnf install xfsprogssudo xfs_growfs -d /
- df -hT
- S.
fitxers
Tipus Mida En ús
Lliure %Ús Muntat a
devtmpfs devtmpfs 3,8G 0 3,8G 0% /dev
tmpfs tmpfs 3,8G 48K 3,8G 1% /dev/shm
tmpfs tmpfs 3,8G 8,6M 3,8G 1% /run
tmpfs tmpfs 3,8G 0 3,8G 0% /sys/fs/cgroup
/dev/mapper/almalinux-root xfs 13G 9,8G 3,1G 77% /
/dev/sda1 xfs 1014M 337M 678M 34% /boot
tmpfs tmpfs 777M 0 777M 0% /run/user/1969
- S.
fitxers
Tipus Mida En ús
Lliure %Ús Muntat a
- ext2/3/4
- Compact a vdi file
- How to compact VirtualBox's VDI file size?
- Passos / Steps
- Guest (virtual)
- one of the following:
dd if=/dev/zero of=/var/tmp/bigemptyfile bs=4096k ; rm /var/tmp/bigemptyfiletelinit 1
mount -o remount,ro /dev/sda1
zerofree -v /dev/sda1
- one of the following:
- Host (real)
VBoxManage modifymedium --compact /path/to/thedisk.vdi
- Guest (virtual)
- Increase disk size (e.g. from 10GiB to 15GiB, 15360MBytes)
- VBoxVmService (sf) (autostart VM in MS Windows)
- Extension pack
- Update
- Fitxer -> Comprova si hi ha actualitzacions
- Installing VirtualBox and extension packs
- Download
- from your browser, just click on file:
<your_installed_virtualbox_version>/Oracle_VM_VirtualBox_Extension_Pack....vbox-extpack - this will open VirtualBox and install it
- if you installed VirtualBox from system packages, a window asking the root password will be shown; check that the window is not hidden behind VirtualBox main and progress windows
- from your browser, just click on file:
- Content
- virtual USB 2.0 device
- VirtualBox Remote Desktop Protocol (VRDP)
- Intel PXE boot ROM
- PCI passthrough
- Update
- VirtualBox Remote Desktop Protocol (VRDP)
- USB
- Install extension pack
- Add
your user to group vboxusers:
# sudo usermod -a -G vboxusers user_name$ newgrp vboxusers
- start VirtualBox manager
- Activate the device in the VirtualBox instance
settings:
- Paràmetres / USB / add a filter
- a list with all available usb devices should appear
- select the wanted ones
- Paràmetres / USB / add a filter
- USB device can also be activated once the virtual
machine is running
- Devices / USB
- select the wanted ones
- Devices / USB
- Xarxa / Network
- Chapter 6: Virtual networking
-
visibility of guest from
visibility of internet from guest
guest IP address
host
other vm
internet
Not attached
-
-
-
-
-
NAT
-
-
port forwarding
x
vbox DHCP server - 10.0.2.x
- 10.0.3.x
- ...
Bridged
via ethX
(x)
x
x
same range that host
Internal
-
intnet
-
vbox DHCP server
Host-only
x
hostonly
-
-
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- 8.35
VBoxManage
dhcpserver
VBoxManage dhcpserver add --netname intnet --ip 192.168.1.1 --netmask 255.255.255.0 --lowerip 192.168.1.100 --upperip 192.168.1.200 --enableVBoxManage dhcpserver modify --netname intnet --disable- ~/.VirtualBox/VirtualBox.xml
<DHCPServer networkName="intnet" IPAddress="192.168.1.1" networkMask="255.255.255.0" lowerIP="192.168.1.100" upperIP="192.168.1.200" enabled="0"/>
- Xarxa / Network
- Muntatge d'un directori de la màquina amfitrió des de la
màquina virtual:
- Màquina amfitrió
- Dispositius -> Paràmetres de carpeta compartida
- Afegeix
- Camí cap a la carpeta:
- /home/usuari
- Nom de la carpeta:
- toto
- Camí cap a la carpeta:
- Afegeix
- Dispositius -> Paràmetres de carpeta compartida
- Màquina virtual (Linux)
sudo mkdir -p /mnt/tatasudo mount -t vboxsf toto /mnt/tata
- Màquina amfitrió
- Same config as an AWS EC2 CentOS instance
- on virtual machine
- on local machine
- install ssh
certificate to virtual machine:
ssh-copy-id -i ~/.ssh/id_rsa_remoteserver.pub centos@virtualserver
- connect to virtual machine:
ssh -i~/.ssh/id_rsa_remoteserver.pemcentos@virtualserver
- install ssh
certificate to virtual machine:
- Problemes / Problemes
- "VirtualBox can't operate in VMX root mode"
rmmod kvm_intel
- Lenta / Slow
- Solution for Slow Ubuntu in VirtualBox
- Solució / Solution
- Enable IO APIC
- Chipset: ICH9
- Problemes amb el ratolí / Mouse issues
No s'ha pogut obtenir l'objecte VirtualBoxClient COM.
L'aplicació es finalitzarà..
Subrutina RC:NS_ERROR_ABORT (0x80004004)- check with command line:
$ VBoxManage list vms
VBoxManage: error: Failed to create the VirtualBox object!
VBoxManage: error: Code NS_ERROR_ABORT (0x80004004) - Operation aborted (extended info not available)
VBoxManage: error: Most likely, the VirtualBox COM server is not running or failed to start.
- ~/.VirtualBox/VBoxSVC.log
00:00:00.137342 nspr-2 Failed to open "/dev/vboxdrvu", errno=13, rc=VERR_VM_DRIVER_NOT_ACCESSIBLE
00:00:00.144183 nspr-2 failed to create vboxnet0, error (0xffffffff)
00:00:00.150341 nspr-2 failed to create vboxnet1, error (0xffffffff)
00:00:00.158676 nspr-2 failed to create vboxnet2, error (0xffffffff)
00:00:00.164803 nspr-2 failed to create vboxnet3, error (0xffffffff)
00:00:00.172484 nspr-2 failed to create vboxnet4, error (0xffffffff)
00:00:00.179049 nspr-2 failed to create vboxnet5, error (0xffffffff)
- Solució / Solution
sudousermod -a -G vboxusers my_user- newgrp vboxusers
mv ~/.VirtualBox ~/.VirtualBox_old- update/reinstall Extension Pack
- you will need to add your VM again
- check with command line:
- "VirtualBox can't operate in VMX root mode"
- FAUMachine
11Contenidors / Containers#
- Contenidors
- Orquestradors
- Kubernetes
- ...
- Docker
- Instal·lació / Installation
- Docker Engine
- directori amb les imatges / directory with images
/var/cache/docker/
- Binaris
- Install Docker Engine from binaries
- Passos per a la instal·lació
wget https://download.docker.com/linux/static/stable/x86_64/docker-24.0.5.tgztar xvzf docker-24.0.5.tgz- sudo -i
- sudo cp docker/* /usr/local/bin
- Passos per a l'ús
sudo -i
- export PATH=$PATH:/usr/local/bin
- dockerd &
- Fedora
- setup repo
sudo dnf -y install dnf-plugins-coresudo dnf config-manager --add-repo https://download.docker.com/linux/fedora/docker-ce.repo
- install
sudo dnf install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
- setup repo
- Mageia
sudo urpmi docker- Problema
echo "FROM hello-world:latest" >toto.Dockerfile
docker build -f toto.Dockerfile -t toto ."fatal error: unexpected signal during runtime execution"- Solució:
- actualitzeu-vos a Mageia 9 (docker 20.10.22)
- instal·leu docker des de binari estàtic
- Problema
- sudo urpmi docker-compose (instal·leu el docker compose plugin)
- Debian (Raspberry
Pi)
sudo apt install docker.iosudo apt install docker-compose
- Use docker from non-root user:
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
- directori amb les imatges / directory with images
- Docker Desktop (Linux)
- ...
- Docker Engine
- Server
-
description start use
docker context lsDocker Engine unix service sudo systemctl start dockerdocker context use defaultDocker Desktop - runs on a VM
- commercial license for big companies
... docker context use desktop-linuxAquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
What is the difference between Docker Desktop for Linux and Docker Engine- Plugins (/usr/local/lib/docker/cli-plugins)
- Config
-
daemon.json key info needed by
userns-remapIsolate containers with a user namespace ...
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
-
- Docs
- Docker
overview
- docker objects:
- images: read-only template with instructions for creating a Docker container. Defined by a dockerfile
- containers: runnable instance of an image
- networks
- volumes
docker volume ls- si no s'especifica el camí absolut d'un
volum (per exemple a docker-compose.yaml),
es crearà a
/var/cache/docker/volumes/<vol_name>/_datai no serà visible amb un ls dels fitxers del diretori on ens trobem; Caldrà anar-lo a buscar a /var/cache/docker/volumes/ - si s'especifica un camí absolut d'un fitxer com a volum (./local.txt:/tmp/local.txt) haurà de tenir l'uid/gid (1000:1000 són els valors per defecte, per exemple opensearch:opensearch) que volem que tingui dins del contenidor:
sudo chmod 1000:1000 ./local.txt- uid, gid
- see userns-remap
- Networking
overview
- Use
bridge networks
-
create configure details connect/disconnect containers communication between containers remove default - daemon.json docker network inspect bridge- - by ip address
(given bydocker network inspect bridge) - (deprecated) --link
user-defined docker network create [--driver bridge] [options] <network_name>Specify advanced options:
- ...
docker network inspect <network_name>- at container creation:
docker create/run --network <network_name>
- after container creation:
- docker network connect <network_name> <container_name>
- docker network disconnect <network_name> <container_name>
- DNS name
docker network rm <network_name>Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- by ip address
-
- Understanding Docker Networking Drivers and their use cases
- Networking tutorials
- Use
bridge networks
- Monitor tools
- Docker
Desktop
- Docker Dashboard
- Docker
Desktop
- Overview
of Docker Compose
- diferències
entre
docker composeidocker build
docker-compose- docker compose v2:
can be used as plugin (
docker compose) instead of standalone (docker-compose)- Install
- Install the Compose plugin
- des de paquet / from package
- Ubuntu 26.04
- des de repo Ubuntu
apt-get install docker-compose-v2- des de repo Docker
- repo Docker
sudo apt update
sudo apt install ca-certificates curl gnupgsudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.ascecho \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null- plugin
apt install docker-compose-plugin- Passos per a instal·lar des del codi
font / Steps to install from source
code
sudo -imkdir -p /usr/local/lib/docker/cli-pluginsdocker_compose_plugin_version=v5.0.2
curl -SL https://github.com/docker/compose/releases/download/${docker_compose_plugin_version}/docker-compose-linux-x86_64 -o /usr/local/lib/docker/cli-plugins/docker-composechmod +x /usr/local/lib/docker/cli-plugins/docker-compose
- Test
docker compose version- Docker Compose version v5.0.2
- exemple
- exemple simple (tty: true fa que no es tanqui de seguida):
- docker-compose.yaml
name: servei
services:
server1:
image: alpine:latest
# do not stop container:
tty: truedocker compose upcontainer_id=$(docker container ls -a --format '{{.ID}} {{.Names}}' | awk '$2 ~ /^servei/ {print $1}')
docker exec -it ${container_id} sh
- Install
- diferències
entre
- docker objects:
- Diferències entre
docker buildidocker compose:
descripció manual reference exemple ús Docker build defineix en un fitxer (Dockerfile):
com s'ha de crear (build) una imatge.
Normalment parteix d'una image estàndard (FROM) i li afegeix configuració específicaPackaging your software Dockerfile reference Dockerfile
# syntax=docker/dockerfile:1
FROM ubuntu:22.04
# install app dependencies
RUN apt-get update && apt-get install -y python3 python3-pip
RUN pip install flask==2.1.*
# install app
COPY hello.py /
# final configuration
ENV FLASK_APP=hello
EXPOSE 8000
CMD flask run --host 0.0.0.0 --port 8000# syntax=docker/dockerfile:1
FROM python:3.7-alpine
# install app dependencies
RUN apk add --no-cache gcc musl-dev linux-headers
WORKDIR /code
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
# install app
COPY . .
# final configuration
EXPOSE 5000
ENV FLASK_APP=app.py
ENV FLASK_RUN_HOST=0.0.0.0
CMD ["flask", "run"]
docker build [-f Dockerfile] ...Docker compose defineix en un fitxer (docker-compose.yml):
diversos elements i s'aixecaran diversos contenidors relacionats.
Indica la imatge de partida, que pot ser una de nostra creada amb docker build.
Es poden indicar mapatges (<in_host>:<in_container>) de directoris, ports i xarxes.Docker Compose overview Compose file reference docker-compose.yml
services:
web:
build: .
ports:
- "8000:5000"
volumes:
- .:/code
environment:
FLASK_DEBUG: "true"
redis:
image: "redis:alpine"
docker compose ...Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- Registre d'imatges /
Registry for images
- Official
- Private/public registry on AWS
- ECR: Amazon Elastic Container Registry
- Push images to registry
- "View push commands"
aws ecr get-login-password --region eu-west-1 | docker login --username AWS --password-stdin <id>.dkr.ecr.<region>.amazonaws.com
<id>.dkr.ecr.<region>.amazonaws.com
- "View push commands"
- CLI
-
docker
docker-compose
docker compose
command CLI options examples command docker-compose.yml
(Compose file reference)
informació sobre docker / information about docker:
Docker Root Dir: /var/cache/docker- on es desen les imatges / where
images are stored
- on es desen les imatges / where
images are stored
- ...
docker info
imatges construcció d'una imatge a partir del Dockerfile /
build an image from the Dockerfile
docker build[-f Dockerfile]
-t image_name:x.y.z .
etiquetació / tag
(no augmenta l'espai ocupat; només afegeix una referència a la llista)
docker tagsrc_image_name:x.y.z dst_image_name:a.b.c
etiquetació prèvia a la pujada (push) cap al registre remot
docker tagimage_name:x.y.z <remote_registry>/image_name:x.y.z
image_name:x.y.z <remote_registry>/image_name:latest
pujada d'una imatge cap al registre / upload an image to a registry
docker push<remote_repo>/image_name:x.y.z<remote_repo>/image_name:latest
llista de les imatges d'un registre remot
(Three Ways to Check a Docker Image Exists In Registry)
baixada d'una imatge des del repositori /
download an image from a registry (default: Docker Hub)
docker pull<image_name>
llista de les imatges baixades / list of downloaded images
docker imagesdocker image ls
inspecció d'una imatge o contenidor / inspect an image or container
docker inspect--format=... <image_name>- --format='{{json .HostConfig.RestartPolicy}}' <image_name>
canviar la configuració
docker update--restart unless-stopped <container_id>
esborrar una imatge (neteja) / delete an image
docker image rm <image_name>:<tag>(si no s'especifica:<tag>, posarà:latest)- docker image rm <image_id>
contenidors creació d'un contenidor / create a container
docker create
inspecció d'un contenidor / inspection of a container
docker inspect- IP address:
-f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' <container_id>
creació d'un contenidor a partir d'una imatge i execució d'una ordre /
create a container from an image and execute a command
(run = pull + create + exec)
dockerrun
docker run hello-world- docker run -it alpine sh
- docker run -it bash bash
- docker run -it ubuntu bash
- docker
run -it --rm -d -p 8080:80 --name web
nginx
- http://localhost:8080/
docker-compose up
docker compose up
(by default it will use docker-compose.yml)
image name
<image_name>
image: <image_name>command
<command> <command_options>
ephemeral container
--rm
detach (background)
-d
using a specific user
--user <user_id>:<group_id>
container name
--name <container_name>
container_name: <container_name>environment variables
-e VAR1=value1
-e VAR2=value2
-e ...-e HOST_PROC=/host/proc
environment:
- VAR1=value1
- VAR2=value2
- ...ports
-p/--publish <port_in_host>:<port_in_container>
-p ...
ports:
- "<port_in_host>:<port_in_container>"volumes
-v <dir_in_host>:<dir_in_container>-v <dir_in_host>:<dir_in_container>:ro
-v ...
volumes:
- <dir_in_host>:<dir_in_container>
- ...working dir
-w <dir_in_container>
network
--network <network_name>
image name
<image_name>
image: <image_name>command
<command> <command_options>
detalls d'un contenidor / details of a container
docker-compose run <service_name> env
execució (interactiva + tty) d'una ordre en un contenidor existent /
execute (interactively + tty) a command in an existing container
docker exec-it
<container_name> <command> <command_options>docker exec -it my_container bash
inici d'un contenidor existent / start an existing container
docker start<container_name|container_id>
llista de contenidors existents / list of existing containers
docker ps -adocker container ls -a
docker-compose ps
traces des d'un contenidor / logs from a container
docker container logs(/var/run/docker/containerd/<container_id>/)
docker logs
-f--since 10m
<container_name|container_id>
processos dins del contenidor / porcesses inside the container
docker top<container_name>
<container_name> aux
reinici d'un contenidor / restart a container
docker restart<container_name|container_id>
connexió amb el contenidor / connect to container
docker attach<container_name>
desconnexió del contenidor / disconnect from container
CTRL+p CTRL+q
aturada d'un contenidor / stop a container
docker stop<container_name|container_id>
docker-compose down
supressió d'un contenidor / remove a container
docker rm<container_name|container_id>
xarxa xarxa / network list docker networkls
detalls / details
inspect bridge|<network_name>
create
create<network_name>
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- Problemes / Problems
- (when docker build)
DEPRECATED: The legacy builder is deprecated and will be removed in a future release.
Install the buildx component to build images with BuildKit:
https://docs.docker.com/go/buildx/- Solució / Solution
- si no troba el plugin docker-buildx
farà servir el builder antic, que no és
BuildKit, encara que es tingui una
versió > 23 de docker
- install buildx
- download
bin, as plugin:
sudo -imkdir -p /usr/local/lib/docker/cli-plugins
cd /usr/local/lib/docker/cli-pluginswget https://github.com/docker/buildx/releases/download/v0.25.0/buildx-v0.25.0.linux-amd64chmod +x buildx-v0.25.0.linux-amd64ln -s buildx-v0.25.0.linux-amd64docker-buildx
- Mageia
- install it from bin
- Fedora
- ...
- ...
- download
bin, as plugin:
- si no troba el plugin docker-buildx
farà servir el builder antic, que no és
BuildKit, encara que es tingui una
versió > 23 de docker
- Solució / Solution
- (when docker build)
the --chmod option requires BuildKit. Refer to https://docs.docker.com/go/buildkit/ to learn how to build images with BuildKit enabled- BuildKit
- temporary solution:
DOCKER_BUILDKIT=1 docker build ...
- permanent solution:
- /etc/docker/daemon.json
{
"features": {
"buildkit": true
}
}
- sudo systemctl resart docker
- /etc/docker/daemon.json
- temporary solution:
- BuildKit
fatal error: unexpected signal during runtime execution- apareix quan es fa un
docker build, però si es prova moltes vegades, potser acaba funcionant - SIGSEGV when running the peer
- Hyperledger Fabric Deployment on Alibaba Cloud Environment – SIGSEGV Problem Analysis and Solutions
- apareix quan es fa un
- (when docker build)
- Neteja / Clean-up
- kill running containers
docker kill $(docker ps -aq)
- delete containers
docker rm $(docker ps -aq)
- delete downloaded images
docker rmi $(docker images -q)
- delete volumes and other resources
docker system prune -af --volumesdocker system prune
- kill running containers
-
- ...
- Docker
overview
- Problemes / Problems
failed to solve: write /var/cache/docker/...: no space left on device- ...
ERROR: Service 'xxx' failed to build: COPY failed: file not found in build context or excluded by .dockerignore: stat yyyyyy: file does not exist- this happens because yyyyyy is a symbolic link
- Exemples / Examples
- MQTT projects on Raspberry Pi
docker run hello-world- docker run -it alpine sh
- docker run -it bash bash
- docker run -it ubuntu bash
- Instal·lació / Installation
- Kubernetes
- Info
- Kubernetes
- Tutorials
- Learn
Kubernetes basics
- Create a Kubernetes cluster
- Deploy an app
- Explore your app
- Expose your app publicly
- Scale up your app
- Update your app
- ...
- Learn
Kubernetes basics
- Tutorials
- Kubernetes (wp)
- Vídeos
- Conceptes
- nodes:
- master node: el més
important; conté el control plane
- en producció n'hi ha d'haver com a mínin dos
- api server: accedit per ui, api, cli (kubectl)
- se li passen les configuracions
(declaratives, en yaml
o json) dels components que es volen
crear
- parts:
apiVersionkind:- quin tipus de component volem crear
metadata:spec:- especificacions desitjades
- són específics de cada
kind
status:- afegit per kubernetes
- emmagatzemat a etcd
- parts:
- un fitxer de configuració normalment
conté només la informació del component
que es vol crear; en el cas d'un
kind: Deploymenti el seu associatkind: Service, es posen en el mateix fitxer, separats per--- - a cada component se li pot aplicar una label (key/value)
- se sap que un pod pertany a un
deplyomnet perquè al deployment
s'especifiquen
selector: matchLabels
- se li passen les configuracions
(declaratives, en yaml
o json) dels components que es volen
crear
- worker nodes: contenen els pods de les aplicacions
- master node: el més
important; conté el control plane
- dins d'un pod habitualment hi ha només un contenidor
- un service
fa que una adreça ip d'una aplicació sigui la
mateixa, encara que sigui un altre pod (que tindrà
una adreça ip diferent); també actua com a
balancejador de càrrega
- al service, el selector diu com identificar
els pods que té al darrere; al pod s'haurà
especifat
selector: matchLabels - accés extern a:
ports:port-> en el pod:ports:targetPort - per a definir un
kind: Serviceaccessible des de l'exterior:type: NodePort
ports:
- nodePort:- o bé: type: LoadBalancer
- al service, el selector diu com identificar
els pods que té al darrere; al pod s'haurà
especifat
- un ingress exposa un conjunt de serveis de cara a l'exterior
- ConfigMap:
configuració externa de l'aplicació (p.ex.
DB_URL=mongo_db_service)
- secret:
com un configmap, però per a valors que no volem
emmagatzemar en clar, com credencials
- s'han de posar en base64
- cal un mecanisme extern per a xifrar-los, i es fan servir regles RBAC per a restringir-ne l'accés
- secret:
com un configmap, però per a valors que no volem
emmagatzemar en clar, com credencials
- volum: emmagatzematge, local o remot, associat a un pod
- desplegaments
- deployments: com un plànol per a crear pods; es pot especificar quantes rèpliques (pods) es volen d'una aplicació
- statefulset: les bases de dades, però, no es poden replicar fàcilment amb un deployment; cal un sts (statefulset); però el més fàcil és posar la base de dades fora del cluster de kubernetes
- nodes:
- Estructura / Structure
- Control Plane
- Workers (nodes) (production: minimum
3 nodes)
- Worker node #1. Components:
- kubelet: agent for managing the node and communicating with the control plane
- kube-proxy
- container runtime
- pods
- pod #1
- container #1
- container #2
- ...
- pod #2
- container #1
- ...
- pod #1
- Worker node #2
- ...
- Worker node #1. Components:
- Kubernetes
- Desplegament / Deployment
- Turnkey cloud solutions (k8s)
- Minikube
- local Kubernetes
- un sol node: master i worker
- Ús / Usage
minikube startminikube status- General-purpose web UI for Kubernetes clusters
- minikube addons enable metrics-server
minikube dashboard
- local Kubernetes
- k3s
- Google ...
- AWS EKS
- Amazon ECS vs Amazon EKS: making sense of AWS container services
- EKS: Elastic Kubernetes Service
- Access
- ECS
- Autoscaling
- CLI management
- Gestió / Management
- logs
- kubectl
- AWS
kubectl
curl -o kubectl https://s3.us-west-2.amazonaws.com/amazon-eks/1.23.7/2022-06-29/bin/linux/amd64/kubectl
- Ús / Usage
-
kubectl
exemples / examples action resource
api-versions
configget-contextsuse-context <context>- delete-context <context>
view(~/.kube/config)
createdeployment <name> --image=<image>
getall
...deploymentseventspods / po- services / svc
- ing
- TargetGroupBinding
- hpa
deploymentsrssecretconfigmap
# get a complete list of supported resources
kubectl api-resources
kubectl get pods -o go-template --template '{{range .items}}{{.metadata.name}}{{"\n"}}{{end}}'
describe<component_type> <component_instance>
kubectl describe node <my_node>- Allocataed resources
kubectl describe pod <my_pod>- Events
expose
proxy
logs<pod_instace>
topnodespods
- requisits
kubectl top nodeskubectl --namespace mynamespace top pods- errors:
- error: You must be logged in to the server (Unauthorized)
- Solució
run
kubectl --namespace=mynamespace run --image=appsoa/docker-alpine-nmap --rm -i -t nm -- -Pn -p8000 192.168.1.2
apply -f ...kind: Service
kind: Deployment
...
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- options:
-o wide
- create a namespace:
kubectl create namespace <mynamespace>
- create deployment, service, ingress:
kubectl apply -f my-deployment.yml- my-deployment.yml
- metadata
name: ...
namespace: mynamespace
- metadata
- my-deployment.yml
- kubectl apply -f my-service.yml
- kubectl apply -f my-ingress.yml
- get all (system):
kubectl get all -n kube-system
- get namespaces
kubectl get namespaces
- get all:
kubectl get all --namespace <mynamespace>
- get ingress:
kubectl get ing -n<mynamespace>
- get pods:
kubectl get pods -n<mynamespace>
- run interactive command shell on a pod:
-
kubectl --namespace mynamespace exec -it <pod_name> -- /bin/sh
-
-
- Problemes / Problems
ContainerCreating- Debug to see the cause
kubectl describe pods <pod_name>
- Debug to see the cause
- ...
- AWS
kubectl
- helm
- Info
- "the package manager for Kubernetes"
- vídeos
- agrupa un conjunt de fitxers yaml de configuració de kubernetes, per a afegir un conjunt de components
- permet plantilles, que agafen els valors del
fitxer values.yaml o bé amb
--set - estructura de directoris
mychart/Chart.yaml(metainformació del chart)values.yaml(valors que es faran servir des de les plantilles)charts/(dependències)templates/(fitxers amb les plantilles)...
- release manager
- manté l'historial
- accions
helm install ...helm upgrade ...hel rollback ...
- Installing
Helm
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3- chmod +x get_helm.sh
- ./get_helm.sh
- search charts in "ArtifactHub":
helm search hub- helm search hub <wanted_chart>
- add a repo:
helm repo add brigade https://brigadecore.github.io/charts
- search charts in repositories added to you local
client (with
helm repo add)helm search repohelm search repo <partial_name_of_wanted_chart>
- install a chart with an arbitrary name:
helm install <my_release_name> <chart_to_be_installed>- fitxer de valors que complementa i sobreescriu
els valors definits a values.yaml:
- helm install --values=my-values.yaml <chart_name>
- verify the status of a release:
helm status <my_release_name>
- show default values for a chart
helm show values <chart>
- show values that have been --set for a given
release:
helm get values <my_release_name>
- release history
helm history <my_release_name>
- Problemes / Problems
- no listener for https in load balancer; no ip
attached to target groups
- EKS Nodes not Registering in Target Group using ALB Ingress Controller
- Debug
- verify logs of pod
aws-load-balancer-controller
{"level":"error",...,"msg":"Reconciler error",...,"error":"CertificateNotFound: Certificate 'arn:aws:acm: ...}
- from AWS web console, try to attach
certificate to the listener
- cannot find certificate ...
- verify logs of pod
aws-load-balancer-controller
- Solució / Solution
- use an "RSA 2048" certificate instead of a "ECDSA P 256" one
- no listener for https in load balancer; no ip
attached to target groups
- Creating Your Own Charts
- List repos
helm repo list
- Add a repo
helm repo add dev https://example.com/dev-charts
- Update all repos:
helm repo update
- Update a repo
helm repo update <repo_name>
- Remove a repo
helm repo remove
- ...
- Info
- kubetail
kubetail my_app --namespace mynamespacekubetail --namespace mynamespace my_app
- k9s
- derailed/k9s
- Instal·lació / Installation
- Homebrew
brew install derailed/k9s/k9s
- Docker:
- ...
- Homebrew
- Ús
:contexts:pods0(all)ctrl-w(see cpu and memory usage; metrics server must be installed)d(describe)G(vés al final)
:deploy- s (scale)
:hpa(Horizontal Pod Autoscaling):configmap- :secret
- :replicaset
- :helm
/<text_to_find>n: nextN: previous
- sort by column:
- NAMESPACE:
shift + P - NAME:
shift + N - NODE:
shift + O - CPU: shift + C
- ...
- NAMESPACE:
- Problemes
The config profile (xxxx) could not be found- Solution
- search for xxxx in ~/.kube/config
- Solution
- Lens
- commercial plans
- ...
- Problemes / Problems
- pod state: CrashLoopBackOff
- Monitor
- Autoescalat / Autoscaling
-
pod node
vertical autoscaler:
increase/decrease resources (CPU, memory)horizontal autoscaler:
add/remove podshorizontal autoscaler:
add/remove nodeskubernetes
Horizontal Pod Autoscaling Kubernetes Autoscaler
EKS Vertical Pod Autoscaler Horizontal Pod Autoscaler Cluster Autoscaling
- Karpenter
- Cluster Autoscaler
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- Provisionament
- pods
- k9s:
:events- pod: describe
0/[n] nodes available: insufficient [resource]- 0/1 nodes available: insufficient cpu, insufficient memory
kubectl describe nodes- Allocatable
- Allocated resources
- eks-node-viewer --resources cpu,memory
- k9s:
- pods
- Pods
- Horizontal Pod Autoscaling (HPA)
- Requisits / Requirements
- Metrics server
- recursos (cpu, memòria) necessaris especificats:
- kubectl
kubectl get hpa --all-namespaceskubectl --namespace=<my_namespace> get hpa <my_name> --watch
- k9s
:hpa
- Problemes / Problems
<unknown>/80%- Solució / Solution
- Check
your HPA and application resource
requests for unknown metrics
kubectl describe hpa -n <namespace> 2048-deployment- if you get "
Warning FailedGetResourceMetric ... horizontal-pod-autoscaler failed to get cpu utilization: missing request for cpu in container xxx of Pod xxx", verify that you specified resource (CPU, MEM) requests (R) and limits (L):
- if you get "
- Check
your HPA and application resource
requests for unknown metrics
- Solució / Solution
Error: unable to build kubernetes objects from release manifest: [resource mapping not found for name: "xxxx" namespace: "" from "": no matches for kind "HorizontalPodAutoscaler" in version "autoscaling/v2beta1"
- Requisits / Requirements
- Kubernetes Max PODS per Node calculator - AWS EKS | Devops Junction
- Horizontal Pod Autoscaling (HPA)
- Nodes
- EKS Autoscaling
- Karpenter
- Karpenter vs Kubernetes Cluster Autoscaler (yt)
- ALB and security groups
- spec.securityGroupSelectorTerms
- Modify all SecurityGroups tagged with kubernetes.io/cluster/$name (old?)
- Solució / Solution
...
kind: EC2NodeClass
...
securityGroupSelectorTerms:
- tags:
karpenter.sh/discovery: "${CLUSTER_NAME}" # replace with your cluster name
- tags:
Name: "*eks-cluster-sg-${CLUSTER_NAME}*"
- Prometheus
- kubectl: list node with karpenter nodepool or provisioner name
- Limit the number of nodes or rearrange the
pods so as less nodes are used
- Disruption
| Karpenter
- Manual methods
- Node deletion
# get all nodeclaims
kubectl get nodeclaims# get all nodes owned by any nodepool
kubectl get nodes -l karpenter.sh/nodepool
# Delete all nodeclaims owned by a specific nodepoolXS
kubectl delete nodeclaims -l karpenter.sh/nodepool=$NODEPOOL_NAME
- NodePool deletion
# get all nodepools
kubectl get nodepools- ...
- Node deletion
- Automatic methods (events ->
Reason: Unconsolidatable, Message: ...)
kind: NodePool
spec.disruption...default value 1. Expiration expireAfter720h2. Drift
3. Consolidation
- deletion
- replace
consolidationPolicyWhenUnderutilized
consolidateAfter
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- Manual methods
- Optimizing your Kubernetes compute costs with Karpenter consolidation
- Karpenter workload consolidation/defragmentation #1091
- Question: How to limit the max size of a cluster? #1104
- Limit number of nodes that can be scheduled simultanioulsly #1077
- ...
- Disruption
| Karpenter
-
- Diagrames
- Application
- Deployment
- Service
- Namespace
- ...
- Info
- ...
12Cloud Computing (external virtualisation)#
| Service
model |
Recursos oferts / Offered resources |
L'usuari hi instal·la / User can install |
Implementació / Implementation |
Exemples / Examples | ||
|---|---|---|---|---|---|---|
| Amazon AWS | other | |||||
| Software
as a Service (SaaS) |
Aplicació / Application |
- |
|
|
|
|
| Platform as a Service (PaaS) | Sistema Operatiu / Operating
system |
aplicacions / applications |
|
|
|
|
| Infrastructure as a Service (IaaS) | CPU + Emmagatzematge + Xarxa
/ CPU + Storage + Network |
sistema operatiu / operating
system |
|
|
|
|
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
| OpenStack |
AWS |
|||
|---|---|---|---|---|
| Dashboard | Horizon | Console | ||
| Compute |
Compute |
Nova |
EC2 (Elastic Compute Cloud) |
|
| Lambda |
A compute service that runs
your code in response to events and automatically manages
the compute resources for you. |
|||
| Block storage | Cinder | ELB (Elastic Block Store) |
||
| Image service | Glance | AMI | ||
| Bare metal provisioning | Ironic | |||
| Storage
and
content delivery |
Object storage |
Swift |
S3 (Simple Storage Service) |
|
| Glacier |
A low-cost storage service
that provides secure and durable storage for data archiving
and backup. |
|||
| Cloud Front |
Provides a way to distribute
content to end users with low latency and high data transfer
speeds. |
|||
| Storage Gateway |
||||
| Database | SQL | Trove | RDS (Relational Database
Service) |
|
| Elastic Cache |
||||
| Redshift |
||||
| NoSQL |
DyanamoDB |
A scalable NoSQL data store
that manages distributed replicas of your data for high
availability. |
||
| Networking |
Networking |
Neutron |
VPC (Virtual Private Cloud) |
|
| Direct Connect |
||||
| DNS |
Route53 | A scalable and highly
available Domain Name System (DNS) and Domain Name
Registration service. |
||
| Administration
and
security |
Identity service |
Keystone |
Directory Service |
|
| Trusted Advisor |
||||
| Config |
||||
| IAM (Identity and Access
Management) |
Lets you securely control
access to AWS services and resources. |
|||
| CloudTrail |
Provides increased visibility
into user activity by recording API calls made on your
account. |
|||
| CloudWatch |
Provides monitoring for
resources and applications. |
|||
| Analytics | Elastic map reduce | Sahara | EMR (Elastic Map Reduce) |
Lets you perform big data
tasks such as web indexing, data mining, and log file
analysis. |
| Kinesis |
A managed service that scales
elastically for real-time processing of streaming big data. |
|||
| Orchestration | Heat | Data Pipeline |
A lightweight orchestration
service for periodic, data-driven workflows. |
|
| Application services | Multiple tenant cloud messaging | Zaqar | SQS (Simple Queue Service) |
|
| AppStream |
||||
| SES (Simple Email Service) |
||||
| SWF (Simple WorkFlow) |
Coordinates all of the
processing steps within an application. |
|||
| Elastic Transcoder |
Lets you convert your media
files in the cloud easily, at low cost, and at scale. |
|||
| CloudSearch |
||||
| Deployment and management | Elastic Beanstalk |
An application container for
deploying and managing applications. |
||
| CloudFormation |
Lets you create and update a
collection of related AWS resources in a predictable
fashion. |
|||
| CodeDeploy |
Lets you fully automate code
deployments. |
|||
| OpsWorks |
A DevOps platform for
managing applications of any scale or complexity on the AWS
cloud. |
|||
| Mobile services | Cognito |
A simple user identity and
data synchronization service that helps you securely manage
and synchronize app data for your users across their mobile
devices. |
||
| Mobile Analytics |
||||
| SNS (Simple Notification
Service) |
Lets you publish messages to
subscribers or other applications. |
|||
| Enterprise applications | WorkSpaces |
|||
| WorkDocs |
||||
| WorkMail |
||||
| Telemetry |
Ceilometer |
Billing |
||
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
OpenStack vs AWS:
| OpenStack | AWS | |||
|---|---|---|---|---|
| Project |
Products
and services |
|||
| Dashboard | Horizon |
|||
| Compute |
Nova |
EC2 (Elastic Compute Cloud) | Compute |
|
| EC2 Container Service |
||||
| AWS Lambda |
||||
| Auto-scaling |
||||
| Amazon VPC |
||||
| Elastic Load Balancing |
||||
| Bare Metal Provisioning |
Ironic |
|||
| Storage |
Object storage |
Swift |
Amazon S3 | Storage and content delivery |
| Amazon Glacier |
||||
| Block Storage |
Cinder |
Amazon EBS |
||
| Shared Filesystems |
Manila |
Amazon EFS |
||
| AWS Import/Export |
||||
| AWS Storage Gateway |
||||
| Amazon CloudFront |
||||
| Networking |
Neutron |
Amazon VPC |
Networking |
|
| Direct Connect |
||||
| DNS |
Designate |
Route53 |
||
| Neutron/LBaaS |
Elastic Load Balancing | |||
| Shared
services |
Identity service | Keystone |
AWS Identity and Access
Management (IAM) |
Administration
and
security |
| AWS Directory Service | ||||
| AWS CloudTrail |
||||
| AWS Config |
||||
| AWS CloudHSM |
||||
| Key management |
Barbican |
AWS Key Management Service |
||
| Telemetry service | Ceilometer | Amazon CloudWatch |
||
| AWS Truster Advisor |
||||
| Image service | Glance |
AMI |
||
| Orchestration service | AWS Elastic Beanstalk |
Deployment
&
Management |
||
| AWS OpsWorks |
||||
| Heat |
AWS CloudFormation |
|||
| Heat/AutoScaling |
||||
| TripleO
(OpenStack on OpenStack) |
||||
| AWS CodeDeploy |
||||
| Database service | Trove
|
Amazon RDS |
Database |
|
| DynamoDB |
||||
| Aurora
(*) |
||||
| Redshift |
||||
| ElastiCache |
||||
| Data processing |
Sahara
(Hadoop) |
Amazon Elastic MapReduce
(EMR) |
Analytics |
|
| Amazon Kinesis |
||||
| Amazon Redshift |
||||
| AWS Data Pipeline |
||||
| Message service |
Zaqar |
Amazon SQS (Simple Queue
Service) |
Application Services | |
| Amazon SWF (Simple Workflow
Service) |
||||
| Amazon AppStream |
||||
| Amazon Elastic Transcoder |
||||
| Amazon SES (Simple Email
Service) |
||||
| Amazon CloudSearch |
||||
| Amazon SNS (Simple
Notification Service) |
||||
| Amazon FPS (Flexible Payment
Service) |
||||
| Amazon Cognito |
Mobile
Services |
|||
| Amazon Mobile Analytics |
||||
| Amazon SNS (Simple
Notification Service) |
||||
| Amazon WorkSpaces |
Enterprise
Applications |
|||
| Amazon WorkDocs |
||||
| AWS Support |
AWS
Support |
|||
| AWS Trusted Advisor |
||||
| Marketplace |
AWS Marketplace |
|||
| Alexa Web Information Service |
Additional Services |
|||
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- Cloud computing comparison (wp)
- Cloud Landscape (Open Crowd)
- Cloud Computing y Software de Fuentes Abiertas. Dossier ONSFA (Cenatic) (gràfic)
- Tyranny of Choice in the Cloud
- Maquinari / Hardware
- The orange box (Canonical)
- Programari / Software
- libsaas
- Cloud Management Platform (CMP)
(management of heterogeneous clouds) (OpenStack
Hybrid
examples)
- Deployment Manifesto -- thoughts?
- Many Clouds, One API
-
access
supported
services
owner
language
source
API
CLI
GUI
clouds
compute
storage
load balancers
info
library
libcloud
Apache
Python
DeltaCloud Apache Ruby
- Deltacloud frontend (classic)
- DMTF CIMI frontend (wp)
- EC2
curl
Drivers
jClouds Apache Java
Providers
JumpGate
ManageIQ RedHat
Ruby ManageIQ/manageiq
x
Top tasks
service
CloudForms RedHat
- based on acquired ManageIQ
- AWS – Elastic Load Balancers and Cloudforms
Scalr
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- libcloud
- Getting started (official libcloud tutorial from OpenStack)
- Example (test_images.py)
from libcloud.compute.types import Provider
from libcloud.compute.providers import get_driver
import libcloud.security
from pprint import pprint
libcloud.security.VERIFY_SSL_CERT = False
openstack = get_driver(Provider.OPENSTACK)
driver = openstack('my_user', 'my_password', ex_tenant_name='my_tenant_name', ex_force_auth_url='http://my_openstack_server:5000/v2.0/tokens', ex_force_auth_version='2.0_password')
images = driver.list_images()
pprint( images )
- Autoscaling
- as-libcloud (fork)
- Problemes / Problems
socket.gaierror: [Errno -2] Name or service not known- Solució / Solution:
- check that server name (given by the
response of the server, and tried by
curl to make the second connection) is
complete:
LIBCLOUD_DEBUG=/dev/stderr python test_images.py...
# -------- end 45155728:45171272 response ----------
# -------- begin 45196176 request ----------
curl -i -X GET -H 'Host: mynode:8774' ...
- if it is not complete, add it to
/etc/hosts
mynode mynode.mydomain.org
- check that server name (given by the
response of the server, and tried by
curl to make the second connection) is
complete:
- Solució / Solution:
- Troubleshooting
- Debugging
LIBCLOUD_DEBUG=/dev/stderr python my_script.py
- Debugging
- DeltaCloud
- Updated Openstack v2 API driver in Deltacloud
- Installation
- requirements
- CentOS
sudo yum install ruby ruby-devel gcc-c++ libxml libxml2-devel libxslt libxslt-devel sqlite sqlite-devel patchsudo gem install rake
- CentOS
sudo gem install deltacloud-core
- requirements
-
server
client
OpenStack
deltacloudd -i openstack -p 3001 -P http://openstack_keystone_server:35357/v2.0 -r <deltacloud_server_ip_address>curl -X GET --user "<username>+<tenant_name>:<password>" -H "Accept: application/json"http://<deltacloud_server_ip_address>:3001/api/instances | python -m json.toolAWS
deltacloudd -i ec2 -p 3002 -r<deltacloud_server_ip_address>curl -X GET --user "<Access_key_ID>:<Secret_access_key>" -H "Accept: application/json" -H "X-Deltacloud-Provider:eu-west-1" http://<deltacloud_server_ip_address>:3002/api/instances | python -m json.toolAquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- Run
deltacloudd --verbose --log toto.log -i ec2 -p 3001 -r 172.30.0.45
- Access
curl -X GET --user "<Access_key_ID>:<Secret_access_key>" -H "Accept: application/json" -H "X-Deltacloud-Provider:eu-west-1" http://my_deltacloud_server:3001/api/instances | python -m json.tool
- Cloud computing comparison (wp)
- Abi Cloud
- Enomalism
- Eucalyptus (inspired by Amazon EC2)
- Nimbus Globus toolkit
- Open Nebula
- Hadoop
- Storm (Hadoop for realtime)
- OpenStack
- Tasques / Tasks
- Celery
(Python)
- Flower (web gui) (github)
- Celery with Django
- Celery
(Python)
- Event logging
- Analítica i monitoratge / Analytics and monitoring
- Serveis / Services
- Amazon
Web Services AWS
- AWS Command Line Interface
- EC2
instances
- S3
- CloudFront
- Route53
- Big data and analytics
- Amazon
Web Services AWS
13Parcs d'ordinadors / Clusters#
- Gestió de parcs d'ordinadors / Cluster management
- Systems management / IT Management (wp)
14Seguretat / Security#
- Criptografia / Cryptography
- Segureta a WWW/Internet / Security in WWW/Internet
- Programari / Software
- Programari de seguretat / Security software
- Programari de criptografia / Cryptography software
- Seguretat en Linux / Security in Linux
- Signatura de PDF / PDF signature
- Maquinari / Hardware
- Smart cards
- TPM - Trusted Platform Module (wp)
- VIA PadLock Security Initiative
- USB Smart Tokens and Smart Cards
- Info
- Estàndards / Standards
- Tipus de seguretat
- seguretat de la informació: tot tipus d'informació
- ciberseguretat: informació digital i sistemes tecnològics
- Dimensions de la seguretat de la informació i de la ciberseguretat:
- CIA:
- confidencialiat
- integritat
- disponibilitat
- addicionals (p.ex. ENS):
- traçabilitat
- autenticitat
- Normativa
-
legislació europea / internacional legislació espanyola compliment RGPD Reglament General de Protecció de Dades
- consentiment
- drets sobre les dades:
accés, rectificació, oblit, limitació de processament, portabilitat - obligacions
- notificació
LOPDGDD Llei Orgànica de Protecció de Dades i Garantia dels Drets Digitals
- protecció de dades personals
- drets digitals
- DPD
- consentiment de menors
- mesures de seguretat i violació de dades
- accions correctives i sancions
- totes les empreses i ciutadans
ENS Esquema Nacional de Seguretat - administració pública i empreses que hi col·laboren
NIS2 Network and Information Systems
- mitjanes i grans empreses (>50 treballadors; >10M€) en sectors crítics
Ciberresiliència
- fabricants de productes i serveis
ISO 27001
- SGSI Sistema de Gestió de la Seguretat de la Informació
- opcional per a empreses
DORA Digital Operation Resilience Act
- sector financer
PCI DSS Payment Card Industry Data Security Standard
- empreses que operen amb dades de targetes de crèdit
HIPPA Health Insurance Portability and Accountability Act
- EUA: sector sanitari
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- Guies / Guides
- Ideahamster (Open-Source Security Testing Methodology Manual)
- Secure Is (Radsoft)
- CERES
- Microsoft
- Glossari
- Notícies / News
- Signatura / Signature
- PKI
- Empreses / Companies
- nCipher
- Scytl
- s21sec (telematic security)
- Panda Software Antivirus
- SSL
- Hackers
- P3P
- PICS
- The Twenty Most Critical Internet Security Vulnerabilities
- Secunia
- Autenticació / Authentication
- Autenticació WWW / WWW authentication
- Multi-factor authentication (wp)
factor
món real / real world
informàtica / computers
serveis / services
coneixement / knowledge
alguna cosa que l'usuari sap / something the user knows
- contrasenya / password
- Amazon AWS
- GitLab
possessió / posession
alguna cosa que l'usuari té / something the user has
- clau física / physical key
- targeta de coordenades / coordinate card
type
class
description
example
nom / name
mecanisme / mechanism
generation of password
certificat digital / digital certificate Maquinari / Hardware:
token de seguretat / security tokentoken desconnectat / disconnected token built-in display and keypad BCV TeleCode (Watchword II Type RG551 - Racal - Airtech Ltd, Long Crendon, Bucks, England)
Challenge / Response
- ANSI X9.26 Secure Sign-on
- ANSI X3.92 Data Encryption Algorithm (DES)
- ISO 8731-1 Message Authentication
- ANSI X9.9 Message Authentication
token connectat / connected token smart card DNIe
x
token USB / USB token YubiKey TOTP
contactless token RFID tag
bluetooth token
NFC token YubiKey NFC
single sign-on software token
programmable token
Programari / Software:
software tokenbased on shared secret
(username + PIN + secret)
FreeOTP (wp)
LinOTP (Python) (wp)
Google Authenticator (wp) TOTP, HOTP
based on public-key cryptography
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
inherent
alguna cosa que l'usuari és / something the user is
- biomètrica / biometrics
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- Contrasenya / Password
- Estimació de la robustesa / Strength estimation
- Generació de contrasenyes
- OpenSSL
pwgen- How to use a command line random password generator PWGEN on Linux
- genera 6 contrasenyes de 12 caràcters cadascuna:
- pwgen --symbols 12 6
- pwgen -y 12 6
- PWgen.io
- Password Checker & Secure Random Password Generator (Kaspersky)
- EFF Dice-Generated Passphrases
- Gestor de
contrasenyes / Password manager
- List of password managers (wp)
- KeePass
- KeePassX
- KeePassXC (wp)
- keepassxreboot/keepassxc
(GitHub)
- Build and Install KeePassXC
- Dependencies
- Mageia
- urpmi lib64qt5base5-devel lib64qt5svg-devel lib64qt5help-devel
- Mageia
- git clone ...
- ...
- keepassxreboot/keepassxc
(GitHub)
- Desenvolupament / Development
- Token USB / USB token
- Estàndards / Standards
- Universal 2nd Factor (U2F) (FIDO Alliance) (wp)
- ...
- Universal 2nd Factor (U2F) (FIDO Alliance) (wp)
- Fabricants / Manufacturers
- Yubico
- YubiKey
(wp)
- Productes / Products
- YubiKey
5 NFC
- USB + NFC
- YubiKey
5 NFC
- Works
with YubiKey catalog
- Linux
- Using
Your U2F YubiKey with Linux
/etc/udev/rules.d/70-u2f.rules
- CentOS
- Using
Your U2F YubiKey with Linux
- Linux
- Developer
Program
- OTP (One-Time
Password)
- per a completar nom/contrasenya
- verificat per YubiCloud (caldrà una API key) o un servei propi
- yubico-pam
- CentOS:
Requiring a Yubikey OTP for SSH
Password logins
sudo yum install pam_yubico ykclient- allowed yubikeys:
mkdir -p ~/.yubico- Yubikey ID are the first 12 characters of a generated OTP: push the button on a text terminal
- ~/.yubico/authorized_yubikeys
<username>:<yubikey_id_in_12_characters>
chmod 700 -R ~/.yubico
- PAM
- get a Yubikey API credential pair (id, key):
- /etc/pam.d/ssh
#auth required pam_sepermit.so
auth required pam_yubico.so id=... key=... url=http://api.yubico.com/wsapi/2.0/verify?id=%d&otp=%s pam_sepermit.so
- SSH
- /etc/ssh/sshd_config
PasswordAuthentication yes
UsePAM yes
- /etc/ssh/sshd_config
- ...
- U2F
(Universal 2nd Factor)
- nom i contrasenya + botó al dispositiu Yubico
- genera un parell de claus privada/pública per a cada servei
- ...
- OTP (One-Time
Password)
- Productes / Products
- YubiKey
(wp)
- Yubico
- Programari / Software
- Navegadors / Browsers
- Mozilla Firefox
- Enabling U2F support in Mozilla Firefox
- about:config
security.webauth.u2f true
- Mozilla Firefox
- Navegadors / Browsers
- Serveis / Services
- GitLab
- Estàndards / Standards
- Smart
cards
- Lectors smart cards
- Tipus / Types (*):
microprocessor
crypto module
RAM
ROM
EEPROM
memory card
-
-
-
-
x
microprocessor card
x
-
x
x
x
cryptographic card
x
x
x
x
x
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- Botigues
- Smart Card HOWTO
- Receta: Importar certificado en tarjeta criptográfica (FNMT -> CERES)
- Targetes / Cards
- Programari / Software
- scriptor / gscriptor (urpmi pcsc-tools)
- APIs
- Utilització de certificats
digitals / Digital certificates usage (see also Emissió de
certificats digitals / Digital certificate emission (OpenSSL))
- Aplicacions
- Signatura de
documents / Document signature
- Libre Office
- Okular
(version >= 21.04)
- Posa un requadre amb la signatura, de manera semblant a Adobe PDF Reader
- Digital
signature with Okular (Linux/Ubuntu)
- si la vostra distribució us ofereix una
versió massa antiga d'okular (<21.04), us
en podeu instal·lar una versió més recent
fent servir flatpak:
- Instal·lació amb Flatpack / Install
with Flatpack
- download org.kde.okular.flatpakref
flatpak install org.kde.okularflatpak run org.kde.okular
flatpak run org.kde.okular toto.pdf
- Instal·lació amb Flatpack / Install
with Flatpack
- Configuració / Setup
- Arranjament > Configura els
dorsals... > PDF
- Base de dades de certificats
- Personalitzat: ~/.mozilla/firefox/xxxx.default-release
- ha d'apuntar al directori on Firefox desa els certificats
- la base de dades que trobarà en aquest directori té el format ...
- Base de dades de certificats
- Arranjament > Configura els
dorsals... > PDF
- Signatura / Signature
- Eines > Signa digitalment
- trieu el certificat
- dibuixeu un requadre
- us crearà toto_signat.pdf
- Eines > Signa digitalment
- si la vostra distribució us ofereix una
versió massa antiga d'okular (<21.04), us
en podeu instal·lar una versió més recent
fent servir flatpak:
- Kleopatra (KDE)
- Ecofirma (MITyC)
- Como firmar un pdf u otro documento con nuestro DNIe en linux ubuntu.
- launcher_ecofirma.jnlp
- Run
- requirements
- Mageia
urpmi install icedtea-web
- Mageia
javaws launcher_ecofirma.jnlp- Sun Java 7 Web Start
- requirements
- Run
- Signatura de
documents / Document signature
- Utilització des de wget / Usage from wget
- Utilització des
de navegador (p.ex. Mozilla
Firefox / Usage from browser (e.g. Mozilla Firefox):
emissor
certificat arrel
(kleopatra: Importa...)
validació certificat
prova de signatura
validació de signatura
utilitats
codi font
mòdul PKCS#11 (Mozilla) idCAT CATCert Baixada de claus públiques
(ec-ciutadania.crt)
Validació de certificats Prova de signatura de text Validació de de signatures
libclauerpkcs11.so DNIe
DGP
Autoridades de certificación / ACRaiz.crt Comprobación de certificados del DNIe
Area de descargas
opensc-pkcs11.so Certificat d'usuari (programari)
CERES / FNMT
Certificado raiz
(ACUSU.crt)
Validación de Certificados Web
Area de descarga
-
Certificat d'usuari (smartcard)
opensc-pkcs11.so Targeta universitària UPC
B. Santander / FNMT
(CATCert)
Classic Client
libgclib.so Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- Mozilla
Firefox
- Paràmetres -> Privadesa i seguretat -> Certificats -> Mostra els certificats -> Els vostres certificats -> Importa...
- a partir del fitxer (.p12) crearà una base de dades, dins de ~/.mozilla/firefox/xxxx.default-release
- podreu fer servir aquesta base de dades per signar documents des de:
- Exemples
- VALIDe
- signatura de documents
- Seu
electrònica
de la Seguretat Social
- Vida laboral
- Comproveu el vostre certificat (Prova de signatura de text) (CATCert)
- https://av-dnie.cert.fnmt.es/compruebacert/compruebacert
- https://av-dnie.cert.fnmt.es/compruebacert/firmar.action
- VALIDe
- Mozilla
Firefox
- FNMT
- Configuración
previa
- FNMT-RCM
- Instalación software generación de claves
- Instal·lació
dnf install configuradorfnmt-1.0.1-0.x86_64.rpm
- Ús
- ...
- AutoFirma
- Instal·lació
- afegiu repositoris BlogDrake
- instal·leu el paquet
(autofirma-1.7.0-3.1bdk_mga8.noarch)
dnf install autofirma
- Ús
- ...
- Instal·lació
- FNMT-RCM
- Renovació
- ...
- Problemes
No s'ha pogut crear l'«io-slave». El Klauncher ha informat: Protocol desconegut «fnmtcr».- autofirma en KDE plasma – error protocolo desconocido «afirma»
- Solució
suecho "MimeType=x-scheme-handler/fnmtcr;" >>/usr/share/applications/configuradorfnmt.desktopexitxdg-mime default configuradorfnmt.desktop x-sheme-handler/fnmtcrsuupdate-desktop-database
- No es troba cap certificat
- Solució
- a la finestreta que se us obrirà, seleccioneu el fitxer p12 del vostre certificat
- Solució
- Configuración
previa
- idCAT
- Info
- Clauer / The clauer project - Linux (UJI) / Projecte Clauer
- El bloc que faig: idCAT (Jordi Nebot)
- Instal·lació / Installation
- Instal·lació
(Firefox, Thunderbird):
- Compilació
- dependències / dependencies
- Mageia
urpmi task-c++-devel
- Mageia
- # wget https://www.idcat.cat/idcat/jsp/bin/clauer/linux/ClauerLinux.tar.gz
- # tar xvzf ClauerLinux.tar.gz
- # cd ClauerLinux-3.0.8
- # ./configure [--enable-64]; make; make install
- això, entre altres coses, us activarà el
servei "clos":
chkconfig --list clos
- dependències / dependencies
- Amb el Firefox, obriu el fitxer:
- file:///.../ClauerLinux-3.0.8/pkcs11/clauerPK11inst.xpi
- o bé, des de consola, executeu:
./ClauerLinux-3.0.8/pkcs11/firefox-install-pkcs11.sh
- això us hauria d'haver instal·lat el
dispositiu de seguretat "Modul
pkcs11 Clauer":
- Edita / Preferències / Avançat /
Certificats / Dispositius de seguretat
- Mòdul: Modul pkcs11 Clauer
- Camí: /usr/lib/libclauerpkcs11.so
- Edita / Preferències / Avançat /
Certificats / Dispositius de seguretat
- Compilació
- Desinstal·lació (Firefox, Thunderbird):
- Edita / Preferències / Avançat / Xifratge
(Certificats) / Dispositius de seguretat
- Descarrega
- o bé: Eines / Consola d'errors:
pkcs11.deletemodule("Modul pkcs11 Clauer");
- o bé:
modutil -delete"Modul pkcs11 Clauer" -libfile/usr/local/lib/libclauerpkcs11.so-dbdir /home/USUARI/.mozilla/firefox/NOMPERFIL
- Edita / Preferències / Avançat / Xifratge
(Certificats) / Dispositius de seguretat
- Antic mètode d'instal·lació (Firefox, Thunderbird)
(és crític primer instal·lar les claus públiques i
després activar el dispositiu de seguretat)
- Baixeu-vos les Claus públiques de CATCert / Administració local, Generalitat i Diputacions:
- Instal·leu-les:
- Firefox 3.0: Edita / Preferències / Avançat / Xifratge / Visualitza els certificats / Entitats / Importa (Thunderbird: Edita / Preferències / Avançat / Certificats / Visualitza els certificats / Entitats / Importa)
- acc.crt: marqueu les tres opcions
- ec-idcat.cer: marqueu les tres opcions
- comproveu que són vàlides: Edita /
Preferències / Avançat / Xifratge (Certificats)
/ Visualitza els certificats / Entitats: Agència
Catalana de Certificació / EC-ACC, EC-IDCAT:
- "Aquest certificat ha estat verificat per als usos següents: Autoritat del certificat SSL"
- Activeu el dispositiu Clauer:
- Edita / Preferències / Avançat / Xifratge
(Certificats) / Dispositius de seguretat
- Carrega:
- Nom del mòdul: Modul pkcs11 Clauer
- Nom de fitxer del mòdul: /usr/local/lib/libclauerpkcs11.so
- Carrega:
- o bé: Eines / Consola d'errors:
pkcs11.addmodule("Modul pkcs11 Clauer", "/usr/local/lib/libclauerpkcs11.so", 0x1<<28, 0);
- o bé:
modutil -add "Modul pkcs11 Clauer" -libfile/usr/local/lib/libclauerpkcs11.so-dbdir /home/USUARI/.mozilla/firefox/NOMPERFIL - nota: no poseu accents al nom ("Modul pkcs11 Clauer"); no apareixerà a la llista i es farà difícil de suprimir (podeu trobar el nom al fitxer ~/.mozilla/firefox/xxx.default/secmod.db)
- comproveu que apareix a Edita / Preferències / Avançat / Xifratge (Certificats) / Dispositius de seguretat
- Edita / Preferències / Avançat / Xifratge
(Certificats) / Dispositius de seguretat
- Instal·lació
(Firefox, Thunderbird):
- Ús / Usage
- Info
- DNIe
/ Usa tu DNI
- Info
- Descargas
- Código
fuente
pkcs11 (Este
código
no es todavía funcional al no estar publicada
la clave privada de componente. Dicha clave se
publicará próximamente.)
- Kriptópolis
- OpenSC
DNIe (gitorious)
libcard/trusted_channel_card.c
- Código
fuente
pkcs11 (Este
código
no es todavía funcional al no estar publicada
la clave privada de componente. Dicha clave se
publicará próximamente.)
- Zona TIC
- Los certificados del DNI electrónico
- Sistemas actuales de autenticación y firma
- La comunicación cifrada del DNI electrónico
- La normativa CWA-14890-1:2004 (comunicación entre una aplicación y un dispositivo seguro de creación de firma)
- Manual comandos DNIe (pdf)
- Análisis de la estructura interna del DNI-E (48 Bits blog)
- Nueva zona técnica para profesionales y empresas
- Comprobación de certificados del DNIe
- Demo: ataque al DNIE y a los recursos que protege (banca electrónica, etc.)
- PPSCVA T1 Perfil de protección para la aplicación de creación y verificación de firma electrónica Tipo 1 de INTECO.
- Descargas
- Connexió
-
maquinari programari lector smartcard
lector telèfon NFC - Android
- PC
- DNIeRemote
- DNIeRemote_1.0-5_amd64.zip
- DNIeRemote
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
-
- DNIeRemote
- Instal·lació
- Android
- ...
- PC
- Mageia
- dependències
sudo dnf install dpkg ...
- instal·lació
sudo dpkg -i --ignore-depends=adb,libgtkmm-3.0-1v5 DNIeRemoteSetup_1.0-5_amd64.deb
- dependències
- Mageia
- Android
- Instal·lació
- Smartcard: Instal·lació /
Installation
- Mageia
- OpenSC 0.14 added official support for the DNIe.
- Passos (Mageia 7)
- Instal·leu els paquets necessaris per al lector
SC, i després:
systemctl start pcscd
- Instal·leu dnie-configurador des dels
dipòsits de BlogDrake
(p.ex. per a Mageia 7):
urpmi.addmedia --wget --distrib http://ftp.blogdrake.net/mageia/mageia7/x86_64urpmi dnie-configurador- seguiu les instruccions / follow the
instructions
- ...
- Ús / Usage
- Problemes / Problems
ln: no s’ha pogut crear l’enllaç simbòlic '/usr/lib64/firefox/browser/defaults/preferences/afirma.js': El fitxer o directori no existeix
advertència: Ha fallat el scriptlet %post(afirma-1.6.5-3.1bdk.mga7.noarch), estat de sortida 1
- Instal·leu els paquets necessaris per al lector
SC, i després:
- Mageia 5
urpmi.addmedia --wget --distrib ftp://ftp.blogdrake.net/mageia/mageia5/x86_64/urpmi dnie-configurador- edit dnie-configurador:
#downloadCertificate https://www.sede.fnmt.gob.es/documents/11614/116099/Certificado+Raiz+Clase2A/29de1646-675e-49b3-bd8e-0ff6ca02cb66 FNMTClase2CA.cer
downloadCertificate https://www.sede.fnmt.gob.es/documents/11614/116099/FNMTClase2CA.cer
- Mageia 4
- DNI electrónico español en Mageia 4 (inclou paquets)
- Mageia 1, 2
- DNI
electrónico
español en Mageia (Mageia 1,Mageia 2)
urpmi.addmedia --wget --distrib ftp://ftp.blogdrake.net/mageia/mageia4/x86_64/urpmi opensc-opendnie dnie-configurador- ftp
- DNI
electrónico
español en Mageia (Mageia 1,Mageia 2)
$ dnie-configurador- Comprovació
- Mandriva
- Repositorios
BlogDrake:
- dni-es disponible en el Repositorio Blogdrake
- [Packagers] dnie-es
- En Mandriva ya funcionaba
- urpmi.addmedia --wget --distrib http://ftp.blogdrake.net/mandriva/2010.1/i586
- urpmi dnie
- DNI
electrónico
en Mandriva 2010 (BlogDrake)
urpmi libopenct1 libopensc2 pinentry pcsc-lite pcsc-toolsln -s /usr/lib/libcrypto.so.0.9.8 /usr/lib/libcrypto.so.7wget http://www.dnielectronico.es/descargas/PKCS11_para_Sistemas_Unix/1.4.6.Fedora_10_32/Fedora_Core_10_o...tar xvf ./Fedora_Core_10_opensc-dnie-1.4.6-2.fc10.i386.rpm.tarurpmi --allow-nodeps --allow-force opensc-0.11.7-7-fc10.i386.rpmecho opensc >> /etc/urpmi/skip.listrpm -ivh opensc-dnie-1.4.6-2.fc10.i386.rpm(modificarà /etc/opensc.conf)- Firefox
- Menú Mandriva: Oficina -> Registrar mòdul DNIe PKCS#11 (això instal·larà el certificat arrel de la policia)
urpmi mozilla-plugin-openscmodutil -add DNIE -libfile /usr/lib/opensc-pkcs11.so -dbdir /home/USUARI/.mozilla/firefox/NOMPERFIL(també es pot fer des del Firefox: Edita / Preferències / Avançat / Xifratge (Certificats) / Dispositius de seguretat)
- Acceso al DNI electrónico en Mandriva 2007 y Windows XP
- Repositorios
BlogDrake:
- Instal·lació manual (obsoleta)
- Instal·leu
el
mòdul criptogràfic per a Firefox i Thunderbird:
urpmi opensc-dnie(el de FedoraCore, que és un rpm, NO va bé per a Mandriva)- urpmi dpkg
- wget http://www.dnie.es/descargas/PKCS11_para_Sistemas_Unix/Ubunt_Gutsy.tar
- tar xvf Ubunt_Gutsy.tar
- cd Ubuntu_Gutsy
- dpkg -x opensc-dnie_1.4.0-5_i386.deb .
- cp -r usr/lib/* /usr/lib/
- urpmi mozilla-plugin-opensc (libopensc2) opensc
- /etc/opensc.conf:
- # reader_drivers = openct, pcsc,
ctapi;
reader_drivers = pcsc; - # card_drivers = customcos, internal;
card_drivers = dnie;
card_driver dnie {
#The location of the driver library
module = /usr/local/lib/libopensc-dnie.so;
}
- # reader_drivers = openct, pcsc,
ctapi;
- Activeu-lo
a
Firefox (Thunderbird) (NO FUNCIONA AMB
MANDRIVA):
- obriu amb el Firefox el fitxer:
- /usr/share/opensc-dnie/instal_dnie/instala_modulo.htm (també us instal·larà el certificat arrel de la policia)
- o bé: Edita / Preferències / Avançat /
Xifratge (Certificats) / Dispositius de
seguretat
- Carrega:
- Nom del mòdul: DNIe
- Nom de fitxer del mòdul: /usr/lib/opensc-pkcs11.so
- i instal·leu el certificat arrel de la
policia:
- ACRaiz.crt (DIRECCION GENERAL DE LA POLICIA / AC RAIZ DNIE)
- Visualitza els certificats / Servidors / Importa...: ACRaiz.crt
- Carrega:
- obriu amb el Firefox el fitxer:
- Instal·leu
el
mòdul criptogràfic per a Firefox i Thunderbird:
- Mageia
- Ús / Usage
- Mozilla
Firefox
- Preferències / Privadesa i seguretat /
Seguretat / Certificats / Dispositius de
seguretat
- DNIe
- C3PO
LTC31 v2 (model del vostre
lector)
-
Estat accions possibles No present inseriu físicament el DNIe No s'ha iniciat la sessió «Inicia la sessió» S'ha iniciat la sessió «Finalitza la sessió» Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
-
- C3PO
LTC31 v2 (model del vostre
lector)
- Problemes
- "Autenticació de testimoni protegit" /
"Protected token authentication"
- Solució
- Al instalar DNIe obtengo Protected Token Authentication...
- /etc/opensc.conf
enable_pinpad = false;
...
enable_pinpad = false;
- Solució
- "Autenticació de testimoni protegit" /
"Protected token authentication"
- DNIe
- Preferències / Privadesa i seguretat /
Seguretat / Certificats / Mostra els
certificats...
- us han d'aparèixer dins de «DIRECCION GENERAL DE POLICIA», dos certificats amb el vostre nom: un amb FIRMA i l'altre amb AUTENTICACIÓN, provinents del dispositiu de seccccccjtdbjvvjvlrbhiuciebibhludjkrlhchikknvk
- guretat «DNI electrónico (PIN1)»
- Preferències / Privadesa i seguretat /
Seguretat / Certificats / Dispositius de
seguretat
- Mozilla
Firefox
- Info
- Targeta CERES
(FNMT)
- Area
de
descarga de software (FNMT)
- Gestión de certificados
- CryptoKit (C3PO)
- Instal·leu els paquets necessaris per al lector SC.
- Instal·leu el mòdul opensc-ceres (dependències: opensc, pinentry...)
- Validación de Certificados Web
- Area
de
descarga de software (FNMT)
- Targeta UPC
- Signatura electrònica mòbil
- Aplicacions
15Quiosc / Kiosk#
- KDE Kiosk
- urpmi kiosktool
16Execució distribuïda / Distributed execution#
- BOINC
- Grid
- XML-RPC
17Accés remot / Remote access#
- VNC
Virtual
Network Computing
- vncviewer (
urpmi tigervnc)
- vncviewer (
- MSWindows Server
- rdesktop
(
urpmi rdesktop)
- rdesktop
(
- Citrix
- VPN Virtual Private Network
- X Window
- Projectes / Projects
18VPN (Virtual Private Network)#
| base |
name |
owner |
info |
used
protocols |
implementations |
||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| encryption | user authentication |
packet authentication |
compression |
server |
client |
||||||||||
| passive attacks
(eavesdroppers) |
active attack
(man-in-the-middle) |
replay attacks |
plaintext attacks |
vpnc (command line) |
KVpnc
(KDE) |
drakvpn (mdv/mga) |
Network Manager |
(others) |
|||||||
| IPSec
(kernel) |
L2TP over IPsec (Cisco) |
HMAC construction |
x |
||||||||||||
| FreeSwan |
|||||||||||||||
| PPTP |
Microsoft |
|
|
|
x |
||||||||||
| TUN/TAP
(user-space) |
OpenVPN (over OpenSSL/TLS) |
|
|
HMAC construction (wp) | sliding window (unique
timestamp) |
x |
|||||||||
| VTun |
x |
||||||||||||||
| Tinc |
|||||||||||||||
| Cipe |
|||||||||||||||
| OpenSSH | only valid for one port | x |
|||||||||||||
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- VPN Virtual Private Network (wp)
- VPN (utilitats / utilities)
- Virtual Private Networking Basics (Netgear)
- Virtual network adaptors (push to user space) (wp):
19Distributed software#
- Software components (wp)
- Distributed computing
- Web Service
- Interaction models
- RPC: Remote Procedure
Call
- "Power programming with RPC" (O'Reilly)
- Remote Procedure Calls (RPC)
- XML-RPC
- XML-RPC specification
- client:
xmlrpc http://remote.server/ method_name i/33
- SOA: Service-Oriented Architecture
- REST: REpresentational
State Transfer
- do not require XML, SOAP, or WSDL service-API definitions
- RPC: Remote Procedure
Call
- Interaction models
| architecture |
protocol |
used by / examples |
Web Services | language | message
format |
implementations | IDE | |||
|---|---|---|---|---|---|---|---|---|---|---|
| used |
descr lang |
HTTP methods | ||||||||
| pipes, filters | ||||||||||
| compound documents | ||||||||||
| RPC:
Remote procedure call |
operation-oriented | CORBA | ||||||||
| DCOM | Microsoft | |||||||||
| DCOP | KDE <=3.4 | |||||||||
| D-BUS (*) | xorg, KDE 3.5 | |||||||||
| Java EE | ||||||||||
| Java RMI | ||||||||||
| RPyC (wp) | APScheduler |
|||||||||
| XML-RPC | POST |
|||||||||
| JasonRPC | ? |
POST, GET | ||||||||
| JSON-RPC 2.0 | Shelly | |||||||||
| SOAP
(Simple Object Access Protocol) (evolution of XML-RPC) |
x |
WSDL | POST |
markup
languages |
XML |
Frameworks
|
Eclipse WTP | |||
| SOA: Service-oriented architecture | message-oriented | x |
||||||||
| REST: Representational state transfer | stateless resources | WWW |
RESTful
(constraints) |
WSDL
2.0 |
GET, POST, DELETE, PUT | Internet media type: JSON, XML, YAML, ... |
|
|||
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- Dynamic web pages
-
language framework implementation dev server Komodo NVU / Kompozer Eclipse WTP Web template system outside server static HTML
x
server-side ASP
IIS ASP.NET
CGI
ColdFusion
Javascript
JSP / Servlets
JST - Apache Tomcat (*)
- Resin
Perl / Active Perl
x
PHP - CodeIgniter (wp)
- Symfony
- Zend framework
x
Apache-PHP mod Python Django
x
Ruby / eRuby Ruby on rails
x
distributed server-side transclusion server-side includes
Apache SSI
client-side transclusion HTML iframe
AJAX AJAX frameworks Apache XAP (*)
ATF, RAP
Rich Internet Application
client-side CSS
x x WST
HTML
x x
ECMAScript (*) Javascript (*) x
XML
x
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- Rich internet application (wp)
- Open Laszlo (wp)
- RIA on connected TV
- Frameworks (list of rich internet application frameworks)
-
technologies
type
framework
language
development
runtime
SDK
IDE browser-less / VM browser-based generic additional RIA (list) MS Silverlight
Java
Java
- Eclipse
- ...
application
applet
Adobe Flash
ActionScript
Flex
- Eclipse
- Adobe Flash Builder
Adobe AIR
Flash plug-in
client-based
Ajax
HTML
-
x
CSS
-
x
XMLHttpRequest
-
x
XML
Javascript
- jQuery
- Closure?
-
x
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- Web
applications
- Web
application
framework
- Comparison of web application frameworks
- Python web frameworks
- FastAPI
- Django
(Python)
- Django documentation contents
- The Django
book (obsolete)
- Scaling
- Running
a separate media server
- lighttpd, tux (wp)
- Running
a separate media server
- Scaling
- Eclipse integration:
- Utilitats / Tips
- REST
(web services)
- Utilitats / Tips
- RESTful Django Powered Web Services (difference between REST and RPC)
- REST worst practices
- Common REST mistakes
- Building better web services with Django (Andrew Wilkinson)
- GSoC - Generic REST API module for Django (Django developers)
- Django and Restful APIs (Stackoverflow)
- Implementations
- Django REST Framework
- Django Tastypie
- Django model views
- Django
REST interface
- RestifyDjango
- Design the interface
- Create model-based resources
- Create non-model-based resources
- RestifyDjango
- Django RESTAPI
- RESTinPy
- DAPI
- django-piston (not maintained)
- qooxdoo (Javascript) (used by EyeOS)
- Wt (c++) (wp)
- Google Web toolkit (wp)
- Node.js
- Web
application
framework
20Enginyeria del programari / Software engineering#
21Observabilitat / Observability#
-
pilar
description analogy with patient Data sources (plugins in Grafana) Visualization metrics something is happening body temperature, blood pressure time series databases (TSDB) - Mimir: for metrics (Prometheus plugin)
- Prometheus
- Graphite
- InfluxDB
- OpenTSDB
logs what's happening? talk to the patient logging and document databases - Loki: store and query logs
- OpenSearch (plugin)
- ElasticSearch
- Grafana
- OpenSearch Dashboards
traces where is it happening?
(temps i dades utilitzats pels processos)scan distributed tracing
(usually visualized as node graphs)- Tempo: store traces
- Jaeger
- Zipkin
profiling
- Pyroscope
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- Eines / Tools
-
Eclipse InfluxData GrafanaLabs (LGTM) AWS Cloud Native generate data MQTT producer - mqtt: mosquitto_pub
- paho-mqtt (Python)
broker Mosquitto
consumer - mqtt: mosquitto_sub
- paho-mqtt (Python)
Telegraf
collect data metrics
Telegraf Mimir
Prometheus logs
Loki Kinesis
traces
Tempo
store data
InfluxDB
OpenSearch
visualize data
Chronograf Grafana OpenSearch Dashboards
process data and alerts
Kapacitor
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
-
- Visualització / Visualization
-
Grafana OpenSearch Dashboards Home Assistant input data - Connection
- Data source
- Index
- Index settings
- Entitat / Entity
raw data - Discover
dashboard - Dashboards
- Panel,
Visualizations
- Type: gauge, ...
- Panel,
Visualizations
- Dashboards
- Visualizations
- Panell
- Visualització (pestanya) / View
- Insígnia / Badge
- Secció / Section
- Targeta / Card
- Tipus: galga, ...
- Targeta / Card
- Visualització (pestanya) / View
queries - PromQL
- TraceQL
- ...
annotations
alerts
Aquesta taula continua cap a la dreta — desplaça-la o gira el mòbil.
- Connection
-
- AWS
http://www.francescpinyol.cat/informatica.html
Primera versió: / First version:
Darrera modificació: 5 d'agost de 2026 / Last update: 5th August
2026