Hoje é 16/12/25 - Dia do Reservista;


29/03/2019
Instalação do OCS Inventory

Tipo de notícia: Tecnologia

Instalação das dependências

apt-get install libgdbm-dev libxml-simple-perl perl libperl5.28 libdbi-perl libdbd-mysql-perl libapache-dbi-perl libnet-ip-perl libsoap-lite-perl php-pclzip php7.3-zip libxml-parser-perl build-essential git libconfig-yaml-perl php7.3-mbstring apache2 mariadb-server

Instalar pacote CPAN

perl -e shell -MCPAN

Executar no console do CPAN

install XML::Entities
install Archive::Zip
install Mojolicious
install Plack::Handler
install Net::IP

Instalação do OCS

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

Respostas da instalação:

1 - Which host is running database server [localhost] ? [ENTER]
 2 - On which port is running database server [3306] ? [ENTER]
 3 - Where is Apache daemon binary [/usr/sbin/apache2ctl] ? [ENTER]
 4 - Where is Apache main configuration file [/etc/apache2/apache2.conf] ? [ENTER]
 5 - Which user account is running Apache web server [www-data] ? [ENTER]
 6 - Which user group is running Apache web server [www-data] ? [ENTER]
 7 - Where is Apache Include configuration directory [/etc/apache2/conf-available] ? /etc/apache2/sites-available [ENTER]
8 - Where is PERL interpreter binary [/usr/bin/perl] ? [ENTER]
9 - Do you wish to setup Communication server on this computer ([y]/n)? [ENTER]
10 - Where to put Communication server log directory [/var/log/ocsinventory-server] ? [ENTER]
11 - Where to put Communication server plugins configuration files [/etc/ocsinventory-server/plugins] ? [ENTER]
12 - Where to put Communication server plugins Perl modules files [/etc/ocsinventory-server/perl] ? [ENTER]
13 - Do you wish to continue ([y]/n] ? [ENTER]
14 - Do you wish to setup Rest API server on this computer ([y]/n)? [ENTER]
15 - Where do you want the API code to be store [/usr/local/share/perl/5.24.1] ? [ENTER]
16 - to 'z-ocsinventory-server.conf' ([y]/n) ? [ENTER]
17 - Do you wish to setup Administration Server (Web Administration Console) on this computer ([y]/n)? [ENTER]
18 - Do you wish to continue ([y]/n)? [ENTER]
19 - Where to copy Administration Server static files for PHP Web Console [/usr/share/ocsinventory-reports] ? [ENTER]
20 - Where to create writable/cache directories for deployment packages,administration console logs, IPDiscover and SNMP [/var/lib/ocsinventory-reports]? [ENTER]  

Ajustes no php.ini

nano /etc/php/7.3/apache2/php.ini

max_execution_time = 200
max_input_time = 200
memory_limit = 512M
post_max_size = 128M
upload_max_filesize = 128M

Ajustes do OCS

nano /etc/apache2/sites-available/ocsinventory-reports.conf

php_value post_max_size 128m
php_value upload_max_filesize 128m

nano /etc/apache2/sites-available/z-ocsinventory-server.conf

#PerlSetVar OCS_DB_PWD ocs
PerlSetVar OCS_DB_PWD senhasegura

Criação de links simbólicos para o Apache

ln -s /etc/apache2/sites-available/z-ocsinventory-server.conf /etc/apache2/sites-enabled/
ln -s /etc/apache2/sites-available/zz-ocsinventory-restapi.conf /etc/apache2/sites-enabled/
ln -s /etc/apache2/sites-available/ocsinventory-reports.conf /etc/apache2/sites-enabled/
/etc/init.d/apache2 restart

Pós instalação

rm /usr/share/ocsinventory-reports/ocsreports/install.php

Instalação de Agentes

Download do PSExec:

https://docs.microsoft.com/pt-br/sysinternals/downloads/psexec

Exemplo com PSExec

psexec \\* -s -u Dominio\Administrator -p SENHA \\Server\NetLogon\OCS-NG-Windows-Agent-Setup.exe /S /NOSPLASH /SERVER=http://IP_DO_OCS/ocsinventory

Referências:

https://wiki.projetoroot.com.br/index.php?title=Ocs_inventory 
https://wiki.projetoroot.com.br/index.php?title=GLPI
https://daniel.scota.com.br/?p=717

 


Produtos

Cervejeira Mídia 82L

Cervejeira Mídia 82L

Cervejeira Frost Free Mídia 82L

Gopro Hero 4k

Gopro Hero 4k

Câmera de Ação compacta GoPro à Prova d'água

Caneca Stanley

Caneca Stanley

Caneca Stanley 1.18L

Gopro Hero 13 Black

Gopro Hero 13 Black

Câmera Gopro - Foto 27Mb Video 5.3K

Chopeira 5L

Chopeira 5L

Chopeira para 12 latas

Chopeira Beertender

Chopeira Beertender

Chopeira Beertender Krups Heineken 5L Preta

Notícias Relacionadas

27/09/2019

GLPI Plugins


Notícias

Notícias
Programação Oficial do Carnatal 2025 Programação Oficial do Carnatal 2025
Confira a programação oficial do Carnatal 2025.
Cursos online do Conexão Cerveja Brasil Cursos online do Conexão Cerveja Brasil
Ao longo do mês de setembro, a Associação Brasileira de Cerveja Artesanal (Abracerva) promove uma série de cursos online e gratuitos com profissionais de destaque do setor.
5º Agrofest São Gonçalo 2025 5º Agrofest São Gonçalo 2025
A comunidade rural de Poço de Pedra, em São Gonçalo do Amarante (RN), está sendo preparada para receber a maior edição da Agrofest.
Fequaju 2025 Fequaju 2025
A Prefeitura de Serra do Mel divulgou nesta terça-feira, 1º, a aguardada programação oficial do Fequaju 2025.
FINECAP 2025 FINECAP 2025
A Prefeitura de Pau dos Ferros anunciou a programação completa da FINECAP 2025.
Programação completa do Pingo da Mei Dia 2025 Programação completa do Pingo da Mei Dia 2025
Confira a programação completa do Pingo da Mei Dia 2025 por horário