Showing posts with label Asset Inventory. Show all posts
Showing posts with label Asset Inventory. Show all posts

November 10, 2017

Upgrade GLPI 0.90.1 to 9.2 and Configure Email Notification (09/11/2017)

Before Upgrade you need:
I) Backup of your old configuration
- First of all, please perform the following operations :

- Backup your database through the use of backup interface.
- Backup the full directory where GLPI is installed (including the SQL database backup and your documents.
II) Retrieve and install files
- Download lastest version tarball available from download section on the website (http://glpi-project)
- GLPI 9.2 requires minimum version of 5.6 for PHP, 

- if your version PHP not ok, you need to upgrade PHP version, read this post


III) Update process start
1) Launch your web browser on this address http://192.168.17.69/glpi

2) Check error & Click Upgrade to continue


Error:

- Install Zend Opcache
- Install Apcu

#yum install php-pecl-zendopcache
#yum install php-pecl-apcu
#service httpd restart



SELinux boolean configuration for  httpd_can_sendmail ==> unknown (Some features may require this to be on)

SELinux boolean configuration for  httpd_can_network_connect  ==> unknown (Some features may require this to be on)

SELinux boolean configuration for  httpd_can_network_connect_db ==> unknown (Some features may require this to be on)

Solve:

# sestatus -b | grep -i sendmail
Which revealed
#httpd_can_sendmail off 
#logging_syslogd_can_sendmail off

This meant that the beloved apache server was hatefully not allowed to send out emails

# setsebool -P httpd_can_sendmail 1

# setsebool -P httpd_can_network_connect 1

# setsebool -P httpd_can_network_connect_db 1




3) Click Use GLPI to proceed.






IV) Setup Notification







and send a test mail



V) Create a ticket 



Assigned Ticket to a staff





Check mail administrator & staff



Performance


Done, thank you so much...

Review install glpi here

November 9, 2017

Install GLPI on CentOS


GLPI is the Information Resource-Manager with an additional Administration- Interface. You can use it to build up a database with an inventory for your company (computer, software, printers...). It has enhanced functions to make the daily life for the administrators easier, like a job-tracking-system with mail-notification and methods to build a database with basic information about your network-topology.

The principal functionalities of the application are :

1) the precise inventory of all the technical resources. All their characteristics will be stored in a database.

2) management and the history of the maintenance actions and the bound procedures. This application is dynamic and is directly connected to the users who can post requests to the technicians. An interface thus authorizes the latter with if required preventing the service of maintenance and indexing a problem encountered with one of the technical resources to which they have access.

Step 1, Install LAMP server 

Reference this post to install  LAMP server:  

Step 2,  Create Database for GLPI

mysql> create database glpi;
Query OK, 1 row affected (0.02 sec)

