18
0
Fork 0
wiki/HowtoCheckconf.md

186 lines
1.6 KiB
Markdown
Raw Normal View History

2017-03-31 00:43:51 +02:00
---
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.
2017-03-31 00:47:48 +02:00
# sudo
~~~
# visudo -cf /etc/sudoers
~~~
2017-03-31 00:43:51 +02:00
# FTP
## proftpd
~~~
2017-03-31 00:48:27 +02:00
# proftpd -t
Checking syntax of configuration file
Syntax check complete.
2017-03-31 00:43:51 +02:00
~~~
# SSH
## OpenSSH
Pour valider la configuration du serveur SSH :
2017-03-31 00:43:51 +02:00
~~~
2017-03-31 00:44:34 +02:00
# sshd -T -f /etc/ssh/sshd_config
2017-03-31 00:43:51 +02:00
~~~
Pour valider une clé publique :
~~~
# ssh-keygen -l -f .ssh/id_rsa.pub
~~~
2017-03-31 00:43:51 +02:00
# Mail
## OpenSMTPD
~~~
2017-05-24 20:48:31 +02:00
# smtpd -n
2017-03-31 00:43:51 +02:00
~~~
## Postfix
~~~
2017-03-31 00:51:46 +02:00
# postconf >/dev/null
2017-03-31 00:43:51 +02:00
~~~
## Spamassasin
~~~
spamassassin --lint
~~~
2017-03-31 00:43:51 +02:00
# DNS
## Bind
~~~
# named-checkzone domain /path/to/zone
# named-checkconf /etc/bind/named.conf
~~~
## NSD
~~~
2017-05-24 20:48:38 +02:00
# nsd-checkconf /var/nsd/etc/nsd.conf
2017-03-31 00:43:51 +02:00
~~~
## Unbound
~~~
2017-03-31 21:18:41 +02:00
# unbound-checkconf /var/unbound/etc/unbound.conf
2017-03-31 00:43:51 +02:00
~~~
# HTTP
## Apache
~~~
# apachectl -t
2018-01-28 17:54:01 +01:00
# apachectl configtest
2017-03-31 00:43:51 +02:00
~~~
## Haproxy
~~~
2017-06-05 16:38:20 +02:00
# haproxy -c -f /etc/haproxy/haproxy.cfg
2017-03-31 00:43:51 +02:00
~~~
## httpd
~~~
2017-03-31 00:47:51 +02:00
# httpd -dnv
2017-03-31 00:43:51 +02:00
~~~
## Nginx
~~~
# nginx -t
~~~
2018-01-23 23:05:53 +01:00
## Php
~~~
# php5-fpm -t
~~~
2017-03-31 00:43:51 +02:00
## Varnish
~~~
# varnishd -Cf /etc/varnish/default.vcl > /dev/null
~~~
## Samba
~~~
# testparm
~~~
2017-08-25 10:45:34 +02:00
## Squid3
~~~
# squid -k parse
~~~
2017-03-31 00:43:51 +02:00
# Imap / pop
## Dovecot
~~~
2017-05-24 20:50:22 +02:00
# doveconf -n > /dev/null
2017-03-31 00:43:51 +02:00
~~~
# BGP
## OpenBGPD
~~~
# bgpd -nf /etc/bgpd.conf
2017-03-31 21:18:41 +02:00
~~~
2018-01-28 17:54:01 +01:00
# IRC
## Charybdis
~~~
$ charybdis-ircd -conftest
2018-02-13 11:56:17 +01:00
~~~
# Networking
2018-01-28 17:54:01 +01:00
~~~
2018-02-13 11:56:17 +01:00
# ifup --no-act eth0
2018-06-12 03:10:26 +02:00
~~~
# CUPS
~~~
# cupsd -t -c test.conf
~~~