glpi : adaptationx pour debian 8.2 ...
This commit is contained in:
		@@ -1,10 +1,11 @@
 | 
				
			|||||||
# GLPI
 | 
					# GLPI
 | 
				
			||||||
 | 
					
 | 
				
			||||||
**glpi**  installe une VM Debian 11 avec :
 | 
					**glpi**  installe une VM Debian 12 avec :
 | 
				
			||||||
  * **apache2**
 | 
					  * **nginx**
 | 
				
			||||||
  * **php** (7.4) et les paquets associés
 | 
					  * **php-fpm** (8.2)  et les paquets associés
 | 
				
			||||||
  * **mariadb-server**
 | 
					  * **mariadb-server**
 | 
				
			||||||
  * **GLPI** 10.0.7
 | 
					  * **GLPI** 10.0.17
 | 
				
			||||||
 | 
					  * carte réseau en NAT avec redirection du port TCP 2080
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Installation
 | 
					## Installation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -14,14 +15,16 @@
 | 
				
			|||||||
  vagrant ssh
 | 
					  vagrant ssh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  sudo mysql_secure_administration
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
### avec un navigateur :
 | 
					### avec un navigateur :
 | 
				
			||||||
 | 
					
 | 
				
			||||||
se connecter à l'URL http://loclahost:2080/glpi  
 | 
					se connecter à l'URL http://localhost:2080  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
lancer l'installation de **GLPI**
 | 
					lancer l'installation de **GLPI**
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  * la base **glpi** est déja créée
 | 
				
			||||||
 | 
					  * mdp root mariadb : Azerty1+ 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
## Utilisation
 | 
					## Utilisation
 | 
				
			||||||
 | 
					
 | 
				
			||||||
**Acces SSH** :  vagrant ssh
 | 
					**Acces SSH** :  vagrant ssh
 | 
				
			||||||
@@ -30,5 +33,5 @@ lancer l'installation de **GLPI**
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
**Acces ssh** : ssh root@localhost -p 2022
 | 
					**Acces ssh** : ssh root@localhost -p 2022
 | 
				
			||||||
 | 
					
 | 
				
			||||||
le 2023-05-04
 | 
					le 2025-01-08
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										39
									
								
								glpi/Vagrantfile
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										39
									
								
								glpi/Vagrantfile
									
									
									
									
										vendored
									
									
								
							@@ -12,7 +12,7 @@ Vagrant.configure("2") do |config|
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  # Every Vagrant development environment requires a box. You can search for
 | 
					  # Every Vagrant development environment requires a box. You can search for
 | 
				
			||||||
  # boxes at https://vagrantcloud.com/search.
 | 
					  # boxes at https://vagrantcloud.com/search.
 | 
				
			||||||
  config.vm.box = "debian/bullseye64"
 | 
					  config.vm.box = "debian/bookworm64"
 | 
				
			||||||
  config.vm.hostname = "glpi"
 | 
					  config.vm.hostname = "glpi"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  # Disable automatic box update checking. If you disable this, then
 | 
					  # 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
 | 
					   config.vm.provision "shell", inline: <<-SHELL
 | 
				
			||||||
#     export http_proxy=http://10.121.38.1:8080
 | 
					#     export http_proxy=http://10.121.38.1:8080
 | 
				
			||||||
#     export https_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
 | 
					     timedatectl set-timezone Europe/Paris
 | 
				
			||||||
     apt-get update
 | 
					     apt-get update
 | 
				
			||||||
     export DEBIAN_FRONTEND=noninteractive
 | 
					     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
 | 
					     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 https://github.com/glpi-project/glpi/releases/download/10.0.7/glpi-10.0.7.tgz
 | 
					     cd /var/www/html 
 | 
				
			||||||
     tar xvfz glpi-10.0.7.tgz 
 | 
					     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
 | 
					     chown -R root:root glpi
 | 
				
			||||||
     cd glpi
 | 
					     cd glpi
 | 
				
			||||||
     chown -R www-data:www-data files config 
 | 
					     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;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						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 apache2
 | 
					
 | 
				
			||||||
 | 
					     systemctl restart nginx php8.2-fpm
 | 
				
			||||||
     echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config
 | 
					     echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config
 | 
				
			||||||
     systemctl restart ssh
 | 
					     systemctl restart ssh
 | 
				
			||||||
     echo 'connexion SSH avec vagrant : vagrant ssh'
 | 
					     echo 'connexion SSH avec vagrant : vagrant ssh'
 | 
				
			||||||
     echo 'connexion SSH : ssh root@localhost -p 2022'
 | 
					     echo 'connexion GLPI web : http://localhost:2080'
 | 
				
			||||||
     echo 'connexion web : http://localhost:2080'
 | 
					 | 
				
			||||||
     echo 'connexion phpmyadmin : http://localhost:2080/glpi'
 | 
					 | 
				
			||||||
   SHELL
 | 
					   SHELL
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user