Outils pour utilisateurs

Outils du site


blog

Adminer interface web pour DB mysql postgres sqlite

Voir aussi :

Voir les données en brute directement en base.

Exemple avec MySQL (comme phpMyAdmin)

Install

Docker
docker run -d --rm -p 8082:80 clue/adminer # --net=mynet19
Exemple install et conf MariaDB

Télécharger “Adminer for MySQL English only” sur https://www.adminer.org/

Nous créerons un compte en lecture seul, pouvant accéder à toutes les bases de données

mysql -u root -p
GRANT SELECT ON *.* TO 'allro'@'localhost' IDENTIFIED BY 'P@ssw0rd';
FLUSH PRIVILEGES;
mkdir /var/www/adminer/

Déposer adminer-4.2.3-mysql-en.php sur /var/www/adminer/

Puis faire un lien index.php

ln -s /var/www/adminer/adminer-4.2.3-mysql-en.php /var/www/adminer/index.php

Installation de nginx et de php-fpm

apt-get install nginx php-fpm php5-mysqlnd

Conf Nginx

/etc/nginx/sites-available/adminer

server {
        listen          8081;
 
        location / {
                root   /var/www/adminer;
                index  index.php index.html index.htm;
        }
 
 
        location ~ \.php$ {
                root           /var/www/adminer;
                fastcgi_index  index.php;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                #include fastcgi_params;
                include fastcgi.conf;
        }
}
ln -s /etc/nginx/sites-available/adminer /etc/nginx/sites-enabled/adminer
nginx -t
service nginx reload 

Connexion

Ici nous ferons un tunnel SSH pour nous connecter

ssh -L8081:localhost:8081 mysql-server

Allez sur http://localhost:8081 est renseigner le compte MySQL souhaité (allro dans notre exemple)

2025/03/24 15:06

Notes slurm-web et pyslurm

apt-get install debhelper apache2-dev node-uglify
apt-get install libslurm-dev python-dev
apt-get install libslurmdb-dev
apt-get install devscripts
apt-get install python-flask
apt-get install ClusterShell
apt-get install fakeroot
apt-get install python-pip
apt-get install cython 
apt-get install apache2
apt-get install libapache2-mod-wsgi
apt-get install npm
 
# apt-get install libjs-bootstrap libjs-jquery-flot libjs-jquery-tablesorter libjs-requirejs libjs-requirejs-text libjs-three libjs-bootstrap-typeahead libjs-bootstrap-tagsinput libjs-d3
cat > /etc/apt/sources.list.d/debian-stretch.list <<EOF 
deb ftp://ftp.fr.debian.org/debian stretch main contrib
deb-src ftp://ftp.fr.debian.org/debian stretch main contrib
 
deb http://security.debian.org/ stretch/updates main contrib
deb-src http://security.debian.org/ stretch/updates main contrib
EOF
 
apt-get clean
apt-get update
 
apt-get install $(dpkg -l |grep slurm | grep ^ii |awk '{print $2}')
 
rm -f /etc/apt/sources.list.d/debian-stretch.list
apt-get clean
apt-get update
git clone https://github.com/gingergeeks/pyslurm
cd pyslurm
pyslurm/setup.py
- __max_slurm_hex_version__ = "0x0f0803"
+ __max_slurm_hex_version__ = "0x0f0809"

-DEFAULT_SLURM = '/usr'
+DEFAULT_SLURM = '/tmp'
 SLURM_DIR = SLURM_LIB = SLURM_INC = ''
+SLURM_INC='/usr/include'
+SLURM_LIB='/usr/lib/x86_64-linux-gnu'
git clone https://github.com/edf-hpc/libjs-bootstrap-typeahead
cd libjs-bootstrap-typeahead/
debuild -us -uc -b
dpkg -i ../libjs-bootstrap-typeahead_0.11.1-1_all.deb
 
git clone https://github.com/edf-hpc/libjs-bootstrap-tagsinput
cd libjs-bootstrap-tagsinput/
debuild -us -uc -b
dpkg -i ../libjs-bootstrap-tagsinput_0.5.0-1_all.deb
 
apt-get -f install
debuild -us -uc -b
sudo dpkg -i ../python-pyslurm*.deb
a2enmod wsgi 
a2enconf javascript-common
a2enconf slurm-web-*
service apache2 reload
2025/03/24 15:06

Notes sites Web statiques - Static site generators - SSG

MkDocs

Voir aussi :

  • ReadTheDocs

Voir :

Nessaire avec Material ?

Les des plugins

$ ls -1 lib/python3.11/site-packages/material/plugins/
__init__.py
__pycache__
blog                                                
group
info                                                 
offline
privacy
search
social
tags

mkdocs.yml

site_name: My Docs
theme:
  name: material
  features:
    - content.code.copy
    - content.code.annotate
 
#markdown_extensions:
#  - codehilite
markdown_extensions:
  - pymdownx.highlight:
      anchor_linenums: true
      line_spans: __span
      pygments_lang_class: true
  - pymdownx.inlinehilite
  - pymdownx.snippets
  - pymdownx.superfences

