1/ Mise-à-jour du système.
root@station01:/usr/home/util01 # freebsd-update fetch
2/ Configuration de la carte réseau.
- Configuration :
Ouvrir :
/etc/rc.conf
Chercher :
ifconfig_re0="DHCP"
Remplacer par :
ifconfig_em0="DHCP"
- Redémarrer le réseau :
# /etc/netstart
- Vérification :
# ifconfig
...
ether 192.168.1.46
...
- Connexion 'ssh' :
util01@station66:~$ ssh util01@192.168.1.46
Password for util01@station01:
Last login: Wed Feb 9 21:57:36 2022 from pc64.home
FreeBSD 13.0-RELEASE (GENERIC) #0 releng/13.0-n244733-ea31abc261f: Fri Apr 9 04:24:09 UTC 2021
Welcome to FreeBSD!
...
util01@station01:~ $
3/ Installation de 'sudo'.
- Installation du paquet :
root@statin01 # pkg install sudo
- Lancement de 'sudo' :
# visudo
- Configuration :
Chercher :
root ALL=(ALL) ALL
Ajouter après :
util01 ALL=(ALL) ALL
- Test :
util01@station01:~ $ sudo su
Password:
root@station01:/usr/home/util01 #
4/ Installation des ports.
root@station01:/usr/home/util01 # portsnap fetch extract update
5/ Installation des paquets de base.
root@station01:/usr/home/util01 # pkg install vim
root@station01:/usr/home/util01 # pkg install mc
root@station01:/usr/home/util01 # pkg install screen
root@station01:/usr/home/util01 # pkg install htop
6/ Configuration du miroir FreeBSD.
- Compilation de l'utilitaire 'fastest_pkg' :
root@station01:/usr/home/util01 # cd /usr/ports/ports-mgmt/fastest_pkg/
root@station01:/usr/ports/ports-mgmt/fastest_pkg #
- Installation :
root@station01:/usr/ports/ports-mgmt/fastest_pkg # make install clean
- Lancement :
root@station01:/usr/ports/ports-mgmt/fastest_pkg # time /usr/local/bin/fastest_pkg
- Configuration :
root@station01:/usr/ports/ports-mgmt/fastest_pkg # mkdir -p /usr/local/etc/pkg/repos/
root@station01:/usr/ports/ports-mgmt/fastest_pkg # echo 'FreeBSD: { url: "http://pkg0.bme.freebsd.org/${ABI}/quarterly" }' \
> /usr/local/etc/pkg/repos/FreeBSD.conf
- Nettoyage :
root@station01:/usr/home/util01 # pkg clean
root@station01:/usr/home/util01 # rm -rf /var/cache/pkg/*
root@station01:/usr/home/util01 # pkg update -f
7/ Installation de XFCE.
- Installation des paquets XFCE.
pkg install -y xorg
pkg install -y xfce
pkg install -y slim
pkg install -y slim-themes
- Script d'extinction et de suspension du système.
Créer :
/usr/local/etc/polkit-1/rules.d/shutdown.rules
Ajouter :
# Shutdown
polkit.addRule(function (action, subject) {
if ((action.id == "org.freedesktop.consolekit.system.restart" ||
action.id == "org.freedesktop.consolekit.system.stop")
&& subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});
# Suspend
polkit.addRule(function (action, subject) {
if (action.id == "org.freedesktop.consolekit.system.suspend"
&& subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});
- Configuration de XFCE.
sysrc dbus_enable=yes
sysrc hald_enable=yes
sysrc slim_enable=yes
sysrc sound_load=yes
sysrc snd_hda_load=yes
- Configuration du démarrage de XFCE.
Créer :
/home/util01/.xinitrc
Ajouter
exec startxfce4
- Redémarrer le système :
# reboot
8/ Configuration de XFCE.
root@station01:/usr/home/util01 # pkg install -y xfce4-goodies
root@station01:/usr/home/util01 # pkg install -y xfce4-pulseaudio-plugin