samedi 28 décembre 2013

Désactiver SElinux sous Centos / RHEL

Activer ou désactiver selinux. Aller dans le fichier /etc/selinux/config puis mettre l’entrée SELINUX à disabled
# vi /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=enforcing
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted
Fichier après la modification
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of these two values:
#     targeted - Targeted processes are protected,
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted
On redémarre ensuite la machine.

jeudi 19 décembre 2013

Linux: afficher la taille des fichiers et des répertoires

Pour afficher la taille des fichiers et des répertoires, on peut utiliser la commande du:
linux# du -hs *
9,1M bin
130M boot
4,0K cdrom
4,0K dev
69M etc
...

Comment ajouter une route statique sur une distribution Linux Ubuntu

Pour ajouter une route statique au démarrage d'Ubuntu, voici le fichier à modifier. Dans l'exemple on ajoute une route pour joindre ...