Debian - Configurations et customisations de post-installation

De SeRoM - Wiki
Aller à : navigation, rechercher

Cette page à pour but de conservé dans un article indépendant les étapes de customisations que j'ai l'habitude d'appliquer sur une machine Debian.

Post Installation

Pour une station de travail:

aptitude install xorg xserver-xorg x-window-system-core gnome3-session gdm3 network-manager network-manager-gnome ssh \ 
openoffice.org openoffice.org-l10n-fr gedit evince iceweasel iceweasel-l10n-fr flashplugin-nonfree openjdk-6-jre \ 
file-roller unrar gcalctool gnome-terminal gnome-screenshot gthumb gimp inkscape xchat empathy gtg frozen-bubble parted \
sudo ffmpeg sound-juicer vlc

Pour un serveur:

aptitude install ssh sudo vim

Configurations génériques

sshd

 ~# vim /etc/ssh/sshd_config
     PermitRootLogin no
 ~# systemctl restart ssh

IPTables + Fail2ban

Sur les machines serveurs:

 ~# apt install iptables-persistent fail2ban 
 ~# mv /etc/fail2ban/fail2ban.conf /etc/fail2ban/fail2ban.conf.orig
 ~# scp user@my-previous-server.org:/etc/fail2ban/fail2ban.conf /etc/fail2ban/fail2ban.conf
 ~# mv /etc/fail2ban/jail.conf /etc/fail2ban/jail.conf.orig
 ~# scp user@my-previous-server.org:/etc/fail2ban/jail.conf /etc/fail2ban/jail.conf
 ~# systemctl status netfilter-persistent.service

rSyslog

 ~# vim /etc/rsyslog.conf
     (-) *.*;auth,authpriv.none          -/var/log/syslog
     (+) *.*                 -/var/log/syslog
 ~# systemctl restart rsyslog

Configurations génériques d’ergonomie

vim

 ~# apt install vim
 ~# vim /etc/vim/vimrc
     syntax on
     set nu
     set tabstop=4

Bash

 ~# mv /etc/bash.bashrc /etc/bash.bashrc.orig
 ~# scp user@my-previous-server.org:/etc/bash.bashrc /etc/bash.bashrc
 ~# vim /home/user/.bashrc
     #if [ "$color_prompt" = yes ]; then
     #    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
     #else
     #    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
     #fi