martes, 5 de marzo de 2013

instalar ocsinventory en centos 6.0

Hola mis amados lectores, me disculpo con ustedes pero debido al tiempo no me da para traducirlo sino corregir algunas cosas que tal vez no se indican en el original ( casi nada ) pero agradecer a ustedes por su comprensión espero les guste:
Install OCS Inventory-NG 2.0 on CentOS 6

This guide is based on a fresh install of CentOS 6.2 from the Minimal ISO. It assumes you have already performed basic system configuration steps such as setting up networking, time synchronisation, etc. Install the EPEL repo for some pre-requisites
       root@localhost# rpm  -ivH
Edit '/etc/yum.repos.d/epel.repo' and inside the [epel] stanza, set enabled=0 Screenshot Update the base system
  1 [epel]
  2 name=Extra Packages for Enterprise Linux 6 - $basearch
  3 #baseurl=$basearch
  4 mirrorlist=$base    arch
  5 failovermethod=priority
  6 enabled=0
  7 gpgcheck=1
  8 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
  9 ...
root@localhost# yum update -y
Install pre-requisite packages
root@localhost# yum install -y make wget httpd mysql mysql-server php php-gd php-mysql php-mbstring mod_perl perl-XML-Simple perl-Net-IP perl-SOAP-Lite perl-DBI perl-DBD-MySQL
root@localhost# yum install -y --enablerepo=epel perl-Apache-DBI perl-Apache2-SOAP perl-XML-Entities
Perform the initial MySQL setup
root@localhost# mysql_install_db
root@localhost# chkconfig --level 345 mysqld on
root@localhost# service mysqld start
root@localhost# mysql_secure_installation

        Press Enter for current password
        Type a password for the 'root' user
        Re-enter your new 'root' password
        Y to remove anonymous user
        Y to disallow remote logon
        Y to remove the test database
        Y to reload the privilege tables
Create the database for OCS. Replace with your own password (Hint: Don't use 'ocs')
root@localhost# mysql -u root -p

        CREATE DATABASE ocs;
        GRANT ALL PRIVILEGES ON ocs.* to ocs@localhost IDENTIFIED BY '';

    Install OCS (Based on OCS 2.0.4)
root@localhost# cd ~
root@localhost# wget
root@localhost# tar -xvzf OCSNG_UNIX_SERVER*.tar.gz
root@localhost# cd OCSNG_UNIX_SERVER*
root@localhost# sh ./
        Y to continue
        Enter to accept 'localhost' as MySQL server
        Enter to accept '3306' as MySQL port
        Enter to accept '/usr/sbin/httpd' as Apache binary
        Enter to accept '/etc/httpd/conf/httpd.conf' as Apache config file
        Enter to accept 'apache' as Apache user
        Enter to accept 'apache' as Apache group
        Enter to accept '/etc/httpd/conf.d/' as Apache include directory
        Enter to accept '/usr/bin/perl' as Perl interpreter
        Y to install Communication server
        Enter to accept '/var/log/ocsinventory-server' as log directory
        Y to continue with installation
        Y to rename OCS server config to 'z-ocsinventory-server.conf'
        Y to installation Administration server
        Y to continue
        Enter '/var/www' as location for Administration Server static files location
        Enter '/var/www' as location for Download location
Edit /etc/selinux/config
Change SELINUX=enforcing to SELINUX=disabled 
# setenforce 0
Update database settings for OCS Server Screenshot
        Edit '/etc/httpd/conf.d/z-ocsinventory-server.conf'
            Change line 26 (OCS_DB_NAME) from 'ocsweb' to 'ocs'
            Change line 27 (OCS_DB_LOCAL) from 'ocsweb' to 'ocs'
            Change line 31 (OCS_DB_PWD) from 'ocs' to whatever you chose for your MySQL 'ocs' user password
Update IPTables config to allow HTTP on port 80 Screenshot
        Edit '/etc/sysconfig/iptables'
            At line 11 (or just before the final 3 lines) insert

                -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT

        Save the file and exit then run
root@localhost# service iptables restart
Start Apache
root@localhost# chkconfig --level 345 httpd on
root@localhost# service httpd start
configuraciones extras
En el php.ini
root@localhost# vim /etc/php.ini 
 727 ; Maximum size of POST data that PHP will accept.
 728 ;
 729 post_max_size = 200M
 876 ; Maximum allowed size for uploaded files.
 877 ;
 878 upload_max_filesize = 200M
En el my.cnf, sino tiene agregarlo.
root@localhost# vim /etc/my.cnf 
  8 max_allowed_packet=16M
Perform initial OCS config

Visit http://yourserver/ocsreports
You will be shown the database configuration page
Database: ocs
Username: ocs
Hostname: localhost

Click submit and wait a few seconds while the database is setup by the installation script You will get a page which should show that everything was successful. You will be prompted to enter a string to show an agent the first time it contacts the OCS server. I leave it blank and click submit. You will get a page informing you that installation is complete.
Delete the installation script
Ojo dependiendo donde ubiques la ruta por defecto para dicho directorio en mi caso /usr/share/ocsinventory-reports/ocsreports puede ser también en tu caso /var/www/
root@localhost# rm -f /usr/share/ocsinventory-reports/ocsreports/install.php
Visit http://yourserver/ocsreports to login
Username: admin
Password: admin

You should change your 'admin' password after logging in. OCS Server installation is complete. You can now begin deploying your agents.


1 comentario:

Roberto Matus Aros dijo...

Gracias por tu aporte. Ha sido muy valioso.