mysql> grant all privileges on glpi.* to glpi@localhost identified by 'glpi';
Query OK, 0 rows affected (0.01 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye

# /etc/init.d/mysqld restart

Step 3, Download and extract GLPI...

# cd /var/www/html
# wget https://github.com/glpi-project/glpi/releases/download/9.2/glpi-9.2.tgz
Extract the tarball using command:
# tar -zxvf glpi-9.2.tar.tgz
# chmod -R 777 glpi/config/
# chmod -R 777 glpi/files/

# /etc/init.d/httpd restart

Step 4, Install GLPI...
Open web Browser and type URL.. http://192.168.17.69/glpi/install/install.php
You should see the following screen. Select your language and click Ok.


Accept the License agreement and click Ok


click Install button


If all seems well, you should click continue
If there are any errors, check for the file permissions and start over the installation again.


Error: Web access to the files directory, should not be allowed. Check the .htaccess file and the web server configuration.

#vi /etc/httpd/conf/httpd.conf

<Directory "/var/www/html">
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important.  Please see
# http://httpd.apache.org/docs/2.2/mod/core.html#options
# for more information.
#
    Options Indexes FollowSymLinks
#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
    AllowOverride All
#
# Controls who can get stuff from this server.
#
    Order allow,deny
    Allow from all

</Directory>

Here change AllowOverride None to AllowOverride All
that's all

Enter the MySQL credentials such as hostname, user and password and click Continue.


If you have already created a MySQL database it should have listed in the next screen as shown below, else you have to create a new one by clicking on the link Create new database. I have already created a database called ‘glpi’, hence i selected it


Click Continue


Congratulations! We have installed GLPI on our server successfully.


Note- The default user accounts and their passwords will be shown in the above window.
- glpi/glpi for the administrator account
- tech/tech for the technician account
- normal/normal for the normal account
- post-only/postonly for the postonly account

Please note them. You can change them later.

Click Use GLPI to proceed. Let us log in to GLPI administrative Dashboard. The administrative user name is glpi and password is also glpi.


The Administrative Dashboard looks


You need to change password glpi admin account and And also you have to remove the install/install.php file for security reasons.

#rm /var/www/glpi/install/install.php


After completing your installation change the permission of the config/config_db.php file to avoid any misconfiguration by users.
# chmod 400 /var/www/glpi/config/config_db.php




Finish part 1

Part 2 upgrade & configure email notification 

Hope you like this
----------||||-------------

August 24, 2016

Install OCS Inventory NG Agent 2.1 on Windows Operating Systems.

Download OCS Inventory: Windows Agent  from Here
1. Run “OCS-NG-Windows-Agent-Setup.exe” on client computer..



2. and click “Next” button


3. Validate license agreement by clicking “I agree” button.

4. Click "Next" button

5. Fill in OCS Inventory NG Communication server URL, like http://192.168.15.51/ocsinventory & Validate certificates....and click Next


6. Next

7. By default, OCS Inventory Agent write only few information in log files. You may increase this enabling “Verbose log”. You may also enable TAG question, or specify the TAG value. and immediatly Launch inventory just at the end of setup.


8. Click Install

9. Click Finish and check Start OCS inventory NG systray Applet



10. View info on server



Finished!

August 17, 2016

How to install OCS Inventory 2.2.1 on CentOS 6.7

System:
CentOS release 6.7 (Final)
Ip address: 192.168.15.51
SELINUX=disabled

1. Setup CentOS Server
2. Using Script below to setup PHP, MYSQL, PHPMYADMIN,
#!/bin/bash
# ******************************************
# Program: LAMP Stack Installation Script
# Developer: La Dai Hiep
# Date: 17-08-2016
# Last Updated: 17-08-2016
# ******************************************
setenforce 0
yum -y update
yum -y install wget
sudo yum -y install httpd mysql mysql-server mysql-devel php php-mysql php-fpm;
service mysqld start
/usr/bin/mysql_secure_installation
service mysqld restart
wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
rpm --import https://fedoraproject.org/static/0608B895.txt
rpm -ivh epel-release-6-8.noarch.rpm
sudo yum -y install php-mbstring php-gd httpd-devel apxs php-mcrypt php-mysql pdo-mysql php-sqlite php-mcrypt php-soap;
sudo yum -y install epel-release rpm-build redhat-rpm-config;
sudo yum -y install mysql-community-release-el7-5.noarch.rpm proj;
sudo yum -y install tinyxml libzip mysql-workbench-community;
sudo chmod 755 -R /var/www/;
sudo printf "<?php\nphpinfo();\n?>" > /var/www/html/info.php;
cd //var/www/html
wget https://files.phpmyadmin.net/phpMyAdmin/4.0.10.15/phpMyAdmin-4.0.10.15-all-languages.zip
echo y | yum install unzip
unzip phpMyAdmin-4.0.10.15-all-languages.zip
rm -rf phpMyAdmin-4.0.10.15-all-languages.zip
mv phpMyAdmin-4.0.10.15-all-languages/ phpmyadmin
sudo service mysqld restart;
sudo service httpd restart;
sudo chkconfig httpd on;
sudo chkconfig mysqld on;

save file .sh, upload to server and run it with command :
# bash lamp.sh or bash -x lamp.sh
2. open EPEL Repository and set enabled=0
vi /etc/yum.repos.d/epel.repo
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 6 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug
mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1

[epel-source]
name=Extra Packages for Enterprise Linux 6 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS
mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

"/etc/yum.repos.d/epel.repo" 26L, 954C

3.Iptables add ports 80 for Apache & 3306 for MySql
# iptables -I INPUT -m multiport -p tcp --dport 80,3306 -j ACCEPT
# service iptables save
# service iptables restart

or stop iptables service:
#services iptables stop
#chkconfig iptables off

4.Install OCS Inventory pre-requisite packages
yum install -y php php-gd php-mysql php-mbstring mod_perl php-pecl-zip php-common libphp-pclzip libxml-simple-perl libio-compress-perl libdbi-perl libdbd-mysql-perl libapache-dbi-perl libnet-ip-perl libsoap-lite-perl php-gd php5-gd perl-XML-Simple perl-Net-IP perl-SOAP-Lite httpd-devel perl-DBI perl-DBD-MySQL perl-Compress-Zlib perl-Apache-DBI
yum install -y --enablerepo=epel perl-Apache-DBI perl-Apache2-SOAP perl-XML-Entities
if you get error:
[root@ocs opt]# yum install -y --enablerepo=epel perl-Apache-DBI perl-Apache2-SOAP perl-XML-Entities
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
Error: Cannot retrieve metalink for repository: epel. Please verify its path and try again
open vi /etc/yum.repos.d/epel.repo
change https to http and then it start working.
[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=0
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 6 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug
mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=epel-debug-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1

[epel-source]
name=Extra Packages for Enterprise Linux 6 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS
mirrorlist=http://mirrors.fedoraproject.org/metalink?repo=epel-source-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1
Configure CPAN:
#cpan -i XML::Entities
5. Download and setup OCS Inventory
# cd /var/www/html
wget https://github.com/OCSInventory-NG/OCSInventory-ocsreports/releases/download/2.2.1/OCSNG_UNIX_SERVER-2.2.1.tar.gz
tar –xvzf OCSNG_UNIX_SERVER-2.2.1.tar.gz

# rm -rf OCSNG_UNIX_SERVER-2.2.1.tar.gz
cd OCSNG_UNIX_SERVER-2.2.1
sh setup.sh


+----------------------------------------------------------+
|                                                          |
| Welcome to OCS Inventory NG Management server setup !    |
|                                                          |
+----------------------------------------------------------+
Trying to determine whitch OS or Linux distribution you use
+----------------------------------------------------------+
| Checking for Apache web server binaries !                |
+----------------------------------------------------------+
CAUTION: If upgrading Communication server from OCS Inventory NG 1.0 RC2 and
previous, please remove any Apache configuration for Communication Server!

Do you wish to continue ([y]/n)? y
Assuming Communication server 1.0 RC2 or previous is not installed
on this computer.

Starting OCS Inventory NG Management server setup from folder /opt/OCSNG_UNIX_SERVER-2.1.2
Storing log in file /opt/OCSNG_UNIX_SERVER-2.1.2/ocs_server_setup.log
+----------------------------------------------------------+
| Checking for database server properties...               |
+----------------------------------------------------------+
Your MySQL client seems to be part of MySQL version 5.1.
Your computer seems to be running MySQL 4.1 or higher, good ;-)

Which host is running database server [localhost] ? [hit Enter]
OK, database server is running on host localhost ;-)

