Outils pour utilisateurs

Outils du site


blog

Install de Munin sur RedHat /CentOS

Source : http://tecadmin.net/installing-munin-in-centos-rhel-and-fedora/

Install

yum install epel-release
yum --enablerepo=epel install munin munin-node rrdtool

Changement binding sur localhost (inutile d'écouter sur les cartes réseaux, car on communique en localhost)

sed -i -e 's/^host \*/host 127.0.0.1/' /etc/munin/munin-node.conf

Création MDP

htpasswd -cm /etc/munin/munin-htpasswd muninadmin

Nous ajoutons dans le fichier /etc/httpd/conf.d/munin.conf la ligne suivante :

/etc/httpd/conf.d/munin.conf

Alias /munin /var/www/html/munin

Sur ma conf j'ai dû aussi ajouter un DirectoryIndex index.html

Normalement ça devrait ressembler à :

/etc/httpd/conf.d/munin.conf

# This file can be used as a .htaccess file, or a part of your apache
# config file.
#
# For the .htaccess file option to work the munin www directory
# (/var/www/html/munin) must have "AllowOverride all" or something close
# to that set.
#
# As a config file enclose it in <directory> like so:
#
<directory /var/www/html/munin>
 
AuthUserFile /etc/munin/munin-htpasswd
AuthName "Munin"
AuthType Basic
require valid-user
 
# This next part requires mod_expires to be enabled.
#
# We could use <IfModule mod_expires> around here, but I want it to be
# as evident as possible that you either have to load mod_expires _or_
# you coment out/remove these lines.
 
# Set the default expiery time for files 5 minutes 10 seconds from
# their creation (modification) time.  There are probably new files by
# that time.
 
ExpiresActive On
ExpiresDefault M310
# Ajout
DirectoryIndex index.html
 
</directory>
ScriptAlias /munin-cgi/munin-cgi-graph /var/www/cgi-bin/munin-cgi-graph
<Location /munin-cgi/munin-cgi-graph>
  AuthUserFile /etc/munin/munin-htpasswd
  AuthName "Munin"
  AuthType Basic
  require valid-user
</Location>
 
# Ajout
Alias /munin /var/www/html/munin
systemctl enable munin-node
systemctl start munin-node

En vérifie que la conf est ok

apachectl -t

Si ok

systemctl reload httpd

NB, les graphes sont générés grâce à la cron /etc/cron.d/munin

Notes brouillon

CentOS6

MySQL
ln -s /usr/share/munin/plugins/mysql_* /etc/munin/plugins/
service munin-node restart

/etc/munin/plugin-conf.d/munin-node

[diskstats]
user munin

[iostat_ios]
user munin

[mysql*]
user root
env.mysqlopts --defaults-extra-file=/var/lib/munin/.my.cnf

/var/lib/munin/.my.cnf

[mysqldump]
user=root
password=P@ssw0rd
 
[mysql]
user=root
password=P@ssw0rd
 
[mysqladmin]
user=root
password=P@ssw0rd
 
[mysqlshow]
user=root
password=P@ssw0rd
chown munin:munin /var/lib/munin/.my.cnf
chmod 600 /var/lib/munin/.my.cnf
service munin-node restart
Apache

/etc/httpd/conf/httpd.conf

LoadModule status_module modules/mod_status.so
 
ExtendedStatus On
 
<Location /server-status>
    SetHandler server-status
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1 ::1
</Location>
service httpd restart
ln -s /usr/share/munin/plugins/apache_* /etc/munin/plugins/
service munin-node restart

Pb MySQL bug : mysql innodb free tablespace

Voir :

Test

su - munin -s /bin/bash
cd /etc/munin/plugins
./mysql_innodb

Erreur

./mysql_innodb: Error: No visible tables use InnoDB
free.value U

Désactiver la sonde

unlink /etc/munin/plugins/mysql_innodb
service munin-node restart
2025/03/24 15:06

Installer LibreOffice sur MacOSX 10.6.8

La bonne version, c'est la dernière 4.3.3 (aujourd'hui la 4.3.3.2) :

Après il ne semble plus exister de version 32bits pour Mac.

En cas de doute, sur le fait que c'est version n'est pas obsolète (niveau sécurité) il est raisonnable de prendre la même version de LibreOffice qu'une Debian Stable.

https://packages.debian.org/stable/libreoffice

2025/03/24 15:06

Ansible Ping ICMP

Voir aussi Test ping et win_ping cibles Ansible rapport CSV

M(net_ping) semble être pour les composants réseaux tel que des routers. Il est vrai que dans la mesure du possible il vaut mieux n’utiliser les modules M(command), M(shell) etc… que par parcimonie mais dans la cas présent, si c’est pour pinguer un serveur depuis l’Execution Node ou depuis un serveur Linux cela semble approprié. Voici un exemple :

- hosts: all
  gather_facts: False
 
  tasks:
 
    - name: ping
      command: ping -c 1 -w 2 192.168.2.10
      ignore_errors: true
      changed_when: false
      check_mode: false

PS : le module M(wait_for) peut dans certains cas faire l’affaire (ping de port TCP)

2025/03/24 15:06

Install GNU/Linux sur Acer Aspire ES1-531-P1UK

http://acer-fr.custhelp.com/app/answers/detail/a_id/28031/~/comment-activer-et-d%C3%A9sactiver-secure-boot

http://acer--uk.custhelp.com/app/answers/detail/a_id/27071/~/how-to-enable-or-disable-secure-boot

    Completely shut down your computer.
    Power on the system. As soon as the first logo screen appears, immediately press F2 to enter the BIOS.
    Use the right arrow key to select Security.
    Use the down arrow key to highlight Set Supervisor Password and press Enter.
    Create a password and press Enter. Retype the password to confirm and press Enter again.
    Use the right arrow key to select Boot.
    Press the down arrow key to select Secure Boot and press Enter.
    With the arrow key, highlight Disabled and press Enter.
    Press the F10 key and select Yes to save the changes and exit the BIOS.

