Trace:

Differences

This shows you the differences between the selected revision and the current version of the page.

en:glpigentoo 2015/07/03 09:46 current
Line 1: Line 1:
 +
 +====== Install GLPI under Gentoo ======
 +
 +Documentation written by Aurel and translated by Simon Depiets
 +
 +**GLPI installation under Gentoo**
 +
 +First, as before any new installation, synchronise your portage tree. Type in the command below to update your portage. (All the commands must be entered in root)
 +<code>
 +emerge sync
 +</code>
 +
 +
 +The installation order isn't important, but for an easier dependances management, I recommand you to install the archives in the same order than I did.
 +
 +
 +==== I. "Packages" installation : ====
 +
 +
 +=== 1. Apache 2 Installation : ===
 +
 +<code>
 +emerge apache
 +
 +[ebuild  N    ] net-www/apache-2.0.51-r1
 +</code>
 +
 +
 +=== 2. MySQL Installation : ===
 +
 +<code>
 +emerge mysql
 +
 +
 +[ebuild  N    ] dev-db/mysql-4.0.20-r1  +berkdb -debug -innodb +perl +readline -(selinux) +ssl -static +tcpd  13,484 kB
 +[ebuild  N    ] dev-perl/Net-Daemon-0.37  29 kB
 +[ebuild  N    ] dev-perl/Storable-2.07-r1  94 kB
 +[ebuild  N    ] dev-perl/PlRPC-0.2016-r1  17 kB
 +[ebuild  N    ] dev-perl/DBI-1.38  292 kB
 +[ebuild  N    ] dev-perl/DBD-mysql-2.1027  95 kB
 +</code>
 +
 +
 +=== 3. PHP Installation : ===
 +
 +<code>
 +USE="mysql" emerge php
 +
 +
 +[ebuild  N    ] app-text/sablotron-1.0  -doc +perl 
 +[ebuild  N    ] net-libs/libwww-5.4.0-r2  +mysql -ssl 
 +[ebuild  N    ] dev-php/php-4.3.9  -X +berkdb -crypt -curl -debug -debug -doc -fdftk -firebird -flash -freetds -gd -gd-external +gdbm -gmp -hardenedphp -imap -informix -ipv6 -java -jpeg -kerberos -ldap -mcal -memlimit -mssql +mysql +ncurses +nls -oci8 -odbc +pam -pdflib -png -postgres -qt +readline -snmp -spell -ssl -tiff -truetype +xml2 -yaz  3,908 kB
 +</code>
 +USE="mysql" isn't useless, it make php compilation with mysql support.
 +
 +
 +=== 4. mod_php Installation : ===
 +
 +<code>
 +USE="apache2 mysql" emerge dev-php/mod_php
 +</code>
 +
 +Once again USE="apache2 mysql" is useful to build mod_php by telling him he will work with an apache2 server and a MySQL database.
 +
 +
 +
 +==== II. GLPI Installation : ====
 +
 +
 +=== 1. Apache configuration: ===
 +
 +Before starting the installation, you will have to enter some commands ;).
 +First you have to tell the Apache server he must support PHP. You will have to add this line in the
 +/etc/conf.d/apache2
 +file.
 +
 +<code>
 +APACHE2_OPTS="-D PHP4"
 +</code>
 +
 +Enter "/etc/init.d/apache2 start"  command to start the server. If you see "!!", it is that the server didn't start correctly.
 +To know why, enter the following command:
 +
 +<code>
 +more /var/log/apache2/error_log
 +</code>
 +
 +If you see the following error (it produces very often), « Name or service not known: mod_unique_id: unable to find IPv4 address of "XP2700" » this willtell you that your computer name isn't in the /etc/hosts file. So if you do a ping XP2700 (XP 2700 is the computer name), the computer will send back : ping: unknown host XP2700. To avoid this error, edit hosts file and add following line:
 +<code>
 +your_ip                          your_computer_name
 +
 +
 +Ex:
 +
 +127.0.0.1      localhost (by default in your file)
 +192.168.0.20    XP2700
 +</code>
 +
 +Now re-enter "/etc/init.d/apache2 restart" command and the server should start.
 +
 +
 +=== 2. MySQL Configuration: ===
 +
 +Enter the command: "/etc/init.d/mysql start" and if once again it doesn't work it's normal. The following message will appear on your screen :
 +
 +You don't appear to have the mysql database installed yet.
 + * Please run /usr/bin/mysql_install_db to have this done...
 +
 +
 +So it asks you to enter the "/usr/bin/mysql_install_db" command so the server will be able to start.
 +
 +When it's done, enter the command:
 +
 +<code>
 +/etc/init.d/mysql start
 +</code>
 +
 +MySQL is started but you have to secure it a little. So we have to give a password to the mysql root user. Enter the following command:
 +
 +<code>
 +mysqladmin -u root password 'new-password'
 +</code>
 +
 +Type a password in new-password but don't delete the ' which are importants. To make GLPI running you have to create a base called "glpidb". Enter the following command to create it:
 +
 +<code>
 +mysql -u root -p
 +</code>
 +
 +Once you will have pressed "Enter" it will display "Enter password:". Enter the password you've submitted and press "Enter" again. If all went good, you should see a prompt :
 +
 +mysql>
 +
 +Now create glpidb database. Enter the following command:
 +
 +<code>
 +create database glpidb;
 +</code>
 +
 +Now we have to create a glpiuser user which will be able to administrate the database.
 +
 +<code>
 + mysql>grant all privileges on glpidb.* to glpiuser@localhost
 +        ->identified by 'glpiuser_password';
 +</code>
 +
 +Some are thinking I forgot the ";" at the end of the first line, but no, i shouldn't. We put a ";" at the end of a command, not at the end of the line.
 +Put a password in place of glpiuser_password and enter exit to exit.
 +
 +=== 3. GLPI package Installation  :  ===
 +
 +
 +You now have to download the last version of GPLI on the [[ http://glpi-project.org | http://glpi-project.org ]] website, "Download" section.
 +
 +
 +Then you have to unzip the tarball in the /var/www directory Apache created for you :
 +
 +<code>
 +hector#
 +hector#tar -xvzf glpi-X.X.X.tar.gz -C  /var/www/
 +
 +</code>
 +
 +
 +If you take a turn into /var/www/ directory, you will see GLPI has created a GLPI folder.
 +
 +
 +Now you will have to give rights to some folders :
 +
 +
 +<code>
 +hector#
 +hector#cd /var/www/glpi
 +hector#chmod 777 /backups/dump    /glpi/config  /docs/
 +</code>
 +
 +
 +
 +====  GLPI Configuration  ====
 +
 +Now, you will do all online, you have to "visit" your « http://your_server/glpi » directory with a browser.
 +
 +At the first connection to this adress, an install process step-by-step will begin. The frontend is easy, you just have to enter informations asked. Once over, the system will ask you the identification you have types in and you will be able to use GPLI.
 +
 +In case of a major error (ie: you have lost your access to GLPI...), to "rerun" this installation process, you just have delete the followinf file :
 +  *  glpi/config/config_db.php
 +
 +The next connection into « http://your_server/glpi » folder will run again the configuration process (in fact, it's because there is no « config_db.php » file).
 +
 +
 +For more informations about GLPI configuration : see [[ http://glpi-project.org/article.php3?id_article=61 | Install GLPI ]]