On which port is running database server [3306] ? [hit Enter]
OK, database server is running on port 3306 ;-)
+----------------------------------------------------------+
| Checking for Apache web server daemon...                 |
+----------------------------------------------------------+
Where is Apache daemon binary [/usr/sbin/httpd] ? [hit Enter]
OK, using Apache daemon /usr/sbin/httpd ;-)
+----------------------------------------------------------+
| Checking for Apache main configuration file...           |
+----------------------------------------------------------+
Where is Apache main configuration file [/etc/httpd/conf/httpd.conf] ? [hit Enter]
OK, using Apache main configuration file /etc/httpd/conf/httpd.conf ;-)
+----------------------------------------------------------+
| Checking for Apache user account...                      |
+----------------------------------------------------------+
Which user account is running Apache web server [apache] ? [hit Enter]
OK, Apache is running under user account apache ;-)
+----------------------------------------------------------+
| Checking for Apache group...                             |
+----------------------------------------------------------+
Which user group is running Apache web server [apache] ? [hit Enter]
OK, Apache is running under users group apache ;-)
+----------------------------------------------------------+
| Checking for Apache Include configuration directory...   |
+----------------------------------------------------------+
Setup found Apache Include configuration directory in
/etc/httpd/conf.d/.
Setup will put OCS Inventory NG Apache configuration in this directory.
Where is Apache Include configuration directory [/etc/httpd/conf.d/] ? [hit Enter]
OK, Apache Include configuration directory /etc/httpd/conf.d/ found ;-)
+----------------------------------------------------------+
| Checking for PERL Interpreter...                         |
+----------------------------------------------------------+
Found PERL Intrepreter at </usr/bin/perl> ;-)
Where is PERL Intrepreter binary [/usr/bin/perl] ? [hit Enter]
OK, using PERL Intrepreter /usr/bin/perl ;-)
Do you wish to setup Communication server on this computer ([y]/n)? y
+----------------------------------------------------------+
| Checking for Make utility...                             |
+----------------------------------------------------------+
OK, Make utility found at </usr/bin/make> ;-)
+----------------------------------------------------------+
| Checking for Apache mod_perl version...                  |
+----------------------------------------------------------+
Checking for Apache mod_perl version 1.99_22 or higher
Found that mod_perl version 1.99_22 or higher is available.
OK, Apache is using mod_perl version 1.99_22 or higher ;-)
+----------------------------------------------------------+
| Checking for Communication server log directory...       |
+----------------------------------------------------------+
Communication server can create detailled logs. This logs can be enabled
by setting interger value of LOGLEVEL to 1 in Administration console
menu Configuration.
Where to put Communication server log directory [/var/log/ocsinventory-server] ? [hit Enter]
OK, Communication server will put logs into directory /var/log/ocsinventory-server ;-)
+----------------------------------------------------------------------------+
| Checking for Communication server plugins configuration directory...       |
+----------------------------------------------------------------------------+
Communication server need a directory for plugins configuration files. 
Where to put Communication server plugins configuration files [/etc/ocsinventory-server/plugins] ? [hit Enter]
OK, Communication server will put plugins configuration files into directory /etc/ocsinventory-server/plugins ;-)
+-------------------------------------------------------------------+
| Checking for Communication server plugins perl directory...       |
+-------------------------------------------------------------------+
Communication server need a directory for plugins Perl modules files.
Where to put Communication server plugins Perl modules files [/etc/ocsinventory-server/perl] ? [hit Enter]
OK, Communication server will put plugins Perl modules files into directory /etc/ocsinventory-server/perl ;-)
+----------------------------------------------------------+
| Checking for required Perl Modules...                    |
+----------------------------------------------------------+
Checking for DBI PERL module...
Found that PERL module DBI is available.
Checking for Apache::DBI PERL module...
Found that PERL module Apache::DBI is available.
Checking for DBD::mysql PERL module...
Found that PERL module DBD::mysql is available.
Checking for Compress::Zlib PERL module...
Found that PERL module Compress::Zlib is available.
Checking for XML::Simple PERL module...
Found that PERL module XML::Simple is available.
Checking for Net::IP PERL module...
Found that PERL module Net::IP is available.
+----------------------------------------------------------+
| Checking for optional Perl Modules...                    |
+----------------------------------------------------------+
Checking for SOAP::Lite PERL module...
Found that PERL module SOAP::Lite is available.
Checking for Apache2::SOAP PERL module...
*** Warning: PERL module Apache2::SOAP is not installed !
This module is only required by OCS Inventory NG SOAP Web Service.
Do you wish to continue ([y]/n] ? y
Checking for XML::Entities PERL module...
Found that PERL module XML::Entities is available.
+----------------------------------------------------------+
| OK, looks good ;-)                                       |
|                                                          |
| Configuring Communication server Perl modules...         |
+----------------------------------------------------------+
Checking if your kit is complete...
Looks good
Writing Makefile for Apache::Ocsinventory
+----------------------------------------------------------+
| OK, looks good ;-)                                       |
|                                                          |
| Preparing Communication server Perl modules...           |
+----------------------------------------------------------+
+----------------------------------------------------------+
| OK, prepare finshed ;-)                                  |
|                                                          |
| Installing Communication server Perl modules...          |
+----------------------------------------------------------+
+----------------------------------------------------------+
| OK, Communication server Perl modules install finished;-)|
|                                                          |
| Creating Communication server log directory...           |
+----------------------------------------------------------+
Creating Communication server log directory /var/log/ocsinventory-server.
Fixing Communication server log directory files permissions.
Configuring logrotate for Communication server.
Removing old communication server logrotate file /etc/logrotate.d/ocsinventory-NG
Writing communication server logrotate to file /etc/logrotate.d/ocsinventory-server
+-----------------------------------------------------------------------------+
| OK, Communication server log directory created ;-)                          |
|                                                                             |
| Creating Communication server plugins configuration directory...            |
+-----------------------------------------------------------------------------+
Creating Communication server plugins configuration directory /etc/ocsinventory-server/plugins.
+-----------------------------------------------------------------------------+
| OK, Communication server plugins configuration directory created ;-)        |
|                                                                             |
| Creating Communication server plugins Perl directory...                     |
+-----------------------------------------------------------------------------+
Creating Communication server plugins Perl directory /etc/ocsinventory-server/perl.
+-------------------------------------------------------------------+
| OK, Communication server plugins Perl directory created ;-)       |
|                                                                   |
| Now configuring Apache web server...                              |
+-------------------------------------------------------------------+
To ensure Apache loads mod_perl before OCS Inventory NG Communication Server,
Setup can name Communication Server Apache configuration file
'z-ocsinventory-server.conf' instead of 'ocsinventory-server.conf'.
Do you allow Setup renaming Communication Server Apache configuration file
to 'z-ocsinventory-server.conf' ([y]/n) ? y
OK, using 'z-ocsinventory-server.conf' as Communication Server Apache configuration file
Removing old communication server configuration to file /etc/httpd/conf.d//ocsinventory.conf
Writing communication server configuration to file /etc/httpd/conf.d//z-ocsinventory-server.conf
+----------------------------------------------------------+
| OK, Communication server setup sucessfully finished ;-)  |
|                                                          |
| Please, review /etc/httpd/conf.d//z-ocsinventory-server.conf
| to ensure all is good. Then restart Apache daemon.       |
+----------------------------------------------------------+
Do you wish to setup Administration Server (Web Administration Console)
on this computer ([y]/n)? y
+----------------------------------------------------------+
| Checking for Administration Server directories...        |
+----------------------------------------------------------+
CAUTION: Setup now install files in accordance with Filesystem Hierarchy
Standard. So, no file is installed under Apache root document directory
(Refer to Apache configuration files to locate it).
If you're upgrading from OCS Inventory NG Server 1.01 and previous, YOU
MUST REMOVE (or move) directories 'ocsreports' and 'download' from Apache
root document directory.
If you choose to move directory, YOU MUST MOVE 'download' directory to
Administration Server writable/cache directory (by default
/var/lib/ocsinventory-reports), especialy if you use deployement feature.
Do you wish to continue ([y]/n)? y
Assuming directories 'ocsreports' and 'download' removed from
Apache root document directory.
Where to copy Administration Server static files for PHP Web Console
[/usr/share/ocsinventory-reports] ? [hit Enter]
OK, using directory /usr/share/ocsinventory-reports to install static files ;-)
Where to create writable/cache directories for deployement packages,
administration console logs, IPDiscover and SNMP [/var/lib/ocsinventory-reports] ? [hit Enter]
OK, writable/cache directory is /var/lib/ocsinventory-reports ;-)
+----------------------------------------------------------+
| Checking for required Perl Modules...                    |
+----------------------------------------------------------+
Checking for DBI PERL module...
Found that PERL module DBI is available.
Checking for DBD::mysql PERL module...
Found that PERL module DBD::mysql is available.
Checking for XML::Simple PERL module...
Found that PERL module XML::Simple is available.
Checking for Net::IP PERL module...
Found that PERL module Net::IP is available.
+----------------------------------------------------------+
| Installing files for Administration server...            |
+----------------------------------------------------------+
Creating PHP directory /usr/share/ocsinventory-reports/ocsreports.
Copying PHP files to /usr/share/ocsinventory-reports/ocsreports.
Fixing permissions on directory /usr/share/ocsinventory-reports/ocsreports.
Creating database configuration file /usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php.
Creating IPDiscover directory /var/lib/ocsinventory-reports/ipd.
Fixing permissions on directory /var/lib/ocsinventory-reports/ipd.
Creating packages directory /var/lib/ocsinventory-reports/download.
Fixing permissions on directory /var/lib/ocsinventory-reports/download.
Creating snmp mibs directory /var/lib/ocsinventory-reports/snmp.
Fixing permissions on directory /var/lib/ocsinventory-reports/snmp.
Creating Administration server log files directory /var/lib/ocsinventory-reports/logs.
Fixing permissions on directory /var/lib/ocsinventory-reports/logs.
Creating Administration server scripts log files directory /var/lib/ocsinventory-reports/scripts.
Fixing permissions on directory /var/lib/ocsinventory-reports/scripts.
Configuring IPDISCOVER-UTIL Perl script.
Installing IPDISCOVER-UTIL Perl script.
Fixing permissions on IPDISCOVER-UTIL Perl script.
Writing Administration server configuration to file /etc/httpd/conf.d//ocsinventory-reports.conf
+----------------------------------------------------------+
| OK, Administration server installation finished ;-)      |
|                                                          |
| Please, review /etc/httpd/conf.d//ocsinventory-reports.conf
| to ensure all is good and restart Apache daemon.         |
|                                                          |
| Then, point your browser to http://server//ocsreports
| to configure database server and create/update schema.   |
+----------------------------------------------------------+
Setup has created a log file /opt/OCSNG_UNIX_SERVER-2.1.2/ocs_server_setup.log. Please, save this file.
If you encounter error while running OCS Inventory NG Management server,

