Le logiciel GestSup, est un logiciel de GESTion de SUPport, il permet à des clients ou utilisateurs de déclarer des demandes et incidents, par l'intermédiaire de tickets de support. Ces tickets seront ensuite traités par les techniciens en charge, et permettrons d'échanger avec l'utilisateur jusqu'à la clôture de son ticket.
En termes de composants, l'application se base sur un modèle client / serveur 100% web, il fonctionne à l’aide des composants, Apache (serveur WEB), MySQL (Base de données), PHP (moteur PHP), portés par des systèmes Linux ou Windows. Les clients via leurs navigateurs interrogeront le serveur pour utiliser le logiciel.
Le serveur peut être hébergé dans votre structure en interne, ou bien être installé sur une plateforme d'hébergement externe.
apt update && apt upgrade -y && apt dist-upgrade -y
apt install apache2 php7.0 mysql-server libapache2-mod-php7.0 php7.0-mysql php7.0-xml php7.0-curl php7.0-mbstring php7.0-gd -y
apt install phpmyadmin -y
mysql -u root
CREATE USER 'gestsup'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'gestsup'@'localhost';
FLUSH PRIVILEGES;
exit
nano /etc/php/7.0/apache2/php.ini
Modifier les paramètres suivants
Max_execution_time = 480
File_uploads = On
Memory_limit = 512M
Upload_max_filesize = 10M
Post_max_size = 10M
Date.timezone= Europe/Paris
apt install php7.0-imap php7.0-ldap php7.0-zip unzip ntp -y
wget -P /var/www/html https://gestsup.fr/downloads/versions/current/version/gestsup_3.2.5.zip
unzip /var/www/html/gestsup_3.2.5.zip -d /var/www/html
rm /var/www/html/gestsup_3.2.5.zip
rm /var/www/html/index.html
adduser gestsup --ingroup www-data
chown -R gestsup:www-data /var/www/html/
find /var/www/html/ -type d -exec chmod 750 {} \;
find /var/www/html/ -type f -exec chmod 640 {} \;
chmod 770 -R /var/www/html/upload
chmod 770 -R /var/www/html/images/model
chmod 770 -R /var/www/html/backup
chmod 770 -R /var/www/html/_SQL
chmod 660 /var/www/html/connect.php
reboot
rm -rf /var/www/html/install/
chmod 640 /var/www/html/connect.php
nano /etc/apache2/conf-available/security.conf
ServerSignature Off
ServerTokens Prod
nano /etc/apache2/apache2.conf
Options -Indexes -ExecCGI
apachectl -M
- Crée un repertoire pour le programme
mkdir /cert
- Se placer dans le repertoire
cd /cert
- Télécharger certbot
wget https://dl.eff.org/certbot-auto
- Rendre executable le programme
chmod a+x /cert/certbot-auto
- Installation du certificat
/cert/certbot-auto
- Renouvellement automatique tous les mois
echo "0 0 1 * * root /cert/certbot-auto renew && service apache2 reload" >> /etc/crontab && service cron reload
nano /etc/apache2/conf-enabled/phpmyadmin.conf
Order Allow,Deny
Allow from 127.0.0.1
Allow from MONIP
Modifier l'alias par défaut:nano /etc/phpmyadmin/apache.conf
Alias /mon_alias /usr/share/phpmyadmin
service apache2 reload
apt install clamav -y
Mise à jour manuelle:freshclam
Scan tous les jours:echo "0 2 * * * root clamscan -r /var/www -l /var/log/clamscan.log >/dev/null 2>&1 " >> /etc/crontab && service cron reload
apt update && apt upgrade -y && apt dist-upgrade -y
apt install apache2 mariadb-server php7.3 php7.3-mysql php7.3-xml php7.3-curl php7.3-imap php7.3-ldap php7.3-zip php7.3-mbstring php7.3-gd unzip ntp -y
mariadb -u root
CREATE USER 'gestsup'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON *.* TO 'gestsup'@'localhost';
FLUSH PRIVILEGES;
exit
nano /etc/php/7.3/apache2/php.ini
Modifier les paramètres suivants
Max_execution_time = 480
Memory_limit = 512M
upload_max_filesize = 8M
Date.timezone = Europe/Paris
wget -P /var/www/html https://gestsup.fr/downloads/versions/current/version/gestsup_3.2.5.zip
unzip /var/www/html/gestsup_3.2.5.zip -d /var/www/html
rm /var/www/html/gestsup_3.2.5.zip
rm /var/www/html/index.html
adduser gestsup --ingroup www-data
chown -R gestsup:www-data /var/www/html/
find /var/www/html/ -type d -exec chmod 750 {} \;
find /var/www/html/ -type f -exec chmod 640 {} \;
chmod 770 -R /var/www/html/upload
chmod 770 -R /var/www/html/images/model
chmod 770 -R /var/www/html/backup
chmod 770 -R /var/www/html/_SQL
chmod 660 /var/www/html/connect.php
reboot
rm -rf /var/www/html/install/
chmod 640 /var/www/html/connect.php
nano /etc/apache2/conf-available/security.conf
ServerSignature Off
ServerTokens Prod
nano /etc/apache2/apache2.conf
Supprimmer "Indexes"
apachectl -M
- Crée un repertoire pour le programme
mkdir /cert
- Se placer dans le repertoire
cd /cert
- Télécharger certbot
wget https://dl.eff.org/certbot-auto
- Rendre executable le programme
chmod a+x /cert/certbot-auto
- Installation du certificat
/cert/certbot-auto
- Renouvellement automatique tous les mois
echo "0 0 1 * * root /cert/certbot-auto renew && service apache2 reload" >> /etc/crontab && service cron reload
nano /etc/apache2/conf-enabled/phpmyadmin.conf
Order Allow,Deny
Allow from 127.0.0.1
Allow from MONIP
Modifier l'alias par défaut:nano /etc/phpmyadmin/apache.conf
Alias /mon_alias /usr/share/phpmyadmin
service apache2 reload
apt install clamav -y
Mise à jour manuelle:freshclam
Scan tous les jours:echo "0 2 * * * root clamscan -r /var/www -l /var/log/clamscan.log >/dev/null 2>&1 " >> /etc/crontab && service cron reload
Avant toutes mise à jour réaliser une sauvegarde des fichiers et de votre base de données
Les patchs sont à installer un par un, ex: 3.1.45 puis 3.1.46 puis 3.1.47...
Afin de faciliter l'installation de nouvelles versions de l'application ou de nouveaux patchs vous pouvez les installer de plusieurs manières :
1- Complètement automatisés: Création d'une tâche planifiée sur le serveur pour lancer l'installation sans interaction utilisateur.
2- Semi-automatisés: Depuis l'application un assistant vous guide pour lancer l'installation des mises à jour.
3- Manuellement: Depuis le serveur vous exécutez manuellement les opérations de mises à jour de fichiers et de bases de données.
echo "0 0 * * 0 root php /var/www/html/admin/update.php autoinstall YOURPRIVATEKEY" | crontab
schtasks /create /tn "GS_UPDATE" /sc weekly /tr "C:\wamp64\bin\php\phpX.X.X\php.exe -f C:\wamp64\www\admin\update.php -- autoinstall YOURPRIVATEKEY"
chmod 770 -R /var/www/html/
find /var/www/html/ -type d -exec chmod 750 {} \;
find /var/www/html/ -type f -exec chmod 640 {} \;
chmod 770 -R /var/www/html/upload
chmod 770 -R /var/www/html/log
chmod 770 -R /var/www/html/backup
chmod 770 -R /var/www/html/_SQL
echo "0 1 * * 0 root php /var/www/html/core/ldap_services.php " | crontab
Pour Windows :schtasks /create /tn "GS_LDAP_service" /sc weekly /tr "C:\wamp64\bin\php\phpX.X.X\php.exe -f C:\wamp64\www\core\ldap_services.php
echo "0 1 * * 0 root php /var/www/html/core/ldap_agencies.php " | crontab
Pour Windows :schtasks /create /tn "GS_LDAP_service" /sc weekly /tr "C:\wamp64\bin\php\phpX.X.X\php.exe -f C:\wamp64\www\core\ldap_agencies.php
echo "*/5 * * * 0 root php /var/www/html/core/import_asset.php YOURPRIVATEKEY" | crontab
La fonction créera un nouvel équipement, si l'adresse MAC spécifiée dans le fichier CSV n'est pas présente dans la base des équipements de GestSup.apt-get install nbtscan
Ce composant permettra de récupérer le nom des équipements Windows qui ne sont pas présent sur votre serveur DNS.echo "0 12 * * 0 root php /var/www/html/core/asset_network_scan.php YOURPRIVATEKEY" | crontab
Vous pourrez retrouver une traçabilité de toutes les modifications effectées par la fonction dans un fichier de log (./log/asset_network_scan.log)@echo off
rem sauvegarde de la base de données nommée bsup
"C:\wamp64\bin\mariadb\mariadb10.2.14\bin\mysqldump.exe" -u root --opt bsup -h localhost > c:\wamp64\www\%DATE:~6,4%_%DATE:~3,2%_%DATE:~0,2%_bak_gestsup.sql
rem sauvegarde des fichiers sur un autre serveur ayant un répertoire partagé
xcopy C:\wamp64\www\*.* \\serveur\Backups\GestSup /s/e/y >NUL 2>&1
#!/bin/sh
mkdir /backup
mysqldump --user=root --password=PASS --lock-tables --databases nombasegestsup | gzip -c > /backup/`date +%F`.sql.gz
cp -R /var/www/html/gestsup/* /backup
zip -r /backup/backup`date +%F`.zip /backup/*
cd /backup
HOST='FTPSERVER'
USER='anonymous'
PASSWD=''
FILE=backup`date +%F`.zip
ftp -n $HOST < quote USER $USER
quote PASS $PASSWD
binary
cd /DIRECTORY FTPSERVER
put $FILE
quit
END_SCRIPT
rm -R /backup/*
0 0 * * * root sh /mon_repertoire/save.sh
pour un sauvegarde tous les jours à minuit.#!/bin/sh
mkdir /backup
mkdir /temp/backup
mysqldump --databases nombasegestsup --user=root --password=PASS --lock-tables | gzip -c > /temp/backup/`date +%F`.sql.gz
cp -R /var/www/html/* /temp/backup
zip -r /backup/backup_gs_`date +%F`.zip /temp/backup/*
rm -R /temp/backup/*
cd /backup
#remove old backup
rm `ls -t backup*.zip | awk 'NR>7'`
0 0 * * * root sh /mon_repertoire/save.sh
pour un sauvegarde tous les jours à minuit.mkdir /backup
cp -R /var/www/html/gestsup/* /backup
mysqldump --all-databases --user=root --password=PASS --lock-tables | gzip -c > /backup/DB_bkp.sql.gz
apt-get install php7.3-ldap
Windows : Dé-commenter la ligne "extension=php_ldap.dll" du fichier C:\wamp\bin\php\phpXXX\php.iniecho "0 1 * * * root php /var/www/html/core/ldap.php > /dev/null" >> /etc/crontab && service cron reload
schtasks /create /tn "MAJ" /tr "C:\wamp\bin\php\php7.X.X\php.exe c:\wamp\www\core\ldap.php" /sc daily /st 01:00:00
apt-get install php7.3-imap
Windows : Dé-commenter la ligne "extension=php_imap.dll" du fichier C:\wamp\bin\php\phpXXX\php.iniecho "*/5 * * * * root php /var/www/html/mail2ticket.php > /dev/null" >> /etc/crontab && service cron reload
schtasks /create /tn "MAJ" /sc minute /mo 5 /tr "C:\wamp\bin\php\php7.X.X\php.exe c:\wamp\www\mail2ticket.php"
cp /usr/share/postfix/main.cf.debian /etc/postfix/main.cf
nano /etc/postfix/main.cf
Ajouter la ligne :
relayhost=10.0.0.1
ou l'adresse IP correspond à votre serveur de messagerie
echo "0 0 * * 0 root php /var/www/html/admin/update.php autoinstall YOURPRIVATEKEY > /dev/null" >> /etc/crontab && service cron reload
schtasks /create /tn "GS_UPDATE" /sc weekly /tr "C:\wamp64\bin\php\phpX.X.X\php.exe -f C:\wamp64\www\admin\update.php -- autoinstall YOURPRIVATEKEY"
echo "0 0 * * 0 root php /var/www/html/core/ping.php globalping YOURPRIVATEKEY > /dev/null" >> /etc/crontab && service cron reload
schtasks /create /tn "GS_UPDATE" /sc weekly /tr "C:\wamp64\bin\php\phpX.X.X\php.exe -f C:\wamp64\www\core\ping.php -- globalping YOURPRIVATEKEY"
apt-get update && apt-get upgrade -y
nano /etc/resolv.conf
nameserver 192.168.0.1
apt-get install ntpdate -y
ntpdate dc1.gestsup.local
apt-get install krb5-config krb5-user libapache2-mod-auth-kerb -y
royaume GESTSUP.LOCAL
nano /etc/krb5.conf
[libdefaults]
default_realm = GESTSUP.LOCAL
dns_lookup_realm = false
dns_lookup_kdc = false
[realms]
GESTSUP.LOCAL = {
kdc = dc1:88
admin_server = dc1:749
default_domain = gestsup.local
}
[domain_realm]
.gestsup.local = GESTSUP.LOCAL
gestsup.local = GESTSUP.LOCAL
userPrincipalName=HTTP/web.gestsup.local@GESTSUP.LOCAL
setspn -A http/web.gestsup.local@GESTSUP.LOCAL GESTSUP\kbuser
setspn -A HTTP/web.gestsup.local@GESTSUP.LOCAL GESTSUP\kbuser
ktpass -out c:\kerb5.ktab -princ HTTP/web.gestsup.local@GESTSUP.LOCAL -mapuser kbuser@GESTSUP.LOCAL -pass Pa$$w0rd -crypto all -ptype KRB5_NT_PRINCIPAL
AuthType Kerberos
AuthName "GestSup Intranet"
KrbAuthRealms GESTSUP.LOCAL
KrbServiceName HTTP
Krb5Keytab /etc/apache2/kerb5.ktab
KrbMethodNegotiate On
KrbMethodK5Passwd On
require valid-user
service apache2 restart
apt-get install php7.3-fpm
a2dismod php7.3
a2enconf php7.3-fpm
a2enmod proxy_fcgi
a2dismod mpm_prefork
a2enmod mpm_event
a2enmod ssl
a2enmod http2
systemctl restart apache2
Il sera nécessaire de reconfigurer les paramètres PHP via le fichier suivant:
nano /etc/php/7.3/fpm/php.ini
Afin de prendre en compte les changements :
/etc/init.d/php7.3-fpm restart
All Rights Reserved 2007-2021 © GestSup.fr | Mentions légales