L’installation de Rsylog sera effectuée sur la machine du MODOP précèdent concernant l’installation de Arch linux via la ligne de commande.
1°) Installation Paquets nécessaires
[root@archlinux /]# pacman -S bison [root@archlinux /]# pacman -S flex [root@archlinux /]# pacman -S automake [root@archlinux /]# pacman -S libtool [root@archlinux /]# pacman -S autoconf [root@archlinux /]# pacman -S glibc [root@archlinux /]# pacman -S gcc [root@archlinux /]# pacman -S pkg-config
2°) Installation des repository archstrike
Configuration repository
[root@archlinux tmp]# vi /etc/pacman.conf
Ajouter
[archstrike] Server = https://mirror.archstrike.org/$arch/$repo
Ajout des certificats/clefs
[root@archlinux tmp]# pacman -Syy [root@archlinux tmp]# pacman-key --init [root@archlinux tmp]# dirmngr < /dev/null [root@archlinux tmp]# wget https://archstrike.org/keyfile.asc [root@archlinux tmp]# pacman-key --add keyfile.asc [root@archlinux tmp]# pacman-key --lsign-key 9D5F1C051D146843CDA4858BDE64825E7CBC0D51
[root@archlinux tmp]# pacman -S archstrike-keyring [root@archlinux tmp]# pacman -S archstrike-mirrorlist
Complément de paquets
[root@archlinux tmp]# pacman -Syu libestr [root@archlinux tmp]# pacman -S libfastjson [root@archlinux tmp]# pacman -S make
3°) Installation rsyslog
Récupération du paquet
[root@archlinux home]# cd /tmp [root@archlinux tmp]# pacman -S wget [root@archlinux tmp]# wget https://github.com/rsyslog/rsyslog/archive/v8.2102.0.tar.gz [root@archlinux tmp]# tar xzvf v8.2102.0.tar.gz [root@archlinux tmp]# cd rsyslog-8.2102.0
Compilation de rsyslog pour Arch
[root@archlinux rsyslog-8.2102.0]# autoreconf -ivf [root@archlinux rsyslog-8.2102.0]# ./configure --enable-imfile --disable-uuid --disable-generate-man-pages --enable-imdiag --enable-omruleset [root@archlinux rsyslog-8.2102.0]# make [root@archlinux rsyslog-8.2102.0]# make install
4°) Création du Service rsyslog
[root@archlinux rsyslog-8.2102.0]# vi /usr/lib/systemd/system/rsyslog.service [Unit] Description=System Logging Service ;Requires=syslog.socket Wants=network.target network-online.target After=network.target network-online.target Documentation=man:rsyslogd(8) Documentation=https://www.rsyslog.com/doc/ [Service] Type=notify EnvironmentFile=-/usr/local/lib/rsyslog ExecStart=/usr/local/sbin/rsyslogd -n $SYSLOGD_OPTIONS Restart=on-failure UMask=0066 StandardOutput=null Restart=on-failure # Increase the default a bit in order to allow many simultaneous # files to be monitored, we might need a lot of fds. LimitNOFILE=16384 [Install] WantedBy=multi-user.target ;Alias=syslog.service
[root@archlinux rsyslog-8.2102.0]# ln -s /usr/lib/systemd/system/rsyslog.service /etc/systemd/system/multi-user.target.wants/rsyslog.service
5°) Configuration/Lancement
[root@archlinux rsyslog-8.2102.0]# cp /tmp/rsyslog-8.2102.0/platform/redhat/rsyslog.conf /etc/rsyslog.conf
[root@archlinux rsyslog-8.2102.0]# systemctl enable rsyslog [root@archlinux rsyslog-8.2102.0]# systemctl start rsyslog [root@archlinux rsyslog-8.2102.0]# systemctl status rsyslog
[root@archlinux rsyslog-8.2102.0]# touch /var/log/spooler [root@archlinux rsyslog-8.2102.0]# touch /var/log/cron [root@archlinux rsyslog-8.2102.0]# touch /var/log/boot.log [root@archlinux rsyslog-8.2102.0]# touch /var/log/secure
[root@archlinux /]# systemctl restart rsyslog
Check de logs
[root@archlinux /]# tail -f /var/log/secure
[root@archlinux /]# tail -f /var/log/messages
Views: 18