Update
This commit is contained in:
49
Centos7-LAMP-GLPI/Vagrantfile
vendored
Normal file
49
Centos7-LAMP-GLPI/Vagrantfile
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
VAGRANTFILE_API_VERSION = "2"
|
||||
|
||||
nodes = [
|
||||
{ hostname: 'LAB-GLPI-01', box: 'generic/centos7', ip: '192.168.1.201' }
|
||||
]
|
||||
|
||||
unless Vagrant.has_plugin?("vagrant-reload")
|
||||
puts 'Installing vagrant-reload Plugin...'
|
||||
system('vagrant plugin install vagrant-reload')
|
||||
end
|
||||
|
||||
unless Vagrant.has_plugin?("vagrant-proxyconf")
|
||||
puts 'Installing vagrant-proxyconf Plugin...'
|
||||
system('vagrant plugin install vagrant-proxyconf')
|
||||
end
|
||||
|
||||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
||||
nodes.each do |node|
|
||||
config.vm.define node[:hostname] do |node_config|
|
||||
node_config.vm.hostname = node[:hostname]
|
||||
node_config.vm.box = node[:box]
|
||||
node_config.vm.network "public_network", ip: node[:ip]
|
||||
#node_config.vm.network "private_network", type: "dhcp"
|
||||
node_config.vm.synced_folder('files/', '/Vagrantfiles', type: 'rsync')
|
||||
config.vm.provision "shell", path: "scripts/install.sh"
|
||||
config.vm.provision :reload
|
||||
config.vm.provision "shell", path: "scripts/lamp+glpi.sh"
|
||||
config.vm.provision "shell", inline: "echo 'INSTALLER: Installation Terminee, Centos 7 LAMP pret a etre utilise !!!'"
|
||||
end
|
||||
end
|
||||
|
||||
config.vm.provider :vmware_esxi do |esxi|
|
||||
esxi.esxi_hostname = '192.168.1.145'
|
||||
esxi.esxi_username = 'root'
|
||||
esxi.esxi_password = 'P@ssw0rd'
|
||||
esxi.esxi_hostport = 22
|
||||
esxi.esxi_virtual_network = 'VM Network'
|
||||
esxi.esxi_disk_store = 'datastore1'
|
||||
esxi.guest_guestos = 'centos7-64'
|
||||
esxi.resource_pool = '/'
|
||||
esxi.guest_memsize = '8192'
|
||||
esxi.guest_numvcpus = '4'
|
||||
esxi.guest_nic_type = 'VMXNET3'
|
||||
esxi.guest_disk_type = 'thick'
|
||||
esxi.guest_boot_disk_size = 150
|
||||
esxi.guest_virtualhw_version = '14'
|
||||
esxi.guest_custom_vmx_settings = [['vhv.enable','TRUE'], ['floppy0.present','FALSE']]
|
||||
end
|
||||
end
|
120
Centos7-LAMP-GLPI/files/agent.cfg
Normal file
120
Centos7-LAMP-GLPI/files/agent.cfg
Normal file
@ -0,0 +1,120 @@
|
||||
# fusioninventory agent configuration
|
||||
|
||||
# all defined values match default
|
||||
# all commented values are examples
|
||||
|
||||
|
||||
#
|
||||
# Target definition options
|
||||
#
|
||||
|
||||
# send tasks results to an OCS server
|
||||
#server = http://server.domain.com/ocsinventory
|
||||
# send tasks results to a FusionInventory for GLPI server
|
||||
#server = http://server.domain.com/glpi/plugins/fusioninventory/
|
||||
server = http://glpi.exemple.lan/plugins/fusioninventory/
|
||||
# write tasks results in a directory
|
||||
#local = /tmp
|
||||
|
||||
#
|
||||
# Task definition options
|
||||
#
|
||||
|
||||
# disable software deployment tasks
|
||||
#no-task = deploy
|
||||
#tasks = inventory,deploy,inventory
|
||||
|
||||
#
|
||||
# Target scheduling options
|
||||
#
|
||||
|
||||
# maximum delay before first target, in seconds
|
||||
delaytime = 3600
|
||||
# do not contact the target before next scheduled time
|
||||
lazy = 0
|
||||
|
||||
#
|
||||
# Inventory task specific options
|
||||
#
|
||||
|
||||
# do not list local printers
|
||||
# no-category = printer
|
||||
# allow to scan user home directories
|
||||
scan-homedirs = 0
|
||||
# allow to scan user profiles
|
||||
scan-profiles = 0
|
||||
# save the inventory as HTML
|
||||
html = 0
|
||||
# timeout for inventory modules execution
|
||||
backend-collect-timeout = 30
|
||||
# always send data to server
|
||||
force = 0
|
||||
# additional inventory content file
|
||||
additional-content =
|
||||
|
||||
#
|
||||
# Package deployment task specific options
|
||||
#
|
||||
|
||||
# do not use peer to peer to download files
|
||||
no-p2p = 0
|
||||
|
||||
#
|
||||
# Network options
|
||||
#
|
||||
|
||||
# proxy address
|
||||
proxy =
|
||||
# user name for server authentication
|
||||
user =
|
||||
# password for server authentication
|
||||
password =
|
||||
# CA certificates directory
|
||||
ca-cert-dir =
|
||||
# CA certificates file
|
||||
ca-cert-file =
|
||||
# do not check server SSL certificate
|
||||
no-ssl-check = 0
|
||||
# connection timeout, in seconds
|
||||
timeout = 180
|
||||
|
||||
#
|
||||
# Web interface options
|
||||
#
|
||||
|
||||
# disable embedded web server
|
||||
no-httpd = 0
|
||||
# network interface to listen to
|
||||
httpd-ip =
|
||||
# network port to listen to
|
||||
httpd-port = 62354
|
||||
# trust requests without authentication token
|
||||
httpd-trust =
|
||||
|
||||
#
|
||||
# Logging options
|
||||
#
|
||||
|
||||
# Logger backend, either Stderr, File or Syslog (Stderr)
|
||||
logger = stderr
|
||||
# log file
|
||||
#logfile = /var/log/fusioninventory.log
|
||||
# maximum log file size, in MB
|
||||
#logfile-maxsize = 0
|
||||
# Syslog facility
|
||||
logfacility = LOG_USER
|
||||
# Use color in the console
|
||||
color = 0
|
||||
|
||||
#
|
||||
# Execution mode options
|
||||
#
|
||||
|
||||
# add given tag to inventory results
|
||||
tag =
|
||||
# debug mode
|
||||
debug = 0
|
||||
|
||||
# time to wait to reload config (0 means no reload, it's default value)
|
||||
# conf-reload-interval = 0
|
||||
|
19
Centos7-LAMP-GLPI/files/centreon.cfg
Normal file
19
Centos7-LAMP-GLPI/files/centreon.cfg
Normal file
@ -0,0 +1,19 @@
|
||||
################################################################################
|
||||
# COMMAND DEFINITIONS
|
||||
# Syntax:
|
||||
# command[]=
|
||||
#
|
||||
command[users]=/usr/lib64/nagios/plugins/check_users -w 5 -c 10
|
||||
command[load]=/usr/lib64/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
|
||||
command[check_load]=/usr/lib64/nagios/plugins/check_load -w 15,10,5 -c 30,25,20
|
||||
command[swap]=/usr/lib64/nagios/plugins/check_swap -w 20% -c 10%
|
||||
command[root_disk]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p / -m
|
||||
command[usr_disk]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /usr -m
|
||||
command[var_disk]=/usr/lib64/nagios/plugins/check_disk -w 20% -c 10% -p /var -m
|
||||
command[zombie_procs]=/usr/lib64/nagios/plugins/check_procs -w 5 -c 10 -s Z
|
||||
command[total_procs]=/usr/lib64/nagios/plugins/check_procs -w 190 -c 200
|
||||
command[proc_named]=/usr/lib64/nagios/plugins/check_procs -w 1: -c 1:2 -C named
|
||||
command[proc_crond]=/usr/lib64/nagios/plugins/check_procs -w 1: -c 1:5 -C crond
|
||||
command[proc_syslogd]=/usr/lib64/nagios/plugins/check_procs -w 1: -c 1:2 -C syslog-ng
|
||||
command[proc_rsyslogd]=/usr/lib64/nagios/plugins/check_procs -w 1: -c 1:2 -C rsyslogd
|
||||
command[check_yum]=/usr/lib64/nagios/plugins/check_yum.py
|
5
Centos7-LAMP-GLPI/files/mariadb.repo
Normal file
5
Centos7-LAMP-GLPI/files/mariadb.repo
Normal file
@ -0,0 +1,5 @@
|
||||
[mariadb]
|
||||
name = MariaDB
|
||||
baseurl = http://yum.mariadb.org/10.3/centos73-amd64/
|
||||
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
|
||||
gpgcheck=1
|
77
Centos7-LAMP-GLPI/files/phpMyAdmin.conf
Normal file
77
Centos7-LAMP-GLPI/files/phpMyAdmin.conf
Normal file
@ -0,0 +1,77 @@
|
||||
# phpMyAdmin - Web based MySQL browser written in php
|
||||
#
|
||||
# Allows only localhost by default
|
||||
#
|
||||
# But allowing phpMyAdmin to anyone other than localhost should be considered
|
||||
# dangerous unless properly secured by SSL
|
||||
|
||||
Alias /phpMyAdmin /usr/share/phpMyAdmin
|
||||
Alias /phpmyadmin /usr/share/phpMyAdmin
|
||||
|
||||
<Directory /usr/share/phpMyAdmin/>
|
||||
AddDefaultCharset UTF-8
|
||||
|
||||
<IfModule mod_authz_core.c>
|
||||
# Apache 2.4
|
||||
#<RequireAny>
|
||||
#Require ip 127.0.0.1
|
||||
#Require ip ::1
|
||||
#</RequireAny>
|
||||
Require all granted
|
||||
</IfModule>
|
||||
<IfModule !mod_authz_core.c>
|
||||
# Apache 2.2
|
||||
Order Deny,Allow
|
||||
Deny from All
|
||||
Allow from 127.0.0.1
|
||||
Allow from ::1
|
||||
</IfModule>
|
||||
</Directory>
|
||||
|
||||
<Directory /usr/share/phpMyAdmin/setup/>
|
||||
<IfModule mod_authz_core.c>
|
||||
# Apache 2.4
|
||||
#<RequireAny>
|
||||
#Require ip 127.0.0.1
|
||||
#Require ip ::1
|
||||
#</RequireAny>
|
||||
Require all granted
|
||||
</IfModule>
|
||||
<IfModule !mod_authz_core.c>
|
||||
# Apache 2.2
|
||||
Order Deny,Allow
|
||||
Deny from All
|
||||
Allow from 127.0.0.1
|
||||
Allow from ::1
|
||||
</IfModule>
|
||||
</Directory>
|
||||
|
||||
# These directories do not require access over HTTP - taken from the original
|
||||
# phpMyAdmin upstream tarball
|
||||
#
|
||||
<Directory /usr/share/phpMyAdmin/libraries/>
|
||||
Order Deny,Allow
|
||||
Deny from All
|
||||
Allow from None
|
||||
</Directory>
|
||||
|
||||
<Directory /usr/share/phpMyAdmin/setup/lib/>
|
||||
Order Deny,Allow
|
||||
Deny from All
|
||||
Allow from None
|
||||
</Directory>
|
||||
|
||||
<Directory /usr/share/phpMyAdmin/setup/frames/>
|
||||
Order Deny,Allow
|
||||
Deny from All
|
||||
Allow from None
|
||||
</Directory>
|
||||
|
||||
# This configuration prevents mod_security at phpMyAdmin directories from
|
||||
# filtering SQL etc. This may break your mod_security implementation.
|
||||
#
|
||||
#<IfModule mod_security.c>
|
||||
# <Directory /usr/share/phpMyAdmin/>
|
||||
# SecRuleInheritance Off
|
||||
# </Directory>
|
||||
#</IfModule>
|
41
Centos7-LAMP-GLPI/files/snmpd.conf
Normal file
41
Centos7-LAMP-GLPI/files/snmpd.conf
Normal file
@ -0,0 +1,41 @@
|
||||
#com2sec paranoid default EXEMPLE-PUB
|
||||
com2sec readonly default EXEMPLE-PRIV
|
||||
#com2sec readwrite default EXEMPLE-PRIV
|
||||
#group MyRWGroup usm readwrite
|
||||
group ROGroup v1 readonly
|
||||
|
||||
informsink 192.168.1.71 EXEMPLE-PRIV
|
||||
|
||||
# incl/excl subtree mask
|
||||
view all included .1 80
|
||||
view system included .iso.org.dod.internet.mgmt.mib-2.system
|
||||
view system included .1.3.6.1.4.1.2021.11
|
||||
view System included .1.3.6.1.2.1.1
|
||||
view System included .1.3.6.1.2.1.25.1.1
|
||||
|
||||
####
|
||||
# Finally, grant the 2 groups access to the 1 view with different
|
||||
# write permissions:
|
||||
|
||||
# context sec.model sec.level match read write notif
|
||||
access MyROSystem "" any noauth exact system none none
|
||||
access MyROGroup "" any noauth exact all none none
|
||||
access MyRWGroup "" any noauth exact all all none
|
||||
access ROGroup "" v1 noauth exact all none none
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
syslocation France (configure /etc/snmp/snmpd.local.conf)
|
||||
syscontact Root <administrateur@tips-of-mine.fr> (configure /etc/snmp/snmpd.local.conf)
|
||||
|
||||
# Check the / partition and make sure it contains at least 10 megs.
|
||||
|
||||
disk / 10000
|
||||
|
||||
# MUCH more can be done with the snmpd.conf than is shown as an
|
||||
# example here.
|
||||
exec .1.3.6.1.4.1.2021.54 hdNum /usr/local/bin/snmpdiskio hdNum
|
||||
exec .1.3.6.1.4.1.2021.55 hdIndex /usr/local/bin/snmpdiskio hdIndex
|
||||
exec .1.3.6.1.4.1.2021.56 hdDescr /usr/local/bin/snmpdiskio hdDescr
|
||||
exec .1.3.6.1.4.1.2021.57 hdInBlocks /usr/local/bin/snmpdiskio hdInBlocks
|
||||
exec .1.3.6.1.4.1.2021.58 hdOutBlocks /usr/local/bin/snmpdiskio hdOutBlocks
|
185
Centos7-LAMP-GLPI/scripts/install.sh
Normal file
185
Centos7-LAMP-GLPI/scripts/install.sh
Normal file
@ -0,0 +1,185 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo '.'
|
||||
echo ' /$$$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$$ /$$ /$$ /$$$$$$ /$$ /$$ /$$$$$$$$'
|
||||
echo '|__ $$__/|_ $$_/| $$__ $$ /$$__ $$ /$$__ $$| $$_____/ | $$$ /$$$|_ $$_/| $$$ | $$| $$_____/'
|
||||
echo ' | $$ | $$ | $$ \ $$| $$ \__/ | $$ \ $$| $$ | $$$$ /$$$$ | $$ | $$$$| $$| $$ '
|
||||
echo ' | $$ | $$ | $$$$$$$/| $$$$$$ /$$$$$$| $$ | $$| $$$$$ /$$$$$$| $$ $$/$$ $$ | $$ | $$ $$ $$| $$$$$ '
|
||||
echo ' | $$ | $$ | $$____/ \____ $$|______/| $$ | $$| $$__/|______/| $$ $$$| $$ | $$ | $$ $$$$| $$__/ '
|
||||
echo ' | $$ | $$ | $$ /$$ \ $$ | $$ | $$| $$ | $$\ $ | $$ | $$ | $$\ $$$| $$ '
|
||||
echo ' | $$ /$$$$$$| $$ | $$$$$$/ | $$$$$$/| $$ | $$ \/ | $$ /$$$$$$| $$ \ $$| $$$$$$$$'
|
||||
echo ' |__/ |______/|__/ \______/ \______/ |__/ |__/ |__/|______/|__/ \__/|________/'
|
||||
echo '.'
|
||||
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: VM OK'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Debut MAJ'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
yum install epel-release -y
|
||||
|
||||
yum upgrade -y
|
||||
|
||||
yum upgrade -y
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Fin MAJ'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Debut ENV'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
echo ' - Desactivation SELINUX'
|
||||
|
||||
setenforce 0
|
||||
sed -i --follow-symlinks "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/sysconfig/selinux
|
||||
|
||||
echo ' - Parametrage'
|
||||
|
||||
echo LANG=fr_FR.utf-8 >> /etc/environment
|
||||
echo LC_ALL=fr_FR.utf-8 >> /etc/environment
|
||||
|
||||
echo ' - Timezone'
|
||||
|
||||
sudo timedatectl set-timezone Europe/Paris
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Fin ENV'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Debut AdminTools'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
echo ' - Installation composants'
|
||||
|
||||
yum install htop yum-utils nano mlocate -y
|
||||
|
||||
echo ' - Installation Supervision'
|
||||
|
||||
yum install python36-pip net-snmp yum-utils -y
|
||||
yum install nrpe nagios-plugins-* --skip-broken -y
|
||||
|
||||
echo ' - Configuration Supervision'
|
||||
|
||||
echo ' -- Modification du fichier : nrpe.cfg'
|
||||
|
||||
sed -i --follow-symlinks "s/allowed_hosts=127.0.0.1,::1/allowed_hosts=127.0.0.1,::1,192.168.1.71,centreon,centreon.tips-of-mine.lan/g" /etc/nagios/nrpe.cfg
|
||||
|
||||
echo ' -- Creation du fichier : centreon.cfg'
|
||||
|
||||
sudo mv /Vagrantfiles/centreon.cfg /etc/nrpe.d/centreon.cfg
|
||||
|
||||
echo ' -- Sauvegarde du fichier : snmpd.conf'
|
||||
|
||||
mv /etc/snmp/snmpd.conf /etc/snmp/snmpd.conf.bak
|
||||
|
||||
echo ' -- Creation du fichier : snmpd.conf'
|
||||
|
||||
sudo mv /Vagrantfiles/snmpd.conf /etc/snmp/snmpd.conf
|
||||
|
||||
echo ' -- Creation du fichier : snmpd.conf'
|
||||
|
||||
echo ' - daemon Service'
|
||||
|
||||
systemctl daemon-reload
|
||||
|
||||
echo ' - Demarrage des services'
|
||||
|
||||
systemctl enable snmpd && systemctl start snmpd
|
||||
systemctl enable nrpe && systemctl start nrpe
|
||||
|
||||
echo ' - Installation Inventaire'
|
||||
|
||||
yum install fusioninventory-agent fusioninventory-agent-task-inventory -y
|
||||
|
||||
echo ' - Configuration Inventaire'
|
||||
|
||||
echo ' -- Creation du fichier : agent.cfg'
|
||||
|
||||
sudo mv /Vagrantfiles/agent.cfg /etc/fusioninventory/agent.cfg
|
||||
|
||||
echo ' - daemon Service'
|
||||
|
||||
systemctl daemon-reload
|
||||
|
||||
echo ' - Demarrage des services'
|
||||
|
||||
systemctl restart fusioninventory-agent && systemctl enable fusioninventory-agent
|
||||
|
||||
echo ' - Configuration SSH'
|
||||
|
||||
sed -i --follow-symlinks "s/#HostKey/HostKey/g" /etc/ssh/sshd_config
|
||||
sed -i --follow-symlinks "s/PasswordAuthentication no/PasswordAuthentication yes/g" /etc/ssh/sshd_config
|
||||
sed -i --follow-symlinks "s/UseDNS no/#UseDNS yes/g" /etc/ssh/sshd_config
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Fin AdminTools'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Debut Gestion Disque'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
echo ' - Configuration disque'
|
||||
sudo fdisk -u /dev/sda<<EOF
|
||||
p
|
||||
d
|
||||
2
|
||||
n
|
||||
p
|
||||
2
|
||||
|
||||
|
||||
t
|
||||
2
|
||||
8e
|
||||
w
|
||||
EOF
|
||||
|
||||
echo ' - Configuration disque LVM'
|
||||
|
||||
echo '===================================================================================================='
|
||||
sudo partx -u /dev/sda
|
||||
echo '===================================================================================================='
|
||||
sudo pvresize /dev/sda2
|
||||
echo '===================================================================================================='
|
||||
sudo pvscan
|
||||
echo '===================================================================================================='
|
||||
sudo vgdisplay
|
||||
echo '===================================================================================================='
|
||||
sudo lvdisplay
|
||||
echo '===================================================================================================='
|
||||
sudo lvextend -l +100%FREE -r /dev/centos_centos7/root
|
||||
echo '===================================================================================================='
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Fin Gestion Disque'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Reboot'
|
||||
echo '**********************'
|
||||
echo '.'
|
214
Centos7-LAMP-GLPI/scripts/lamp+glpi.sh
Normal file
214
Centos7-LAMP-GLPI/scripts/lamp+glpi.sh
Normal file
@ -0,0 +1,214 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo '.'
|
||||
echo ' /$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$$$ /$$$$$$ /$$ /$$ /$$$$$$ /$$$$$$$$ /$$$$$$ /$$$$$$ /$$ /$$'
|
||||
echo '|_ $$_/| $$$ | $$ /$$__ $$|__ $$__//$$__ $$| $$ | $$ /$$__ $$|__ $$__/|_ $$_/ /$$__ $$| $$$ | $$'
|
||||
echo ' | $$ | $$$$| $$| $$ \__/ | $$ | $$ \ $$| $$ | $$ | $$ \ $$ | $$ | $$ | $$ \ $$| $$$$| $$'
|
||||
echo ' | $$ | $$ $$ $$| $$$$$$ | $$ | $$$$$$$$| $$ | $$ | $$$$$$$$ | $$ | $$ | $$ | $$| $$ $$ $$'
|
||||
echo ' | $$ | $$ $$$$ \____ $$ | $$ | $$__ $$| $$ | $$ | $$__ $$ | $$ | $$ | $$ | $$| $$ $$$$'
|
||||
echo ' | $$ | $$\ $$$ /$$ \ $$ | $$ | $$ | $$| $$ | $$ | $$ | $$ | $$ | $$ | $$ | $$| $$\ $$$'
|
||||
echo ' /$$$$$$| $$ \ $$| $$$$$$/ | $$ | $$ | $$| $$$$$$$$| $$$$$$$$| $$ | $$ | $$ /$$$$$$| $$$$$$/| $$ \ $$'
|
||||
echo '|______/|__/ \__/ \______/ |__/ |__/ |__/|________/|________/|__/ |__/ |__/ |______/ \______/ |__/ \__/'
|
||||
echo '.'
|
||||
|
||||
echo '.'
|
||||
echo ' /$$ /$$$$$$ /$$ /$$ /$$$$$$$'
|
||||
echo '| $$ /$$__ $$ | $$$ /$$$ | $$__ $$ /$$'
|
||||
echo '| $$ | $$ \ $$ | $$$$ /$$$$ | $$ \ $$ | $$'
|
||||
echo '| $$ | $$$$$$$$ | $$ $$/$$ $$ | $$$$$$$//$$$$$$$$'
|
||||
echo '| $$ | $$__ $$ | $$ $$$| $$ | $$____/|__ $$__/'
|
||||
echo '| $$ | $$ | $$ | $$\ $ | $$ | $$ | $$'
|
||||
echo '| $$$$$$$$ /$$| $$ | $$ /$$| $$ \/ | $$ /$$| $$ |__/'
|
||||
echo '|________/|__/|__/ |__/|__/|__/ |__/|__/|__/'
|
||||
echo ' '
|
||||
echo ' /$$$$$$ /$$ /$$$$$$$ /$$$$$$'
|
||||
echo ' /$$__ $$| $$ | $$__ $$|_ $$_/'
|
||||
echo '| $$ \__/| $$ | $$ \ $$ | $$'
|
||||
echo '| $$ /$$$$| $$ | $$$$$$$/ | $$'
|
||||
echo '| $$|_ $$| $$ | $$____/ | $$'
|
||||
echo '| $$ \ $$| $$ | $$ | $$'
|
||||
echo '| $$$$$$/| $$$$$$$$| $$ /$$$$$$'
|
||||
echo '\______/ |________/|__/ |______/'
|
||||
echo '.'
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Debut HTTPD'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
echo ' - Installation'
|
||||
|
||||
yum install httpd -y
|
||||
|
||||
echo ' - Configuration service'
|
||||
|
||||
systemctl enable httpd
|
||||
systemctl start httpd
|
||||
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Fin HTTPD'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Debut MySQL'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
echo ' - Installation'
|
||||
|
||||
sudo mv /Vagrantfiles/mariadb.repo /etc/yum.repos.d/mariadb.repo
|
||||
|
||||
yum install mariadb-server MariaDB-backup mariadb -y
|
||||
|
||||
echo ' - Configuration'
|
||||
|
||||
sudo passwd root<<EOF
|
||||
P@ssw0rds
|
||||
P@ssw0rds
|
||||
EOF
|
||||
|
||||
sudo systemctl start mariadb<<EOF
|
||||
P@ssw0rds
|
||||
EOF
|
||||
|
||||
sudo /usr/bin/mysqladmin -u root password 'P@ssw0rds'
|
||||
|
||||
sudo mysql_secure_installation<<EOF
|
||||
P@ssw0rds
|
||||
n
|
||||
y
|
||||
n
|
||||
y
|
||||
y
|
||||
EOF
|
||||
|
||||
echo ' - Configuration service'
|
||||
|
||||
systemctl enable mariadb
|
||||
systemctl start mariadb
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Fin MySQL'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Debut PHP'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
echo ' - Installation'
|
||||
|
||||
rpm -Uvh http://rpms.remirepo.net/enterprise/remi-release-7.rpm
|
||||
|
||||
yum-config-manager --enable remi-php71
|
||||
|
||||
yum install php -y
|
||||
yum install php-mysql php-fpm php-opcache php-mysqlnd php-pdo php-gd php-ldap php-odbc php-pear php-xml -y
|
||||
yum install php-xmlrpc php-opcache php-mbstring php-soap curl curl-devel php-pear-CAS php-imap php-apcu -y
|
||||
yum install php-simplexml php-zlib php-session php-mysqli php-json ph-fileinfo php-cli php-domxml php-openssl -y
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Fin PHP'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Debut PHPMyAdmin'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
echo ' - Installation'
|
||||
|
||||
yum -y install phpMyAdmin -y
|
||||
|
||||
echo ' - Configuration'
|
||||
|
||||
echo ' -- Creation du fichier : phpMyAdmin.conf'
|
||||
|
||||
sudo mv /Vagrantfiles/phpMyAdmin.conf /etc/httpd/conf.d/phpMyAdmin.conf
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Fin PHPMyAdmin'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
cd /var/www/html/
|
||||
|
||||
sudo tee info.php <<-EOF
|
||||
<?php
|
||||
phpinfo();
|
||||
?>
|
||||
EOF
|
||||
|
||||
echo ' - Restart service HTTPD'
|
||||
|
||||
systemctl restart httpd
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Debut Firewall'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
firewall-cmd --permanent --zone=public --add-service=http
|
||||
firewall-cmd --permanent --zone=public --add-service=https
|
||||
firewall-cmd --reload
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Fin Firewall'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Debut Installation GLPI'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
mkdir -p /opt/glpi && cd /opt/glpi
|
||||
|
||||
wget https://github.com/glpi-project/glpi/releases/download/9.4.5/glpi-9.4.5.tgz
|
||||
|
||||
tar zxvf glpi-9.4.5.tgz
|
||||
|
||||
sudo mv /opt/glpi/glpi/* /var/www/html/
|
||||
|
||||
sudo chmod 755 -R /var/www/html/*
|
||||
|
||||
sudo chmod 777 -R /var/www/html/files/
|
||||
sudo chmod 777 -R /var/www/html/config/
|
||||
sudo chmod 755 -R /var/www/html/files/.htaccess
|
||||
|
||||
echo '.'
|
||||
echo '**********************'
|
||||
echo '* INSTALLATION: Fin Installation GLPI'
|
||||
echo '**********************'
|
||||
echo '.'
|
||||
|
||||
cat > /etc/motd << EOF
|
||||
|
||||
/$$$$$$$$ /$$$$$$ /$$$$$$$ /$$$$$$ /$$$$$$ /$$$$$$$$ /$$ /$$ /$$$$$$ /$$ /$$ /$$$$$$$$
|
||||
|__ $$__/|_ $$_/| $$__ $$ /$$__ $$ /$$__ $$| $$_____/ | $$$ /$$$|_ $$_/| $$$ | $$| $$_____/
|
||||
| $$ | $$ | $$ \ $$| $$ \__/ | $$ \ $$| $$ | $$$$ /$$$$ | $$ | $$$$| $$| $$
|
||||
| $$ | $$ | $$$$$$$/| $$$$$$ /$$$$$$| $$ | $$| $$$$$ /$$$$$$| $$ $$/$$ $$ | $$ | $$ $$ $$| $$$$$
|
||||
| $$ | $$ | $$____/ \____ $$|______/| $$ | $$| $$__/|______/| $$ $$$| $$ | $$ | $$ $$$$| $$__/
|
||||
| $$ | $$ | $$ /$$ \ $$ | $$ | $$| $$ | $$\ $ | $$ | $$ | $$\ $$$| $$
|
||||
| $$ /$$$$$$| $$ | $$$$$$/ | $$$$$$/| $$ | $$ \/ | $$ /$$$$$$| $$ \ $$| $$$$$$$$
|
||||
|__/ |______/|__/ \______/ \______/ |__/ |__/ |__/|______/|__/ \__/|________/
|
||||
|
||||
|
||||
Bienvenue dans la version Centos 7 Linux.Apache.MySQL.PHP
|
||||
|
||||
- Apache 2.4, MySQL Mariadb 8 and PHP 7.1
|
||||
|
||||
|
||||
To test your environment is correctly working, just open following URL from your Host OS:
|
||||
http://localhost/info.php
|
||||
|
||||
EOF
|
Reference in New Issue
Block a user