Ticker

6/recent/ticker-posts

Install glpi on amazon linux-2

Install glpi on amazon linux-2







Install nginx or apache

Install mysql or mariadb and create user for glpi and a database


Here using ngnix


Install php 7.4


# sudo amazon-linux-extras enable php7.4

# sudo yum clean metadata

# sudo yum install php-cli php-pdo php-fpm php-json php-mysqlnd php-dom php-mbstring php-simplexml php-json php-fileinfo 


Download glpi


# wget https://github.com/glpi-project/glpi/releases/download/10.0.1/glpi-10.0.1.tgz


# tar xvf glpi-10.0.1.tgz


Move  glpi to the apache or nginx web folder



# sudo mv glpi /usr/share/nginx/html/


# sudo chown -R nginx:nginx /usr/share/nginx/html/glpi


# sudo chmod -R 755 /usr/share/nginx/html/glpi


Give write permission to some folder inside glpi


# sudo chmod 777 -R  /usr/share/nginx/html/glpi/files/_log

# sudo chmod 777 /usr/share/nginx/html/glpi/files/_cache.

# sudo chmod 777 /usr/share/nginx/html/glpi/files/_cache

#  sudo chmod 777 /usr/share/nginx/html/glpi/files/_cache/remove.txt 

#  sudo chmod 777 /usr/share/nginx/html/glpi/config

# sudo chmod 777/usr/share/nginx/html/glpi/files/_cron

# sudo chmod 777 /usr/share/nginx/html/glpi/files/_cron

# sudo chmod 777 /usr/share/nginx/html/glpi/files

#  sudo chmod 777 /usr/share/nginx/html/glpi/files/_dumps

# sudo chmod 777 /usr/share/nginx/html/glpi/files/_graphs

# sudo chmod 777 /usr/share/nginx/html/glpi/files/_lock

# sudo chmod 777  /usr/share/nginx/html/glpi/files/_pictures 

#sudo chmod 777 /usr/share/nginx/html/glpi/files/_plugins 

# sudo chmod 777 /usr/share/nginx/html/glpi/files/_rss 

# sudo chmod 777  /usr/share/nginx/html/glpi/files/_sessions

# sudo chmod 777  /usr/share/nginx/html/glpi/files/_tmp

# sudo chmod 777 /usr/share/nginx/html/glpi/files/_uploads



 # sudo chmod 777 -R /usr/share/nginx/html/glpi/marketplace


Go to web browser


192.168.2.14/glpi


And continue give the the created database password


If you got an error HTTP_REFERER


The change 


change server_name to your server ip(glpi address : http://192.168.2.14/glpi/) in nginx.conf like below:

server_name 192.168.2.14;

OR

change server_name to your domain name(glpi address : http://www.example.com/glpi) in nginx.conf like below:

server_name www.example.com;



Or


sudo vim /etc/nginx/fastcgi_params


Change this line to     $server_name; to  $host;


fastcgi_param  SERVER_NAME        $server_name;


fastcgi_param  SERVER_NAME        $host;



Enable time zone in glpi

# mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -p -u root mysq

# mysql -p -u root mysql



mysql> GRANT SELECT ON `mysql`.`time_zone` To 'glpi'@'localhost';

mysql> GRANT SELECT ON `mysql`.`time_zone_name` To 'glpi'@'localhost';

mysql> flush privileges;

mysql>exit;


# sudo php /usr/share/nginx/html/glpi/bin/console glpi:database:enable_timezones


Post a Comment

0 Comments