Ech0 - 00 / 00 / 00

GLPI debian10

Before we start, you will need a Debian 10+ VPS (you can get one on digitalocean for example), if you prefer to use your own self hosted server, make sure that port 80 and 443 are correctly port forwarded so that the public ip points to the server and not the router. Once that's done, go and ssh into your debian 10 server.

You can use DuckDNS to get a free domain name:


[ 192.168.100.1/24 ] [ /dev/pts/13 ] [~/Documents/Github/blog/Conf]
→ ssh root@ech4.duckdns.org
The authenticity of host 'ech4.duckdns.org (178.128.46.38)' can't be established.
ECDSA key fingerprint is SHA256:z2HAncB99pfbAUfj9tJY7vlo8EGUzCIUxWBAnjAflcA.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'ech4.duckdns.org,178.128.46.38' (ECDSA) to the list of known hosts.
Linux debian-s-1vcpu-1gb-lon1-01 4.19.0-10-cloud-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
root@debian-s-1vcpu-1gb-lon1-01:~#

Initial Setup

First install the required dependencies:


apt update -y && apt upgrade -y 
apt install -y socat git nginx mariadb-server php7.3-fpm php7.3 php7.3-curl php7.3-zip php7.3-gd php7.3-intl php-pear php-imagick php7.3-imap php-memcache php7.3-pspell php7.3-recode php7.3-tidy php7.3-xmlrpc php7.3-xsl php7.3-mbstring php-gettext php7.3-ldap php-cas php-apcu php7.3-mysql #libapache2-mod-php7.3
	

mysql -u root -p


CREATE DATABASE glpidb;
GRANT ALL PRIVILEGES ON glpidb.* TO 'glpiuser'@'localhost' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
EXIT;


cd /tmp/
wget -c https://github.com/glpi-project/glpi/releases/download/9.4.3/glpi-9.4.3.tgz
tar -xvf glpi-9.4.3.tgz
 mv glpi /var/www/html/
 chmod 755 -R /var/www/html/
 chown www-data:www-data -R /var/www/html/

Then get the nginx configuration:


wget https://ech1.github.io/blog/servers/glpi/glpi.conf -O /etc/nginx/sites-available/glpi.conf
ln -s /etc/nginx/sites-available/glpi.conf /etc/nginx/sites-enabled/glpi.conf
nano /etc/nginx/sites-available/glpi.conf 


nginx -t
wget -O -  https://get.acme.sh | sh
source ~/.bashrc

systemctl stop nginx
acme.sh --issue --standalone -d ech2.duckdns.org -k 4096
nginx -t


cd /etc/php/7.3/

echo 'date.timezone = Europe/Paris' >> fpm/php.ini
echo 'date.timezone = Europe/Paris' >> cli/php.ini

echo 'cgi.fix_pathinfo=0' >> fpm/php.ini
echo 'cgi.fix_pathinfo=0' >> cli/php.ini

echo 'memory_limit = 64M ; // Minimum 
Valuefile_uploads = on ;
max_execution_time = 600 ; // Optional but not mandatory
register_globals = off ;  // Optional but not mandatory
magic_quotes_sybase = off ;
session.auto_start = off ;
session.use_trans_sid = 0 ; // Optional but not mandatory' >> fpm/php.ini


echo 'memory_limit = 64M ; // Minimum 
Valuefile_uploads = on ;
max_execution_time = 600 ; // Optional but not mandatory
register_globals = off ;  // Optional but not mandatory
magic_quotes_sybase = off ;
session.auto_start = off ;
session.use_trans_sid = 0 ; // Optional but not mandatory' >> cli/php.ini

sed -i  "s/^listen.*sock/listen\ =\ 127.0.0.1:9000/gi" /etc/php/7.3/fpm/pool.d/www.conf 

systemctl restart nginx php7.3-fpm mysql

Then goto your web interface:

Here we put our database credentials:

localhost / glpiuser / password

Then just hit "continue" at everything and login on the glpi login page: (credentials are glpi:glpi)

2




	

	

	

3




	

	

	

My Bunker

Some Address 67120,
Duttlenheim, France.

About Ech0

This cute theme was created to showcase your work in a simple way. Use it wisely.