Merci à celui qui a fait cette vidéo :)

2025/03/24 15:06

Install drivers graphique propriétaire Nvidia CUDA

glxinfo

glxinfo

Les lignes intéressantes du glxinfo sont: direct rendering: Yes OpenGL vendor string: nouveau

Install Drivers + CUDA8 sur Debian Jessie (Debian 8)

Install des dépendances

apt-get update
apt-get install build-essential binutils g++ mpich2 libxmu-dev libxi-dev linux-headers-$(uname -r)

Install de Cuda

cp *.run /root/
cd /root/
./cuda_8.0.44_linux.run
export PATH=$PATH:/usr/local/cuda/bin/
echo "export PATH=$PATH:/usr/local/cuda/bin" >> ~/.bashrc
 
#export LD_LIBRARY_PATH=/usr/local/cuda/lib64/:$LD_LIBRARY_PATH
echo "/usr/local/cuda/lib64" > /etc/ld.so.conf.d/cuda.conf
ldconfig

Redémarrage, car le drivers Libre est encore chargé

lsmod |grep nouveau
reboot

Le driver Libre nouveau n'est plus chargé

lsmod |grep nouveau

Grâce à /etc/modprobe.d/nvidia-installer-disable-nouveau.conf

/etc/modprobe.d/nvidia-installer-disable-nouveau.conf

# generated by nvidia-installer
blacklist nouveau
options nouveau modeset=0
sudo update-initramfs -u

Install des derniers drivers

systemctl stop gdm
./NVIDIA-Linux-x86_64-375.20.run

On redémarre

reboot

Install de Cuda Docker

l faut désinstaller tous les paquets Debian cuda et nvidia :

#apt-get purge $(dpkg -l |egrep 'cuda|nvidia' |grep ^ii |awk '{print $2}')
apt purge 'nvidia-*'

Install de CUDA

./cuda_9.2.88_396.26_linux.run
./cuda_9.2.88.1_linux.run # Patch nvidia
echo 'export PATH=$PATH:/usr/local/cuda/bin' |sudo tee /etc/profile.d/cuda.sh
echo "/usr/local/cuda/lib64" |sudo tee /etc/ld.so.conf.d/cuda.conf
sudo ldconfig

/etc/apt/sources.list.d/nvidia-docker.list

deb https://nvidia.github.io/libnvidia-container/debian9/$(ARCH) /
deb https://nvidia.github.io/nvidia-container-runtime/debian9/$(ARCH) /
deb https://nvidia.github.io/nvidia-docker/debian9/$(ARCH) /

Installer nvidia-docker2

sudo apt-get update
sudo apt-get install nvidia-docker2
nvidia-docker run -it -p 8888:8888 tensorflow/tensorflow:latest-gpu

Vérif

On vérif que le driver en chargé

lsmod |grep nvidia
nvidia-smi && echo OK
nvidia-smi topo -m
nvcc --version
sudo apt-get install clinfo
clinfo
sudo apt-get install pyrit
pyrit list_cores
cat /proc/driver/nvidia/version
NVRM version: NVIDIA UNIX x86_64 Kernel Module  375.20  Tue Nov 15 16:49:10 PST 2016
GCC version:  gcc version 4.9.2 (Debian 4.9.2-10)

En root

cd /usr/local/cuda/samples/1_Utilities/deviceQuery
make
./deviceQuery
cd /usr/local/cuda/samples/1_Utilities/bandwidthTest
make
/usr/local/cuda/samples/bin/x86_64/linux/release/bandwidthTest

cudnn

Install

Voir :

Unzip the cuDNN package.

tar -xzvf cudnn-10.2-linux-x64-v7.6.5.32.tgz

Copy the following files into the CUDA Toolkit directory, and change the file permissions.

sudo cp cuda/include/cudnn.h /usr/local/cuda/include
sudo cp cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn.h /usr/local/cuda/lib64/libcudnn*

Needed ?

sudo apt-get install libcupti-dev 

ou

# the runtime library
sudo dpkg -i libcudnn7_7.0.5.15–1+cuda9.0_amd64.deb
 
# the developer library
sudo dpkg -i libcudnn7-dev_7.0.5.15–1+cuda9.0_amd64.deb
 
# the code samples
sudo dpkg -i libcudnn7-doc_7.0.5.15–1+cuda9.0_amd64.deb
Autres

~/.bashrc

# put the following line in the end or your .bashrc file
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/extras/CUPTI/lib64"
sudo ldconfig
Test

Voir : http://www.robot.t.u-tokyo.ac.jp/~miyagusuku/deeplearning,/install/2018/10/01/dlbox_install.html

cp -r /usr/src/cudnn_samples_v7/ ~
cd ~/cudnn_samples_v7/mnistCUDNN
make clean && make
./mnistCUDNN

Autres

cd /usr/local/cuda/samples/5_Simulations/nbody
make
GLPATH=/usr/lib make
GLPATH=/usr/lib/x86_64-linux-gnu make
./nbody -benchmark -numbodies=256000 -device=0
 
apt-get install gcc g++ gcc-4.8 g++-4.8 gcc-4.9 g++-4.9 libxi6 libxi-dev libglu1-mesa libglu1-mesa-dev libxmu6 linux-headers-amd64 linux-source freeglut3-dev

Voir https://andrewbolster.info/2016/04/fixcuda-on-debian-jessie

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