plugins:
  - tags
  - search
  - offline
  - blog:
      enabled: false
      #blog_toc: true
  - privacy
  # - protects
  # - meta

Web - Générateur de sites statiques

Hugo (Go)

Jekyll (Ruby)

Hexo (NodeJS)

11ty / Eleventy (NodeJS)

Web blog statique compilé

Site web statique, généré et compilé. Séparation forme et contenu. «Gitable» !

avec Ruhoh

Documentation Pandoc et autres

Langage de balisage léger

https://wooster.checkmy.ws/2014/02/markdown-interets-limites-alternatives/

Tester pandoc en ligne :

Pandoc
Cet outil vous permettra de convertir les fiches en un fichier docx ou bien un document HTML.

Pour générer un fichier .docx

pandoc -s --toc --toc-depth=1 -o Guide_RGPD_developpeur.docx [0-9][0-9]*.md

Pour générer un fichier .html

pandoc -s --template="templates/mytemplate.html" -H templates/pandoc.css  -o index.html README.md [0-9][0-9]*.md
Autres Pandoc
pandoc -f odt MadewithCreativeCommonsmostup-to-dateversion.odt -t markdown > MadewithCreativeCommonsmostup-to-dateversion.md
Éditeur balisage léger

Autres

A voir également

Des blogs dynamiques, mais sans base de données :

FIXME

2025/03/24 15:06

Notes serveur ssh openssh sshd config

ssh Autoriser que les connexions en root depuis seulement un ou deux serveurs de rebond

sed -i.bak -e 's/^PermitRootLogin.*/PermitRootLogin no/' /etc/ssh/sshd_config
cat <<EOF >>/etc/ssh/sshd_config
Match Address 192.168.1.32,192.168.1.15
        PermitRootLogin yes
EOF
 
service ssh restart

Notes : Il est aussi possible d'utilisaser la notation CIDR :

/etc/ssh/sshd_config

Match Address 192.0.2.128/25,10.10.10.32/27

Voir https://raymii.org/s/tutorials/Limit_access_to_openssh_features_with_the_Match_keyword.html

Autres

# Example of overriding settings on a per-user basis
#Match User anoncvs
#       X11Forwarding no
#       AllowTcpForwarding no
#       PermitTTY no
#       ForceCommand cvs server
2025/03/24 15:06

Notes serveur DNS Unbound

Voir :

Voir aussi :

Exemple sur RedHat

Fix Unbound is very slow to start

/etc/sysconfig/unbound

DISABLE_UNBOUND_ANCHOR=yes

Conf Unbound en resolveur avec Cache DNS

/etc/unbound/unbound.conf

server:
        #verbosity: 1
        #use-syslog: no
        #module-config: "subnetcache validator iterator"

        interface: 127.0.0.53
        #interface: ::0
 
        #prefer-ip4: yes
        #prefer-ip6: no
        do-ip4: yes
        do-ip6: no
        #do-tcp: yes

        access-control: 127.0.0.0/8 allow
        #cache-min-ttl: 3600
        #cache-max-ttl: 86400
        cache-max-negative-ttl: 1
        #prefetch: yes
        #serve-expired: yes
        #serve-expired-ttl: 14400
        #qname-minimisation: yes # Default yes
        #minimal-responses: yes  # Default yes
        #rrset-roundrobin: yes   # Default yes

forward-zone:
        name: "."
        forward-addr: 8.8.8.8
        forward-addr: 8.8.4.4
unbound-checkconf
systemctl enable --now unbound.service

Conf autres

Administration

Source : https://gist.github.com/f9n/3c4453489820f150c81bdf2f1ccd9516

Verify configuration

unbound-checkconf

Unbound Status

unbound-control status

List Forwards

unbound-control list_forwards

Lookup on Cache

unbound-control lookup youtube.com

Dump Cache

unbound-control dump_cache > dns-cache.txt

Restore Cache

unbound-control load_cache < dns-cache.txt

Flush Cache

# Flush Specific Host
unbound-control flush www.youtube.com
 
# Flush everything
unbound-control flush_zone .
Diag

Increase logged verbosity only runtime

unbound-control verbosity 3

Print operational statistics numbers.

unbound-control stats

Print used root server hints

unbound-control list_stubs

Print contacted servers details. Useful to read how fast they respond and what features they support.

unbound-control dump_infra

Test DNSSEC status of host

unbound-host -rv example.net -D

Autres

Essaie de surcharger la conf /etc/unbound/unbound.conf (RedHat)

/etc/unbound/cond.d/common.conf

server:
        #trust-anchor-file: ""
        #auto-trust-anchor-file: ""
        #trust-anchor: ""
        #trusted-keys-file: ""
        #val-permissive-mode: yes
        #prefetch: no
        #disable-dnssec-lame-check: no
        #harden-dnssec-stripped: no
        #harden-glue: no
        #harden-below-nxdomain: no
        #harden-referral-path: no
2025/03/24 15:06
blog.txt · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki