Skip to main content

How to Setup OCS Inventory Server on Ubuntu



 Installation Steps:

Install Dependency packages

apt install make cmake gcc make libapache2-mod-perl2 libapache-dbi-perl libapache-db-perl libapache2-mod-php 

Edit PHP configuration

nano /etc/php/7.2/apache2/php.ini

file_uploads = On

allow_url_fopen = On

short_open_tag = On

memory_limit = 256M

upload_max_filesize = 100M

max_execution_time = 360

date.timezone = America/Chicago

Mysql Database setup

CREATE DATABASE ocs;

CREATE USER 'ocsuser'@'localhost' IDENTIFIED BY 'password';

GRANT ALL ON ocs.* TO 'ocsuser'@'localhost' WITH GRANT OPTION;

FLUSH PRIVILEGES;

EXIT;

Install and Enable Perl Modules

apt -y install perl libxml-simple-perl libcompress-zlib-perl libdbi-perl libdbd-mysql-perl libnet-ip-perl libsoap-lite-perl libio-compress-perl libapache-dbi-perl libapache2-mod-perl2 libapache2-mod-perl2-dev

perl -MCPAN -e 'install Apache2::SOAP'

perl -MCPAN -e 'install XML::Entities'

perl -MCPAN -e 'install Net::IP'

perl -MCPAN -e 'install Apache::DBI'

perl -MCPAN -e 'install Mojolicious'

perl -MCPAN -e 'install Switch'

perl -MCPAN -e 'install Plack::Handler'

Download OCSInventory-NG  and ocsreports packages

apt install git curl

cd /tmp

git clone https://github.com/OCSInventory-NG/OCSInventory-Server.git

cd OCSInventory-Server

git clone https://github.com/OCSInventory-NG/OCSInventory-ocsreports.git ocsreports

cd /tmp/OCSInventory-Server/ocsreports

curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer

sudo composer install

cd .. 

Edit setup.sh file

nano setup.sh

 This code is open source and may be copied and modified as long as the source

# code is always made freely available.

# Please refer to the General Public Licence http://www.gnu.org/ or Licence.txt

################################################################################

#

# Which host run database server

DB_SERVER_HOST="localhost"

# On which port run database server

DB_SERVER_PORT="3306"

# Database server credentials

DB_SERVER_USER="ocsuser"

DB_SERVER_PWD="password"

# Where is Apache daemon binary (if empty, will try to find it)

APACHE_BIN=""

# Where is Apache configuration file (if empty, will try to find it)

Run setup file

./setup.sh

Add Soft links

ln -s /etc/apache2/conf-available/ocsinventory-reports.conf /etc/apache2/conf-enabled/ocsinventory-reports.conf

ln -s /etc/apache2/conf-available/z-ocsinventory-server.conf /etc/apache2/conf-enabled/z-ocsinventory-server.conf

ln -s /etc/apache2/conf-available/zz-ocsinventory-restapi.conf /etc/apache2/conf-enabled/zz-ocsinventory-restapi.conf

Change ownership

chown -R www-data:www-data /var/lib/ocsinventory-reports

systemctl restart apache2.service

Open browser and access below URL

http://ipaddress/ocsreports/install.php

After configuration is done and logging in, rename below file.

mv /usr/share/ocsinventory-reports/ocsreports/install.php /usr/share/ocsinventory-reports/ocsreports/install.php.bak

Comments

Popular posts from this blog

Play PS2 games in PC using PCSX2 emulator | WWE SMACKDOWN - HERE COMES THE PAIN

Play PS2 games in PC using PCSX2 emulator Please use the below link to download WWE SMACKDOWN - HERE COMES THE PAIN WITH PCSX2 (WITH BIOS) EMULATOR FOR PC https://mega.nz/folder/PtQCjYLI Decryption key for the above link :  XYiOZ4A4ztKXBbrODQUByw I have provided the steps in the above link Configure controller settings with the above image. Please subscribe to my youtube channel for more technology videos. https://www.youtube.com/c/krishnatechinfo

boAt Rockerz 330 Pro Bluetooth Wireless in Ear Earphones

  boAt Rockerz 330 Pro Bluetooth Wireless in Ear Earphones with 60HRS Playtime, ASAP Charge, ENx Tech, Bluetooth v5.2, Dual Pairing, IPX5, Magnetic Earbuds, 10mm Drivers with Mic (Navy Blue)  Rockerz 330 Pro offers a massive playback time of up 60HRS on a single full charge This neckband has our ENx technology that helps to capture your voice without background glitches and lets you be heard crystal clear over voice calls, Charging Time : 1 H With our ASAP Charge tech, the neckband can gather up to 20HRS of playtime in just 10Min of charge Our boAt Signature sound shines through whenever you want to get indulged in your cherished playlists courtesy the 10mm drivers The ergonomically designed neckband has magnetic earbuds that support easy storage and carry when not in use You can listen to your favourite tracks in a carefree manner, courtesy the protection offered by its IPX5 marked water resistance You can enjoy the advantage of dual pairing by having t...