Results 1 to 4 of 4

Thread: Test OCS Inventory 1.02.1 and GLPI 0.72.21 to EMS 8.0 Beta

  1. #1
    Join Date
    Jul 2009
    Posts
    77

    Test OCS Inventory 1.02.1 and GLPI 0.72.21 to EMS 8.0 Beta

    I propose a small test dedicated to OCS Inventory NG and GLPI ... Howto cut OCS Inventory NG Server into 3 steps, I am still restricted to SME 8.x only

    OCS Inventory NG Server
    Code:
    mkdir-p / root / OCS_Dep 
    cd / root / OCS_Dep 
    yum install perl-XML-Simple - enablerepo =*-y 
    wget apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/php-pecl-zip-1.8.10-1.el5.rf.i386.rpm 
    wget apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/perl-Apache-DBI-1.07-1.el5.rf.noarch.rpm 
    wget apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/perl-SOAP-Lite-0.710.08-1.el5.rf.noarch.rpm 
    wget apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/perl-MIME-Lite-3.025-1.el5.rf.noarch.rpm 
    wget apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/perl-Net-Jabber-2.0-1.2.el5.rf.noarch.rpm 
    wget apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/perl-Net-XMPP-1.02-1.el5.rf.noarch.rpm 
    wget apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/perl-Email-Date-Format-1.002-1.el5.rf.noarch.rpm 
    wget apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/perl-XML-Stream-1.22-1.2.el5.rf.noarch.rpm 
    localinstall yum *. rpm - enablerepo =*-y 
    
    # # INSTALL 
    wget% downloads.sourceforge.net/project/ocsinventory/OCS 20Inventory% 20NG/1.02/OCSNG_UNIX_SERVER-1.02.1.tar.gz? use_mirror = surfnet 
    tar-xzf OCSNG_UNIX_SERVER-1.02.1.tar.gz 
    cd OCSNG_UNIX_SERVER-1.02.1 
    sh setup.sh 
    # # During Setup, LEAVE ALL BY DEFAULT 
    
    # # CREATE USER & MySQL DB 
    mysqladmin-u root create ocs 
    mysqladmin-u root create ocsweb 
    mysql-e "grant all privileges on ocs .* to 'ocs' @ 'localhost'" 
    mysql-e "grant all privileges on ocsweb .* to 'ocs' @ 'localhost'" 
    mysql-u root-e "SET PASSWORD FOR ocs @ localhost = PASSWORD ( 'SCO')" 
    mysqladmin flush-privileges 
    
    # # APACHE CONFIG 
    mv-ocsinventory reports.conf.local / etc/e-smith/templates/etc/httpd/conf/httpd.conf/98ocs-reports 
    mv / z-ocsinventory-server.conf / etc/e-smith/templates/etc/httpd/conf/httpd.conf/99ocs-comm_server 
    rm-f / ocsinventory-reports.conf 
    sed-i 's / AuthUserFile "APACHE_AUTH_USER_FILE" / # AuthUserFile "APACHE_AUTH_USER_FILE" / g' / etc/e-smith/templates/etc/httpd/conf/httpd.conf/99ocs-comm_server 
    sed-i 's / # # AuthUserFile "APACHE_AUTH_USER_FILE" / # AuthUserFile "APACHE_AUTH_USER_FILE" / g' / etc/e-smith/templates/etc/httpd/conf/httpd.conf/99ocs-comm_server 
    / sbin / e-smith / config setprop modperl status enabled 
    / sbin / e-smith / config setprop mysqld InnoDB enabled 
    
    # # Apply Changes 
    expand-template / etc / httpd / conf / httpd.conf 
    / etc/rc7.d/S86httpd-e-smith SIGUSR1 
    / sbin / e-smith / expand-template / etc / my.cnf 
    service mysqld restart 2> / dev / null> / dev / null 
    / sbin / e-smith / signal-event domain-modify 
    
    # # CLEAN UP 
    cd / root 
    rm-rf / root / OCS_Dep 
    
    # # SETUP 
    http://yourdomain.com/ocsreports/install.php
    OCS Inventory NG Agent
    Code:
    mkdir-p / root / OCSAGENT_Dep 
    cd / root / OCSAGENT_Dep 
    wget ftp://ftp.pbone.net/mirror/rpms.famillecollet.com/enterprise/5/remi/i386/ocsinventory-agent-1.0.1-4.el5.remi.noarch.rpm 
    wget http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/monitor-edid-2.1-1.el5.rf.i386.rpm 
    wget http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/perl-Proc-Daemon-0.03-1.2.el5.rf.noarch.rpm 
    localinstall yum *. rpm - enablerepo =*-y 
    
    # # CONFIG 
    cat> / etc / ocsinventory / ocsinventory-agent.cfg <<EOF 
    # 
    Inventory # SCO Unix Unified Agent "Configuration File 
    # 
    # Options used by cron job overides this (see / etc / sysconfig / ocsinventory-agent) 
    # 
    
    # Server URL, if needed unconmment 
    # Server = your.ocsserver.name 
    server = 192.168.0.253 
    
    Administrative TAG # (optional, must be filed before first inventory) 
    tag = LAN 
    
    # How to log, can be File, stderr, syslog 
    logger = Stderr 
    logfile = / var / log / ocsinventory-agent / ocsinventory-agent.log 
    EOF 
    
    # # LAUNCH 1ST INVENTORY 
    ocsinventory-agent 
    
    # # CLEAN UP 
    cd / root 
    rm-rf / root / OCSAGENT_Dep
    GLPI
    Code:
    mkdir-p / root / GLPI_Dep 
    cd / root / GLPI_Dep 
    wget ftp: //mirror.switch.ch/pool/1/mirror/epel/5/i386/php-pecl-json-1.2.1-4.el5.i386.rpm 
    localinstall *. rpm yum-y 
    
    # # INSTALL 
    cd / usr / share / ocsinventory-reports 
    wget http://www.glpi-project.org/IMG/gz/glpi-0.72.21.tar.gz 
    tar-xzf glpi-0.72.21.tar.gz 
    cd / usr / share / ocsinventory-reports / glpi / plugins 
    wget https: / / forge.indepnet.net/attachments/download/433/glpi-massocsimport-1.3.0.tar.gz - no-check-certificate 
    tar-xzf glpi-massocsimport-1.3.0.tar.gz 
    chown-R root: www / usr / share / ocsinventory-reports / glpi 
    chmod-R 775 / usr / share / ocsinventory-reports / glpi / config 
    chmod-R 775 / usr / share / ocsinventory-reports / glpi / files 
    
    # # CREATE USER & MySQL DB 
    mysqladmin-u root create glpi 
    mysql-e "grant all privileges on glpi .* to 'glpi' @ 'localhost'" 
    mysql-u root-e "SET PASSWORD FOR glpi @ localhost = PASSWORD ( 'glpi')" 
    mysqladmin flush-privileges 
    
    # # APACHE CONFIG 
    cat> / etc / php.d / json.ini <<EOF 
    ; Enable json extension module 
    extension = json.so 
    EOF 
    cat> / etc/e-smith/templates/etc/httpd/conf/httpd.conf/98glpi <<EOF 
    #------------------------------------------------- ------------- 
    # GLPI 
    #------------------------------------------------- ------------- 
    Alias / glpi / usr / share / ocsinventory-reports / glpi 
    
    <Directory /usr/share/ocsinventory-reports/glpi> 
    AddType application / x-httpd-php. Php. Php3. Phtml 
    Options None 
    Options + Indexes 
    Options + Includes 
    order deny, allow 
    deny from all 
    Allow from all 
    php_admin_value open_basedir / usr / share / ocsinventory-reports / glpi /: / tmp 
    php_value memory_limit 64M 
    <Files Helpdesk.html> 
    ForceType text / html; charset = utf-8 
    </ Files> 
    </ Directory> 
    
    <Directory /usr/share/ocsinventory-reports/glpi/config> 
    order deny, allow 
    deny from all 
    </ Directory> 
    
    <Directory /usr/share/ocsinventory-reports/glpi/files> 
    order deny, allow 
    deny from all 
    </ Directory> 
    
    <Directory /usr/share/ocsinventory-reports/glpi/locales> 
    order deny, allow 
    deny from all 
    </ Directory> 
    
    <Directory /usr/share/ocsinventory-reports/glpi/install/mysql> 
    order deny, allow 
    deny from all 
    </ Directory> 
    #------------------------------------------------- ------------- 
    
    EOF 
    
    # # Apply Changes 
    expand-template / etc / httpd / conf / httpd.conf 
    / etc/rc7.d/S86httpd-e-smith SIGUSR1 
    
    # # CLEAN UP 
    cd / root 
    rm-rf / root / GLPI_Dep 
    rm-f / usr/share/ocsinventory-reports/glpi/plugins/glpi-massocsimport-1.3.0.tar.gz 
    rm-f / usr/share/ocsinventory-reports/glpi-0.72.21.tar.gz 
    
    # # SETUP GLPI 
    yourdomain.com/glpi

  2. #2
    Join Date
    May 2008
    Posts
    2,945

    Re: Test OCS Inventory 1.02.1 and GLPI 0.72.21 to EMS 8.0 Beta

    Great test, clear and sharp ! This brings a new smeserver-inventory rpm for version 8! However, I would like to report a small bug that would like to develop since the GLPI 0.68: indeed it seems that the code has changed in the function uploadDocument since this version, which has the effect of preventing the upload of files when one wants to add a file has a reference document (upload potential attack, or rather message $LANG('document'[27]).

    My first reaction was to seek a rights issue (chmod-R 777, yes I know it's wrong! But not prod it and then searching for a bug ...) but obviously, it does not seem to come away.

    So? for now I know, I think I'll look to environment variables php!

  3. #3
    Join Date
    Jul 2009
    Posts
    77

    Re: Test OCS Inventory 1.02.1 and GLPI 0.72.21 to EMS 8.0 Beta

    I begin by adding access to /tmp in the template for Apache.

    Code:
    php_admin_value open_basedir /usr/share/ocsinventory-reports/glpi/:/tmp
    I hope this works.

  4. #4
    Join Date
    May 2008
    Posts
    2,945

    Re: Test OCS Inventory 1.02.1 and GLPI 0.72.21 to EMS 8.0 Beta

    Thanks, it works

    So to summarize:
    in the file /etc/e-smith/templates/etc/httpd/conf/httpd.conf/98glpi
    we must add /tmp line php_admin_value open_basedir /usr/share/ocsinventory-reports/glpi/

    which gives us the line:
    php_admin_value open_basedir /usr/share/ocsinventory-reports/glpi/ :/tmp

    or the contents of the following file:
    #--------------------------------------------------------------
    # GLPI
    #--------------------------------------------------------------
    Alias /glpi /usr/share/ocsinventory-reports/glpi

    <Directory /usr/share/ocsinventory-reports/glpi>
    AddType application/x-httpd-php .php .php3 .phtml
    Options None
    Options +Indexes
    Options +Includes
    order deny,allow
    deny from all
    allow from all
    php_admin_value open_basedir /usr/share/ocsinventory-reports/glpi/:/tmp
    php_value memory_limit 64M
    <Files helpdesk.html>
    ForceType text/html;charset=utf-8
    </Files>
    </Directory>

    <Directory /usr/share/ocsinventory-reports/glpi/config>
    order deny,allow
    deny from all
    </Directory>

    <Directory /usr/share/ocsinventory-reports/glpi/files>
    order deny,allow
    deny from all
    </Directory>

    <Directory /usr/share/ocsinventory-reports/glpi/locales>
    order deny,allow
    deny from all
    </Directory>

    <Directory /usr/share/ocsinventory-reports/glpi/install/mysql>
    order deny,allow
    deny from all
    </Directory>
    #--------------------------------------------------------------

Similar Threads

  1. Replies: 5
    Last Post: 27-08-2011, 07:45 AM
  2. Zipper Interactive to public beta test MAG
    By Maxforu in forum Video Games
    Replies: 2
    Last Post: 05-05-2009, 10:29 PM
  3. Replies: 6
    Last Post: 20-06-2006, 07:20 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,751,816,206.67255 seconds with 16 queries