we can ask you to show us his content !

DON'T FORGET TO RESTART APACHE DAEMON !
Enjoy OCS Inventory NG 😉

# service httpd restart

6. Perform initial OCS config then login to OCS (Note: It automatically create database ocsweb, with login: ocs,password: ocs)


Mysql login: root
Mysql password: yourpass when setup mysql above
Name of Database: ocsweb
Mysql Hostname: localhost

increase post_max_size and upload_max_filesize in /etc/php.ini

post_max_size = 200M
upload_max_filesize = 200M

if you get error:


OCS-NG Inventory Installation

DB configuration not completed. Automatic install launched

ERROR: can't write in directory (on dbconfig.inc.php), please set the required rights in order to install ocsinventory (you should remove the write mode after the installation is successfull)

# Chmod -R 777  dbconfig.inc.php 

Next:



7. Clear up OCS Inventory security warning


- Delete install.php (or can rename it)
# rm /usr/share/ocsinventory-reports/ocsreports/install.php
- Go to http://192.168.15.51/phpmyadmin
Select Users ocs ==> Edit Privileges

Scroll down Change password field
input the password ==> GO



- Change default admin password
setup-ocs-6
setup-ocs-7
8. Change default MySQL ocs password
- Using phpMyAdmin find user ocs then change the password.
- Change MySQL user ocs password in /usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php
#
vi /usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php
<?php
define("DB_NAME", "ocsweb");
define("SERVER_READ","localhost");
define("SERVER_WRITE","localhost");
define("COMPTE_BASE","ocs");
define("PSWD_BASE","newpassword");
?>
- Change MySQL user ocs password in /etc/httpd/conf.d/z-ocsinventory-server.conf
..
# Master Database settings
# Replace localhost by hostname or ip of MySQL server for WRITE
PerlSetEnv OCS_DB_HOST localhost
# Replace 3306 by port where running MySQL server, generally 3306
PerlSetEnv OCS_DB_PORT 3306
# Name of database
PerlSetEnv OCS_DB_NAME ocsweb
PerlSetEnv OCS_DB_LOCAL ocsweb
# User allowed to connect to database
PerlSetEnv OCS_DB_USER ocs (root)
# Password for user
PerlSetVar OCS_DB_PWD newpassword
..
Repair error below
setup-ocs-8
# chmod -R 777 /usr/share/ocsinventory-reports/ocsreports/plugins/main_sections/conf/old_conf/
# chmod -R 777 /usr/share/ocsinventory-reports/ocsreports/plugins/main_sections/conf/sadmin_config.txt
**Upgrade to new version OCS Inventory NG
At first you must backup your mysql database
#mysqldump -u root -p ocsweb > ocs-database-save.sql
or export database through phpmyadmin
Next you must backup the files /etc/httpd/conf.d/ocsinventory-server.conf and /etc/httpd/conf.d/ocsinventory-reports.conf that you will find in the apache config directory.
after, simply run the setup.sh that you will find in the tar.gz you downloaded on http://www.ocsinventory-ng.org. It will overide the currently installed version. After having install it, go on ocsreports and launch the update procedure for the database.
After update, thinks to change your mysql access credentials in ocsreports and in the server. restore your database and 2 files ocsinventory-server.conf  & ocsinventory-reports.conf 
Setting the Timezone OCS inventory for PHP in the php.ini file

