Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
b5b2181d4f | |||
58fce0cb34 |
@ -1,10 +1,11 @@
|
||||
# GLPI
|
||||
|
||||
**glpi** installe une VM Debian 11 avec :
|
||||
* **apache2**
|
||||
* **php** (7.4) et les paquets associés
|
||||
**glpi** installe une VM Debian 12 avec :
|
||||
* **nginx**
|
||||
* **php-fpm** (8.2) et les paquets associés
|
||||
* **mariadb-server**
|
||||
* **GLPI** 10.0.7
|
||||
* **GLPI** 10.0.17
|
||||
* carte réseau en NAT avec redirection du port TCP 2080
|
||||
|
||||
## Installation
|
||||
|
||||
@ -14,14 +15,16 @@
|
||||
vagrant ssh
|
||||
|
||||
|
||||
sudo mysql_secure_administration
|
||||
|
||||
### avec un navigateur :
|
||||
|
||||
se connecter à l'URL http://loclahost:2080/glpi
|
||||
se connecter à l'URL http://localhost:2080
|
||||
|
||||
lancer l'installation de **GLPI**
|
||||
|
||||
* la base **glpi** est déja créée
|
||||
* mdp root mariadb : Azerty1+
|
||||
|
||||
## Utilisation
|
||||
|
||||
**Acces SSH** : vagrant ssh
|
||||
@ -30,5 +33,5 @@ lancer l'installation de **GLPI**
|
||||
|
||||
**Acces ssh** : ssh root@localhost -p 2022
|
||||
|
||||
le 2023-05-04
|
||||
le 2025-01-08
|
||||
|
||||
|
41
glpi/Vagrantfile
vendored
41
glpi/Vagrantfile
vendored
@ -12,7 +12,7 @@ Vagrant.configure("2") do |config|
|
||||
|
||||
# Every Vagrant development environment requires a box. You can search for
|
||||
# boxes at https://vagrantcloud.com/search.
|
||||
config.vm.box = "debian/bullseye64"
|
||||
config.vm.box = "debian/bookworm64"
|
||||
config.vm.hostname = "glpi"
|
||||
|
||||
# Disable automatic box update checking. If you disable this, then
|
||||
@ -68,24 +68,45 @@ Vagrant.configure("2") do |config|
|
||||
config.vm.provision "shell", inline: <<-SHELL
|
||||
# export http_proxy=http://10.121.38.1:8080
|
||||
# export https_proxy=http://10.121.38.1:8080
|
||||
export GLPIVER=10.0.17
|
||||
timedatectl set-timezone Europe/Paris
|
||||
apt-get update
|
||||
export DEBIAN_FRONTEND=noninteractive
|
||||
apt-get install -y vim wget curl git apache2 php php-mysql php-ldap php-gd php-intl php-xml php-curl php-zip mariadb-server
|
||||
( cd /var/www/html
|
||||
wget https://github.com/glpi-project/glpi/releases/download/10.0.7/glpi-10.0.7.tgz
|
||||
tar xvfz glpi-10.0.7.tgz
|
||||
apt-get install -y vim wget curl git nginx php-fpm php-mysql php-ldap php-gd php-intl php-mbstring php-xml php-curl php-zip mariadb-server
|
||||
(
|
||||
cd /var/www/html
|
||||
wget -4 -nc https://github.com/glpi-project/glpi/releases/download/${GLPIVER}/glpi-${GLPIVER}.tgz
|
||||
tar xvfz glpi-${GLPIVER}.tgz
|
||||
chown -R root:root glpi
|
||||
cd glpi
|
||||
chown -R www-data:www-data files config
|
||||
)
|
||||
cat > /etc/nginx/sites-enabled/glpi <<- "EOT"
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
root /var/www/html/glpi;
|
||||
index index.php index.html
|
||||
server_name _;
|
||||
location / {
|
||||
try_files $uri $uri/ =404;
|
||||
}
|
||||
|
||||
# systemctl restart apache2
|
||||
location ~ \.php$ {
|
||||
include snippets/fastcgi-php.conf;
|
||||
fastcgi_pass unix:/run/php/php8.2-fpm.sock;
|
||||
}
|
||||
}
|
||||
EOT
|
||||
rm /etc/nginx/sites-enabled/default
|
||||
sudo mysqladmin password "Azerty1+"
|
||||
sudo mysqladmin create glpi
|
||||
)
|
||||
|
||||
|
||||
systemctl restart nginx php8.2-fpm
|
||||
echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config
|
||||
systemctl restart ssh
|
||||
echo 'connexion SSH avec vagrant : vagrant ssh'
|
||||
echo 'connexion SSH : ssh root@localhost -p 2022'
|
||||
echo 'connexion web : http://localhost:2080'
|
||||
echo 'connexion phpmyadmin : http://localhost:2080/glpi'
|
||||
echo 'connexion GLPI web : http://localhost:2080'
|
||||
SHELL
|
||||
end
|
||||
|
17
zabbix/README.md
Normal file
17
zabbix/README.md
Normal file
@ -0,0 +1,17 @@
|
||||
# Zabbix
|
||||
|
||||
## Présentation
|
||||
|
||||
Cette Vagrantfile :
|
||||
* créée la VM **zabbix7**, installe **zabbix-server** 7.2, apache2, mariadb-server ainsi que **zabbix-agent**
|
||||
* créée la VM **web1**, installe apache2 ainsi que **zabbix-agent2** (mode active) et l'inscrit sur **zabbix7**
|
||||
|
||||
|
||||
## Mode opératoire
|
||||
- vagrant up zabbix7
|
||||
- vagrant up web1
|
||||
- une fois connecté à zabbix7 (Admin/zabbix)
|
||||
ajouter l'hote avec son adresse IP 192.168.56.10 et les templates :
|
||||
linux serveur
|
||||
serveur web apache zabbix-agent 2
|
||||
|
18
zabbix/Vagrantfile
vendored
18
zabbix/Vagrantfile
vendored
@ -75,18 +75,20 @@ Vagrant.configure("2") do |config|
|
||||
# documentation for more information about their specific syntax and use.
|
||||
zabbix7.vm.provision "shell", inline: <<-SHELL
|
||||
timedatectl set-timezone Europe/Paris
|
||||
apt-get update
|
||||
apt-get update && apt upgrade -y
|
||||
apt-get install -y wget curl vim
|
||||
wget https://repo.zabbix.com/zabbix/7.0/debian/pool/main/z/zabbix-release/zabbix-release_7.0-2+debian12_all.deb
|
||||
dpkg -i zabbix-release_7.0-2+debian12_all.deb
|
||||
wget https://repo.zabbix.com/zabbix/7.2/release/debian/pool/main/z/zabbix-release/zabbix-release_latest_7.2+debian12_all.deb
|
||||
dpkg -i zabbix-release_latest_7.2+debian12_all.deb
|
||||
apt-get update
|
||||
apt-get install -y apache2 mariadb-server
|
||||
apt-get install -y zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent
|
||||
apt-get install -y zabbix-server-mysql zabbix-frontend-php zabbix-apache-conf zabbix-sql-scripts zabbix-agent
|
||||
echo 'create database zabbix character set utf8mb4 collate utf8mb4_bin;' | mysql -u root
|
||||
echo "create user zabbix@localhost identified by 'password';" | mysql -u root
|
||||
echo 'grant all privileges on zabbix.* to zabbix@localhost;' | mysql -u root
|
||||
echo 'set global log_bin_trust_function_creators = 1;' | mysql -u root
|
||||
zcat /usr/share/zabbix-sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -u zabbix -ppassword zabbix
|
||||
#zcat /usr/share/zabbix/sql-scripts/mysql/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix
|
||||
zcat /usr/share/zabbix/sql-scripts/mysql/server.sql.gz|mysql --default-character-set=utf8mb4 -u zabbix -ppassword zabbix
|
||||
#zcat /usr/share/zabbix/sql-scripts/mysql/server.sql.gz|
|
||||
echo 'set global log_bin_trust_function_creators = 0;' | mysql -u root
|
||||
sed -i 's/# DBPassword=/DBPassword=password/' /etc/zabbix/zabbix_server.conf
|
||||
systemctl restart zabbix-server zabbix-agent apache2
|
||||
@ -104,9 +106,9 @@ Vagrant.configure("2") do |config|
|
||||
timedatectl set-timezone Europe/Paris
|
||||
apt-get update
|
||||
apt-get install -y wget curl vim apache2
|
||||
wget https://repo.zabbix.com/zabbix/7.0/debian/pool/main/z/zabbix-release/zabbix-release_7.0-2+debian12_all.deb
|
||||
dpkg -i zabbix-release_7.0-2+debian12_all.deb
|
||||
apt-get update
|
||||
wget https://repo.zabbix.com/zabbix/7.2/release/debian/pool/main/z/zabbix-release/zabbix-release_latest_7.2+debian12_all.deb
|
||||
dpkg -i zabbix-release_latest_7.2+debian12_all.deb
|
||||
apt update
|
||||
apt install -y zabbix-agent2
|
||||
echo "Server=192.168.56.10" >> /etc/zabbix/zabbix_agent2.conf
|
||||
echo "ServerActive=192.168.56.10" >> /etc/zabbix/zabbix_agent2.conf
|
||||
|
Reference in New Issue
Block a user