It’s free software that enables users to inventory IT assets.

Step1. Install Epel repository

yum install epel-release

Step2. Install apache

yum install httpd 

Step3. Create a database repo file

vi  /etc/yum.repos.d/MariaDB.repo

[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.4/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

Step4. Install database

yum -y install MariaDB-server MariaDB-client

Step5. Install PHP

yum install -y php php-common php-domxml php-gd php-imap php-ldap php-mbstring php-mysql php-opcache php-pdo php-pear-CAS php-pecl-apcu php-pecl-zip php-soap php-xmlrpc

Step6. Install Perl

# yum install -y perl-Archive-Zip perl-Compress-Zlib perl-DBD-MySQL perl-DBI perl-Mojolicious perl-Net-IP perl-Plack perl-SOAP-Lite perl-Switch perl-XML-Entities perl-XML-Simple

Step7. Add lines in /etc/php.ini file

post_max_size = 100M
upload_max_filesize = 100M

Step8. Restart and enable services

systemctl  start httpd
systemctl enable httpd
systemctl start mariadb
systemctl enable mariadb

Step9. Setup database

mysql_secure_installation 

Step10. Create a database

mysql -u root -p
create database ocsweb;
create user 'ocs'@'localhost' identified by 'ocs';
grant all privileges on ocsweb.* to ocs@localhost;
flush privileges;
exit;

Step11. Install OCS inventory rpm

cd /opt/
yum install -y https://rpm.ocsinventory-ng.org/ocsinventory-release-latest.el7.ocs.noarch.rpm

Step12. Install OCS package

yum install ocsinventory-server
 
OR

Step13. Download OCS latest — Download latest version of “OCSNG_UNIX_SERVER-2.4.x.tar.gz”

wget https://github.com/OCSInventory-NG/OCSInventory-ocsreports/releases/download/2.6/OCSNG_UNIX_SERVER_2.6.tar.gz

Step14. Untar file

tar -xzvf OCSNG_UNIX_SERVER_2.6.tar.gz

Step15. Run setup file

cd OCSNG_UNIX_SERVER_2.6/
sh setup.sh

Step16. Set permission

chmod 777   /usr/share/ocsinventory-reports/ocsreports
chown -R apache:apache /var/lib/ocsinventory-reports/ 

Step17. Restart the services

systemctl restart httpd
systemctl restart mariadb.service

Step18. Disable the SELinux

setenforce 0

Step19. Access via browser

http://192.168.106.128/ocsreports 

Step20. Put the database credentials

host: localhost
Username: root
Password: Redhat@123_000
Databasename: ocsweb

Step21. Click -> Next

Step22. Login with default credentials

Username: admin
Password: admin

LEAVE A REPLY

Please enter your comment!
Please enter your name here