141 lines
1.3 KiB
Markdown
141 lines
1.3 KiB
Markdown
---
|
|
categories: system
|
|
title: Howto Checkconf
|
|
...
|
|
|
|
Avant de redémarrer un daemon, il vaut mieux s'assurer que sa
|
|
configuration est correcte. Cette page se veut être une cheat sheet
|
|
des différentes commandes existantes.
|
|
|
|
Le classement est fait par rapport au port réservé pour le logiciel
|
|
puis par ordre alphabétique.
|
|
|
|
# sudo
|
|
|
|
~~~
|
|
# visudo -cf /etc/sudoers
|
|
~~~
|
|
|
|
|
|
# FTP
|
|
|
|
## proftpd
|
|
|
|
~~~
|
|
# proftpd -t
|
|
Checking syntax of configuration file
|
|
Syntax check complete.
|
|
~~~
|
|
|
|
# SSH
|
|
|
|
## OpenSSH
|
|
|
|
Pour valider la configuration du serveur SSH :
|
|
|
|
~~~
|
|
# sshd -T -f /etc/ssh/sshd_config
|
|
~~~
|
|
|
|
Pour valider une clé publique :
|
|
|
|
~~~
|
|
# ssh-keygen -l -f .ssh/id_rsa.pub
|
|
~~~
|
|
|
|
# Mail
|
|
|
|
## OpenSMTPD
|
|
|
|
|
|
~~~
|
|
# smtpd -n
|
|
|
|
~~~
|
|
|
|
## Postfix
|
|
|
|
~~~
|
|
# postconf >/dev/null
|
|
|
|
~~~
|
|
|
|
# DNS
|
|
|
|
## Bind
|
|
|
|
~~~
|
|
# named-checkzone domain /path/to/zone
|
|
# named-checkconf /etc/bind/named.conf
|
|
|
|
~~~
|
|
|
|
## NSD
|
|
|
|
~~~
|
|
# nsd-checkconf /var/nsd/etc/nsd.conf
|
|
|
|
~~~
|
|
|
|
## Unbound
|
|
|
|
~~~
|
|
# unbound-checkconf /var/unbound/etc/unbound.conf
|
|
|
|
~~~
|
|
|
|
# HTTP
|
|
|
|
## Apache
|
|
|
|
~~~
|
|
# apachectl -t
|
|
|
|
~~~
|
|
|
|
## Haproxy
|
|
|
|
~~~
|
|
# haproxy -c -f /etc/haproxy/haproxy.cfg
|
|
|
|
~~~
|
|
|
|
## httpd
|
|
|
|
~~~
|
|
# httpd -dnv
|
|
|
|
~~~
|
|
|
|
## Nginx
|
|
|
|
~~~
|
|
# nginx -t
|
|
|
|
~~~
|
|
|
|
## Varnish
|
|
|
|
~~~
|
|
# varnishd -Cf /etc/varnish/default.vcl > /dev/null
|
|
|
|
~~~
|
|
|
|
# Imap / pop
|
|
|
|
## Dovecot
|
|
|
|
~~~
|
|
# doveconf -n > /dev/null
|
|
|
|
~~~
|
|
|
|
# BGP
|
|
|
|
## OpenBGPD
|
|
|
|
~~~
|
|
# bgpd -nf /etc/bgpd.conf
|
|
|
|
~~~
|