Table des matières
- 2026:
- 2025:
4 billet(s) pour septembre 2026
| Notes HTTP Strict Transport Security - HSTS | 2026/09/18 11:04 | Jean-Baptiste |
| Notes GNU Linux GPU carte graphiques | 2026/09/08 15:49 | Jean-Baptiste |
| Notes GNU Linux graphique | 2026/09/08 15:42 | Jean-Baptiste |
| Notes urlencoding - passer des mots de passe en HTTPS | 2026/09/03 17:58 | Jean-Baptiste |
Notes GNU screen
Je préfère tmux au bon vieux GNU screen Voir :
Mais tmux n'est pas capable de se connecter en console sur un cable série (RS-232)
Voir draft-console-cable-serie-croise-rs-232
screen /dev/ttyS0
Sauvegarder ses sessions screen
Redimensionner la taille de la fenêtre
Ctrl + a et l ((redisplay) Fully refresh current window.) Corrige la taille de la fenêtre
Autres
screen -RR # recover an old, detached screen, or start a new one.
Notes GNU Linux HPC
Voir :
- InfiniBand
- Apptainer/Singularity-container
Perf / Bench :
Notes GNU Linux compte utilisateurs - users accounts
Sous RedHat la liste des comptes et des UID utilisés par la distrib est là : /usr/share/doc/setup/uidgid
Notes gnome gconf gsettings
Voir :
- M(community.general.dconf)
- M(community.general.gconftool2)
Exemple
gsettings get org.gnome.desktop.a11y.keyboard stickykeys-enable gsettings set org.gnome.desktop.a11y.keyboard stickykeys-enable false
Autre solution
/usr/share/gdm/dconf/99-local-settings
[org/gnome/settings-daemon/plugins/power] sleep-inactive-ac-timeout=0
Pb - La commande gsettings ne fonctionne pas en en console SSH.
Voir http://askubuntu.com/questions/323776/gsettings-not-working-over-ssh
La commande gsettings ne fonctionne pas en SSH. Mais fonctionne en local dans un terminal graphique.
gsettings set org.gnome.desktop.lockdown disable-lock-screen true
Vérif
gsettings get org.gnome.desktop.lockdown disable-lock-screen
false
Cela n'a pas fonctionné. Cela est dû au fait que dbus n'est pas démarré dans le session SSH.
Solution
Préfixer votre commande par dbus-launch
dbus-launch gsettings set org.gnome.desktop.lockdown disable-lock-screen true
Notes
Dump conf
Dump
dconf dump /
Ou
gsettings list-recursively
Notes 1
Éditeur en mode texte :
- gsettings (libglib2.0-bin)
- dconf (dconf-cli)
- gconftool-2 (gconf2)
Éditeur en mode graphique :
- dconf-editor (dconf-editor)
Une partie de la conf est enregistrée ici : \ ~/.config/dconf/user
La preuve :
$ gsettings get org.gnome.desktop.lockdown disable-lock-screen true $ rm .config/dconf/user $ gsettings get org.gnome.desktop.lockdown disable-lock-screen false
Voir le schéma ici : \ /usr/share/glib-2.0/schemas/org.gnome.desktop.lockdown.gschema.xml
Autre : dconf update
Conf
Désactiver le montage automatique des clefs USB
gsettings set org.gnome.desktop.media-handling automount false
Autres
paquet dell-super-key Disables the super key by default
/usr/share/glib-2.0/schemas/41_dell-super-key.gschema.override /usr/share/doc/dell-super-key/copyright /usr/share/doc/dell-super-key/changelog.gz
/usr/share/glib-2.0/schemas/41_dell-super-key.gschema.override
[org.compiz.unityshell] show-launcher = "" lock-screen = "<Control><Alt>l" show-desktop-key = "<Control><Alt>d" launcher-switcher-forward = "" launcher-switcher-prev = "" [org.compiz.core] maximize-window-key = "<Control><Alt>Up" unmaximize-or-minimize-window-key = "<Control><Alt>Down" [org.compiz.put] put-center-key = "<Control><Alt>KP_Begin" put-left-key = "<Control><Alt>KP_Left" put-right-key = "<Control><Alt>KP_Right" put-top-key = "<Control><Alt>KP_Up" put-bottom-key = "<Control><Alt>KP_Down" put-bottom-button = "<Control><Alt>KP_Down" put-topright-key = "<Control><Alt>KP_Prior" put-bottomleft-key = "<Control><Alt>KP_End" put-bottomright-key = "<Control><Alt>KP_Next" put-restore-key = "<Control><Alt>KP_Insert" put-pointer-key = "<Control><Alt>z" [org.compiz.expo] expo-key = "<Control><Alt>s" [org.compiz.grid] put-maximize-key = "<Control><Alt>Up" put-restore-key = "<Control><Alt>Down" left-maximize = "<Control><Alt>Left" right-maximize = "<Control><Alt>Right"
Notes Gitlab
Voir :
- CIS GitLab Benchmark
Voir aussi :
- Gitea
- GitPrep
- gitweb
- ArgoCD
- Tekton
Install via Docker
Docker
Docker-compose avec Gitlab runner :
Configuration du runner
docker run --rm -ti --name gitlab-runner --add-host gitlab.local:172.17.0.1 \ -v /srv/gitlab-runner/config:/etc/gitlab-runner \ -v /var/run/docker.sock:/var/run/docker.sock \ gitlab/gitlab-runner:alpine register
/srv/gitlab-runner/config/config.toml
concurrent = 1 check_interval = 0 [session_server] session_timeout = 1800 [[runners]] name = "89fa5654f698" url = "http://gitlab.local:8081/" token = "FKXKQ5Zg1KmwB9ssNVU9" executor = "docker" [runners.custom_build_dir] [runners.cache] [runners.cache.s3] [runners.cache.gcs] [runners.cache.azure] [runners.docker] tls_verify = false image = "alpine" privileged = false disable_entrypoint_overwrite = false oom_kill_disable = false disable_cache = false volumes = ["/cache"] shm_size = 0
Gitlab créera de nouveau containers. Ils devrons etre capable de faire un git clone Pour configurer les flux réseaux, ajoutez clone_url = Dans notre exemple 172.18.0.1 est la passerelle par défaut des nouveaux containers crées.
/gitlab-runner/config/config.toml
[[runners]] #url = "http://gitlab.local:8081/" url = "http://gitlab.local/" clone_url = "http://172.18.0.1:8081"
docker-compose.yml
version: '3.7' services: gitlab: image: 'gitlab/gitlab-ce:latest' restart: unless-stopped hostname: 'gitlab.local' environment: GITLAB_OMNIBUS_CONFIG: | #external_url 'http://gitlab.local' # Add any other gitlab.rb configuration here, each on its own line ports: - '127.0.0.1:8081:80' - '127.0.0.1:4443:443' - '127.0.0.1:2222:22' volumes: - "/srv/gitlab/config:/etc/gitlab" - "/srv/gitlab/logs:/var/log/gitlab" - "/srv/gitlab/data:/var/opt/gitlab" networks: - gitlab-net gitlab-runner: image: gitlab/gitlab-runner:alpine restart: unless-stopped depends_on: - gitlab volumes: - /srv/gitlab-runner/config:/etc/gitlab-runner - /var/run/docker.sock:/var/run/docker.sock networks: - gitlab-net networks: gitlab-net: name: gitlab-net
srv/gitlab/config/gitlab.rb
gitlab_rails['env'] = { 'MALLOC_CONF' => 'dirty_decay_ms:1000,muzzy_decay_ms:1000' } gitaly['env'] = { 'LD_PRELOAD' => '/opt/gitlab/embedded/lib/libjemalloc.so', 'MALLOC_CONF' => 'dirty_decay_ms:1000,muzzy_decay_ms:1000', 'GITALY_COMMAND_SPAWN_MAX_PARALLEL' => '2' } gitlab_rails['gitlab_username_changing_enabled'] = true gitlab_rails['trusted_proxies'] = ["172.16.0.0/12"] gitlab_rails['omniauth_enabled'] = false puma['worker_processes'] = 0 puma['exporter_enabled'] = false sidekiq['max_concurrency'] = 10 sidekiq['metrics_enabled'] = false postgresql['shared_buffers'] = "1024MB" nginx['redirect_http_to_https'] = true nginx['listen_port'] = 80 nginx['listen_https'] = false prometheus['enable'] = false alertmanager['enable'] = false node_exporter['enable'] = false redis_exporter['enable'] = false postgres_exporter['enable'] = false pgbouncer_exporter['enable'] = false gitlab_exporter['enable'] = false grafana['enable'] = false grafana['metrics_enabled'] = false #gitaly['enable'] = false gitaly['ruby_max_rss'] = 200_000_000 # RSS threshold in bytes for triggering a gitaly-ruby restart gitaly['concurrency'] = [ { 'rpc' => "/gitaly.SmartHTTPService/PostReceivePack", 'max_per_repo' => 3 }, { 'rpc' => "/gitaly.SSHService/SSHUploadPack", 'max_per_repo' => 3 } ] gitaly['cgroups_count'] = 2 gitaly['cgroups_hierarchy_root'] = 'gitaly' gitaly['cgroups_memory_enabled'] = true gitaly['cgroups_memory_limit'] = 500000 gitaly['cgroups_cpu_enabled'] = true gitaly['cgroups_cpu_shares'] = 512
Lancement de Gitlab et de Gitlab-Runner
docker-compose -d up
docker exec -ti gitlab gitlab-ctl reconfigure docker restart gitlab
Config WebUI
User : root
Password
docker exec -it gitlab grep 'Password:' /etc/gitlab/initial_root_password
Open registration is enabled on your instance.
Admin Area - Settings - General - Sign-up restrictions
Sign-up enabled Require admin approval for new sign-ups
URL d'admin : https://gitlab.acme.local/admin
Le compte admin par defaut est “root”
Edit Profile - Account
Change username
admin/application_settings/general Account and limit Gravatar enabled Disable
admin/application_settings/general User OAuth applications Allow users to register any application to use GitLab as an OAuth provider Disable
admin/application_settings/general Third-party offers Do not display offers from third parties Checked
admin/application_settings/metrics_and_profiling Metrics - Prometheus Enable health and performance metrics endpoint Disable
profile Private profile Don't display activity-related personal information on your profile
Admin Area - Overview - Users
Config Runners avec Docker
Admin Area - Overview - Runners
docker-compose exec gitlab-runner gitlab-runner register
Enter the GitLab instance URL (for example, https://gitlab.com/): http://gitlab/
Enter the registration token: 2_xtsj1yw4sacbWwG46y
Enter an executor: docker, docker-ssh, ssh, docker+machine, kubernetes, custom, parallels, shell, virtualbox, docker-ssh+machine:
docker Enter the default Docker image (for example, ruby:2.6): alpine
Reconfig
docker-compose exec gitlab gitlab-ctl reconfigure docker-compose exec gitlab gitlab-ctl restart
Pb
Erreur dans Gitlab Settings CI/DI - There was an error fetching the environments information.
Solution :
Settings, General, Visibility, project features, permissions in Pipelines (Build, test, and deploy your changes) select Only Project Members
Autres
Installation sur Ubuntu 16.04
https://packages.gitlab.com/gitlab/gitlab-ce/install
curl -s https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash apt-get install gitlab-ce
-------------- GitLab was unable to detect a valid hostname for your instance. Please configure a URL for your GitLab instance by setting `external_url` configuration in /etc/gitlab/gitlab.rb file. Then, you can start your GitLab instance by running the following command: sudo gitlab-ctl reconfigure For a comprehensive list of configuration options please see the Omnibus GitLab readme https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md ---------------
sudo gitlab-ctl reconfigure
Optimisation
/etc/gitlab/gitlab.rb
##! **recommend value is 1/4 of total RAM, up to 14GB.** # postgresql['shared_buffers'] = "256MB" postgresql['shared_buffers'] = "4096MB"
gitlab-ctl restart postgresql
Les composants suivants seront automatiquement installés :
- nginx
- postgres
- redis
A présent connectez vous sur le port 80 et définissez un mot de passe
Autres
PHC0
Remote repository pull mirroring
Remote repository pull mirroring Automatically sync branches, tags, and commits from external repositories every 30 minutes, with safeguards to prevent data loss. https://docs.gitlab.com/user/project/repository/mirror/pull/
LDAP
Advanced LDAP/SAML Configuration Automatically synchronize GitLab users with LDAP groups, configuring administrator access, external user status, and SSH keys through customizable directory attribute
