Project politics
Each installation, each service configuration need do be done using a separate script.
Each script can be called in a standalone mode or include the global script.
Every thing need to be configurable (path, values, parameters ...) in each script and in the global configuration file. On this way, we can use a script in a standalone mode or on a global installation mode.
Developpement Rules using on this project
- Name of the variables need to be clear and make sense. Try to use the English language because this project may be supported by people who come from differents country
- All the variables included path, filename, package names, Url, parameters.... need to be declared in the global configuration file "Config_InstAll.sh" and at the start of the script that need these values. This global configuration file is used for the global installation. This allow having only one file and centralize all values in one place. We need to be able to launch the script in a standalone mode or in general mode, so we need to have these variables in the scripts that need these values.
- All the variables declared in the global configuration file need to start by the key word "export". Indeed, these variable may be used by another scripts.
-
For each Service/Modules/Application, we need :
- A variable "ENABLE" : This allow to activate (or not) the installation and configuration of this service (or module/application).
- A variable "SERVICE" : This variable will be used by the script "install_packages.sh" in order to know which packages need to be installed.
- A variable "SERVICENAME" : This variable contains the names of the packages to installed for this service (modules/application).
- A paragraph in the configuration file : Start with a comment line and the name of service/module/application, like : "# ".
- A dedicated script named "install_.sh" or "configure_.sh".
- A variable named "CONFIG" , which contains the script name dedicated to this service/module/application. Exemple : CONFIG="configure_.sh".
- A test in order to check if the script file "configure_.sh" exist. If not, display an error message.
- A test to check if the service/module has been enable. If yes, we launch the script file with the parameter INSTALL-LINK.
- All the variables used in each dedicated script need to be declared on 2 places : In the dedicated scripts and in the global configuration file. We need to be able to launch the script in a standalone mode or in general mode.
Installations
The installation of the services/modules/applications can be donne manually or automatically (global installation of the server).
Global Installation (or Automatic Installation)
Selection and configuration of services/modules to install:
- Choisir la plateforme Système sur laquelle vont s'éxecuter les scripts. Ce choix se fait via le fichier de configuration "Config_InstAll.sh". Variable nommée "OS".
- Selection des services/modules/Applications à installer et à configurer. La selection se fait via le fichier de configuration "Config_InstAll.sh". Mettre à 1 les services et/ou les modules à installer et a configurer.
- Parametrage dans le fichier de configuration global.
- saisir le nom du serveur, le nom de domaine DNS, les chemins.... dans chaques paragraphe associé aux services séléctionés. Toujours dans le fichier de configuration "Config_InstAll.sh".
How launch the global script
- Execute the following script : ./InstAll.sh
Step of the global sript :
- Update and upgrade of the system.
- Installation des packages via le packer manager du système : Installations lancés par le script "install_packages.sh".
- Configuration des services : Chaque service sera configuré via l'éxecution d'un script qui lui est propre.
Manual installation
- Editer le script dédié au service que vous voulez configurer.
- Choisir la plateforme Système sur laquelle vont s'éxecuter les scripts. Ce choix se fait via la variable "OS", situé au début du script dédié au service.
- Parametrer le service via les variables situées au début du script.
- Lancer l'exécution du script.
Liste des Services proposés
Web :
Apache:
- Création de VHost
- Sécurisation du serveur
Php :
- Sécurisation du service
- Configuration du module SuPhp
Mails :
Postfix :
- Authentification basique
- Authentification via Mysql
- Authentification via Ldap
- Configuration
- Sécurisation
Dovecot :
- Authentification basique
- Authentification via Mysql
- Authentification via Ldap
- Configuration
- Sécurisation
- Configuration du module Sieve
FTP :
PureFTPD :
- Authentification basique
- Authentification via Mysql
- Authentification via Ldap
- Configuration
- Sécurisation
SGBD :
MySql :
- Sécurisation du serveur
Protection/Sécurisation :
Applications web :
Roundcube :
- Installation, création d'un vhost Apache et configuration
Owncloud :
- Installation, création d'un vhost Apache et configuration
Scripts d'administration du serveur :
Add_ldapuser.sh :
- Création d'utilisateur dans l'annuaire LDAP + boite mail de récéption IMAP/Dovecot : Il créer l'utilisateur et l'ajoute dans les groupes Users/Mails. Il créer aussi le répertoire Imap/Dovecot.
script_configure_firewall_iptables.sh :
- script_configure_firewall_iptables.sh : Configure le parefeu iptables de Linux.