Установка OCS Inventory 2.8 на Ubuntu 20.04

#1 2021.09.06 14:01:26

0

apt install -y php-curl apache2-dev gcc make apache2 mysql-server php \
perl libapache2-mod-perl2 libapache2-mod-php libio-compress-perl \
libxml-simple-perl libdbi-perl libdbd-mysql-perl libapache-dbi-perl \
libsoap-lite-perl libnet-ip-perl php-mysql php-gd php-mbstring php-soap \
php-xml php-pclzip libarchive-zip-perl cmake gcc git curl unzip \
libapache-db-perl php7.4-sqlite3 php7.4-gmp php7.4-zip php-pclzip composer libapache2-mod-perl2-dev -y

mysql_secure_installation

vi /etc/php/7.4/apache2/php.ini
memory_limit = 256M
post_max_size = 100M
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = Europe/Moscow

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 -pSTRONG_PASSWORD
CREATE DATABASE ocsweb character set utf8;
CREATE USER 'ocs'@'%' IDENTIFIED WITH mysql_native_password BY 'STRONG_PASSWORD';
GRANT ALL ON ocsweb.* TO 'ocs'@'%';
FLUSH PRIVILEGES;
exit

wget https://github.com/OCSInventory-NG/OCSInventory-ocsreports/releases/download/2.8.1/OCSNG_UNIX_SERVER_2.8.1.tar.gz && \
tar xfvz OCSNG_UNIX_SERVER_2.8.1.tar.gz && \
cd OCSNG_UNIX_SERVER_2.8.1

vi setup.sh
# 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="ocs"
DB_SERVER_PWD="STRONG_PASSWORD"

./setup.sh
service apache2 restart

a2enconf ocsinventory-reports && a2enconf z-ocsinventory-server && \
chown -R www-data:www-data /var/lib/ocsinventory-reports/ && \
service apache2 reload


Идём в браузер IP/ocsreports/install.php и проводим установку

rm /usr/share/ocsinventory-reports/ocsreports/install.php
#2 2021.09.06 14:06:23

0

Агенты:
Windows
Unix/Linux