
:: Installation Calculate Directory Server sur un hôte KVM/qemu ::
Création de la machine virtuelle
La machine virtuelle est créée via virt-manager, avec la configuration suivante :
- Disque virtio 40Go minimum (cf. note sur partitionnement automatique)
- Image cds-18.12-x86_64.iso montée sur le lecteur cdrom
- Ordre de démarrage : cdrom puis disque
Installation de Calculate Directory Server
Démarrer la vm en bootant sur le cdrom.
Au prompt root, charger le clavier fr :
# loadkeys fr
Partitionnement automatique
Note : pour que le partitionnement auto fonctionne, le disque doit avoir une taille minimale de 40Go.
# cl-install -D /dev/vda \
--locale 'fr_FR' \
--keymap 'fr_FR' \
--timezone 'Europe/Paris' \
--hostname 'hostname.domaine.local' \
--user username
Avec :
- -D : partitionnement automatique
- --locale : définition de la locale
- --keymap : localisation du clavier
- --timezone : choix du fuseau horaire
- --hostname : nom d'hôte
- --user : création d'un utilisateur
Partitionnement manuel
Dans ce cas, le partitionnement doit être effectué avant de lancer l'installation, par exemple à l'aide de fdisk
:
# fdisk /dev/vda
Une fois le partitionnement terminé, lancer l'installation en précisant les points de montage (ici, des partitions racine et home et une pour le swap)
# cl-install --locale 'fr_FR' \
--keymap 'fr_FR' \
--timezone 'Europe/Paris' \
--disk /dev/vda1 \
--disk /dev/vda3:/home \
--disk /dev/vda2:swap \
--hostname 'hostname.domaine.local' \
--user username
Avec :
- --locale : définition de la locale
- --keymap : localisation du clavier
- --timezone : choix du fuseau horaire
- --disk : définition des points de montage
- --hostname : nom d'hôte
- --user : création d'un utilisateur
Finalisation de l'installation
Renseigner les éléments demandés tels les mots de passe de l'utilisateur à créer et de root. Redémarrer la machine virtuelle à la fin de l'installation.
Configuration du serveur
Gestion d'applications
eix
cf.EIX
Mise à jour Portage
$ cl-update
Recherche
$ eix terme_de_recherche
$ eix iftop
* net-analyzer/iftop
Available versions: 1.0_pre4-r2 ~1.0_pre4-r3
Homepage: http://www.ex-parrot.com/pdw/iftop/
Description: display bandwidth usage on an interface
Installation
# emerge category/application
Serveur LDAP
Configuration
# cl-setup ldap
* WARNING: Executing of the program will change the configuration files and database of LDAP service.
If you are ready to continue executing the program, input 'yes', if not 'no': yes
* Erased LDAP Database ... [ ok ]
* Added ldif file ... [ ok ]
* LDAP service configured ... [ ok ]
Integration authentification LDAP à PAM
# cl-setup unix
* WARNING: Executing of the program will change the configuration files and database of LDAP service.
If you are ready to continue executing the program, input 'yes', if not 'no': yes
* Added ldif file ... [ ok ]
* Unix service configured ... [ ok ]
Gestion des utilisateurs
Après avoir configuré l'annuaire LDAP comme base de comptes Unix, utiliser les commandes alternatives suivantes pour gérer les utilisateurs :
Commande | Alternative |
---|---|
useradd (adduser) |
cl-useradd [options] user unix |
userdel |
cl-userdel [options] user unix |
usermod |
cl-usermod [options] user unix |
passwd |
cl-passwd [options] user unix |
groupadd |
cl-groupadd [options] user unix |
groupdel |
cl-groupdel [options] user unix |
groupmod |
cl-groupmod [options] user unix |
A noter le service qui doit être indiqué à la fin de la commande, avec comme services possibles :
unix | unix group |
---|---|
samba | samba group |
mail group | |
jabber | jabber group |
proxy | proxy group |
Serveur Samba
Configuration
# cl-setup -n hostname -w WORKGROUP samba
* WARNING: Executing of the program will change the configuration files of Samba service.
If you are ready to continue executing the program, input 'yes', if not 'no': yes
* Added ldif file ... [ ok ]
* Starting Samba ... [ ok ]
* Added user client in Unix service
* Added user client in Samba service
* Added user admin in Unix service
* Added user admin in Samba service
* Samba service configured ... [ ok ]
Mot de passe administrateur Samba
L'administrateur Samba est utilisé pour ajouter/supprimer des machines du domaine
# cl-passwd --smb admin samba
New password:
Retype new password:
* Samba password of user admin is changed
Administrateur de domaine
Créer un administrateur de domaine pour gérer les machines Windows et l'ajouter au groupe "Administateurs du domaine" (Domain Admins).
# cl-useradd -p --gid "Domain Admins" -c "Domain Admin" d_admin samba
Utilisateurs avec pouvoirs
Créer le groupe "Utilisateurs avec pouvoirs" (Power Users) afin d'accorder des privilèges étendus à certains utilisateurs Windows.
# cl-groupadd -g 547 --rid 547 -t 5 'Power Users' samba
Gestion des utilisateurs et groupes
Commande | Action |
---|---|
cl-info -u unix |
Liste des utilisateurs Unix |
cl-info -u samba |
Liste des utilisateurs Samba |
cl-info -U user1 unix |
Détail de l'utilisateur Unix user1 |
cl-info -U user1 samba |
Détail de l'utilisateur Samba user1 |
cl-info -g unix |
Liste des groupes Unix |
cl-info -g samba |
Liste des groupes Samba |
cl-info -G group unix |
Détail du groupe Unix 'group' |
cl-info -G 'Domain Users' samba |
Détail du groupe Samba 'Domain Users' |
Serveur de messagerie
Configuration
# cl-setup -t pop3,imap mail
* WARNING: Executing of the program will change the configuration files of Mail service (programs Postfix and Dovecot).
If you are ready to continue executing the program, input 'yes', if not 'no': yes
* Generating DH. This is going to take a long time ... [ ok ]
* Generating DH. This is going to take a long time ... [ ok ]
* Added ldif file ... [ ok ]
* Starting Postfix ... [ ok ]
* Starting Dovecot ... [ ok ]
* Mail service configured ... [ ok ]
Serveur Jabber
Configuration
# cl-setup jabber
* WARNING: Executing of the program will change the configuration files of Jabber service (program Ejabberd).
If you are ready to continue executing the program, input 'yes', if not 'no': yes
Enter the admin@willy.greenbee.lan password
New password:
Retype new password:
* Added user in Jabber service
* Added ldif file ... [ ok ]
* Generating DH. This is going to take a long time ... [ ok ]
* Starting Ejabberd ... [ ok ]
* Jabber service configured ... [ ok ]
Serveur FTP
Configuration
# cl-setup ftp
* WARNING: Executing of the program will change the configuration files of FTP service (program proftpd).
If you are ready to continue executing the program, input 'yes', if not 'no': yes
* Added ldif file ... [ ok ]
* Starting Proftpd ... [ ok ]
* FTP service configured ... [ ok ]
Serveur DNS
Configuration
# cl-setup dns
* WARNING: Executing of the program will change the configuration files of DNS service (program bind).
If you are ready to continue executing the program, input 'yes', if not 'no': yes
* Added ldif file ... [ ok ]
* Starting Named ... [ ok ]
* DNS service configured ... [ ok ]
Zone DNS maître
# cl-dns-zoneadd -n domain.lan --server hostname.domain.lan --ipserver 192.168.10.20
* Appended DNS master zone domain.lan [ ok ]
* Added A-record in LDAP
* localhost.domain.lan --> 127.0.0.1
*
* Appended DNS master zone 10.168.192.in-addr.arpa [ ok ]
* Added A-record in LDAP
* hostname.domain.lan --> 192.168.10.20
*
* Added PTR-record in LDAP
* 192.168.10.20 --> hostname.domain.lan
*
Enregistrements supplémentaires
Enregistrements A et PTR
# cl-dns-recadd --host host1.domain.lan --ip 192.168.10.21
* Added A-record in LDAP
* host1.domain.lan --> 192.168.10.21
*
* Added PTR-record in LDAP
* 192.168.10.21 --> host1.domain.lan
*
Enregistrement MX
# cl-dns-recadd --mx mail1.domain.lan,mail2.domain.lan --host host2.domain.lan --ip 192.168.10.22