• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[HOWTO] GLPI 0.80.5 & FusionInventory with beta deploy on Ubuntu 10.04
#1
:: This HowTo for Ubuntu 10.04 LTS is under construction and not yet tested ::

NOTE!! This is just for testing the beta development from FusionInventory with the deployment feature!!

DO NOT DO THIS ON A SERVER IN PRODUCTION

______________________________________________________________________________________

#HowTo ver. alpha 1.0 last updated 24.11.2011
#changed: 15.11.2011 - install script updated
#changed: 16.11.2011 - install script updated (log added, exit & continued corrected)
#changed: 24.11.2011 - install script updated (check existing glpi installation)
______________________________________________________________________________________

0) If installing new server, choose LAMP & SSH
[Image: 00000508.png]

1) After server installed, check ip of server and go to a computer with web browser:
[Image: 00000509.png]

2) Open a SSH connection to your server (ssh username@serverip). Now you have two options:
i) do the installation procedure manually
ii) use the installation script (under development, not yet tested and uploaded)
______________________________________________________________________________________
#MANUAL INSTALLATION

1) If the server is a new installation, update the system

Code:
sudo apt-get update && apt-get dist-upgrade

i) reboot after updates just in case

2) open SSH to the server and install GPLI as root
[Image: 00000511.png]

3) if you are installing on a clean system, you can continue the steps with ok
http://content.screencast.com/users/su_r...000512.png
http://content.screencast.com/users/su_r...000513.png
http://content.screencast.com/users/su_r...000515.png
http://content.screencast.com/users/su_r...000515.png
http://content.screencast.com/users/su_r...000516.png

4) when installed, open a web browser and go to your server: http://ip-of-server/glpi/ to test that the installation and system is working
[Image: 00000517.png]

username: glpi
password. glpi

5) now we update to GPLI 0.80.5
Code:
cd /usr/share
wget https://forge.indepnet.net/attachments/download/995/glpi-0.80.5.tar.gz
[Image: 00000518.png]

6) purge GLPI 0.80.5

[Image: 00000519.png]

7) make dir config & files writable for www-user

TODO: add howto get the plugins

xxx) Go to setup > plugins and check that the following plugins are installed and activated
[Image: 00000521.png]

______________________________________________________________________________________
#INSTALL BETA AGENT ON WINDOWS BOX

I) Download the beta FusionInventory agent:
http://prebuilt.fusioninventory.org/tmp/...0-1618.exe

II) on windows test box, install the beta agent (NOTE THAT ON THE SCREENSHOT BELOW there is HTTPS, it should only be HTTP!)
[Image: 00000522.png]

______________________________________________________________________________________

TODO: clean up HowTo!
______________________________________________________________________________________

Installation script (partially tested on clean Ubuntu 10.04 LTS):

Code:
#!/bin/bash

# Author C.Langfors
# Modify as you please

Version="Script ver. Alpha 1.0 23.11.2011"

LOGFILE=/tmp/install_glpi.log

checkglpi=/usr/share/glpi

if [ -d $checkglpi ]; then
        echo " " ;
        echo "  **!!!!! found GLPI old installation, aborting...!!!** ";
        echo " " ;
        echo " please remove the old GLPI installation before testing beta ver. ";
exit
else
clear
        echo " " ;
        echo " GLPI not found, proceeding installation now... ";
        echo " " ;
fi
sleep 5;
clear;

        echo " ";
        echo " ";
        echo "    This will install GPLI 0.80.5 & FusinoInventory beta on machine $HOSTNAME";
        echo "";
        echo "  ##########################################################################";
        echo "  #                                                                        #";
        echo "  # PLEASE DO NOT RUN THIS ON A SERVER IN PRODUCTION                       #";
        echo "  #                                                                        #";
        echo "  # This is just testing the newest features from GLPI and FusionInventory #";
        echo "  #                                                                        #";
        echo "  ##########################################################################";
        echo "      $Version";
        echo " ";

#       echo -n "press Q to quit or any other key to continue installing ";
        echo "";
        echo "Please note that you need to run this as root, you are now $USER";
        echo "";
        echo "";

#read var
#if [ $var = "Q" || "q" ]
#then
#clear
#       echo "";
#       echo "";
#       echo "Ok, user input Q recorded, exiting install script."
#       echo "";
#       echo "";
#exit 1
#fi

read -p "Do you want to continue installation ? [Y]es, [N]o : " response
case $response in
        [Yy]* ) ;;
    [Nn]* ) exit 99;;
    * ) echo "Wrong answer: please press Y or N."; exit 1;;
esac

touch /tmp/install_glpi.log

clear;

        echo "";
        echo "";
        echo " Ok, starting installation..."
        echo "";
        echo "";

sleep 3;

# Update distro before beginning
        echo "...updating system...";
apt-get update && apt-get dist-upgrade >/dev/null

# Add FusionInventory to repository
echo deb http://debian.fusioninventory.org/debian/ stable main >> $LOGFILE
wget -O - http://debian.fusioninventory.org/debian/archive.key | apt-key add - >> $LOGFILE

# Update and install the neccessary things
        echo "Will now install the necessary software..";
apt-get update >/dev/null
apt-get --assume-yes install unzip >/dev/null
apt-get --assume-yes install php5-xmlrpc >/dev/null
apt-get --assume-yes install libcrypt-ssleay-perl >/dev/null
apt-get --assume-yes install fusioninventory-agent  >> $LOGFILE
apt-get --assume-yes install glpi  >> $LOGFILE

clear
        echo "ok, updated what we need. Now we'll download the plugins..";


cd /usr/share/
wget https://forge.indepnet.net/attachments/download/995/glpi-0.80.5.tar.gz  >> $LOGFILE

tar -xvzf glpi-0.80.5.tar.gz  >> $LOGFILE
cd /usr/share/glpi/plugins

wget http://prebuilt.fusioninventory.org/tmp/fusinvdeploy/fusinvdeploy.zip  >> $LOGFILE
wget http://prebuilt.fusioninventory.org/tmp/fusinvdeploy/webservices.zip  >> $LOGFILE
wget http://forge.fusioninventory.org/attachments/download/456/fusioninventory-for-glpi-metapackage_2.4.0.tar.gz $

tar -xvzf fusioninventory-for-glpi-metapackage_2.4.0.tar.gz  >> $LOGFILE

unzip fusinvdeploy.zip  >> $LOGFILE
unzip webservices.zip  >> $LOGFILE

        echo "That's it, now restarting Apache..";

service apache2 restart  >> $LOGFILE

sleep 5

clear

        echo " Changing permissions on /usr/share/glpi , files and config..";
        echo "";
        echo " Please correct this after GLPI-update done!";

cd /usr/share/glpi
chmod -R 777 files config

        echo "";
        echo "";
        echo " Ok, now go to http://IP-OF-SERVER/glpi/ to complete setup.";
        echo "";
        echo " Please also note that you need to activate the plugins manually:";
        echo " http://IP-OF-SERVER/glpi/front/plugin.php";
        echo "";
  Reply
#2
TODO:

1) This needs to be done in a better way (Quit or continue) [corrected 16.11.2011]
  Reply
#3
Hello Chris,

You can do that with traps. I think than you know about that but always you can see these links...

http://www.davidpashley.com/articles/wri...ripts.html and
http://tldp.org/LDP/Bash-Beginners-Guide...12_02.html
Tomás Abad
  Reply
#4
Hello Tomás,

Actually I did not know, I'm not good at this.

Thank You for the info!

BR,
Chris
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)