Default timezone PHP Version 5.4.45 is UTC
i'm in Asia so i need to change timezone to Asia/Ho_Chi_Minh

1. Go to  
Loaded Configuration File/opt/remi/php54/root/etc/php.ini
# vi /opt/remi/php54/root/etc/php.ini
2. Jump line:
Replace "US/Central" with the timezone from here that corresponds to the time you want to display.
[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone ="Asia/Ho_Chi_Minh"
3. save and quit
DONE!
References:
http://www.toyaseta.com/setup-ocs-inventory-2-1-2-on-centos-6.html
http://wiki.ocsinventory-ng.org/index.php/Documentation:Server
http://phreek.org/guides/install-ocs-inventory-ng-20-on-centos-6
http://www.vr4servers.com/how-to-install-configure-ocsinventory-2-1-server-on-centos-6-5-64bit/
https://www.howtoforge.com/how-to-install-ocs-inventory-ng-server-2-on-centos-5.5
http://wiki.ocsinventory-ng.org/index.php?title=Howtos:Upgrade_OCS_from_1.3.3_to_2.0.x
http://ask.ocsinventory-ng.org/5/how-upgrade-ocs-inventory-ng
http://www.miloszengel.com/ocs-ng-2-2rc1-server-complete-install-and-configuration-with-ldap/
http://wiki.ocsinventory-ng.org/index.php?title=Documentation:Secure