You are on page 1of 2

apt update

apt install mariadb-server mariadb-client

apt update
apt install git curl wget make cmake gcc make

apt -y install libapache2-mod-perl2 libapache-dbi-perl libapache-db-perl


libapache2-mod-php libarchive-zip-perl

apt -y install php php-zip php-pclzip php-gd php-soap php-curl php-json

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'

mysql -u root -p
CREATE DATABASE ocs;
GRANT ALL PRIVILEGES ON ocs.* TO ocs_user IDENTIFIED BY "!@#asd253";
FLUSH PRIVILEGES;
EXIT

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 ocsreports
curl -sS https://getcomposer.org/installer | sudo php --
--install-dir=/usr/local/bin --filename=composer
cd ..

nano setup.sh
DB_SERVER_HOST="localhost"
DB_SERVER_PORT="3306"
DB_SERVER_USER="ocs_user"
DB_SERVER_PWD="!@#asd253"

sudo ./setup.sh

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

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


systemctl restart apache2
http://10.5.1.188/ocsreports/install.php

You might also like