«

»

Kas 08

Ücretsiz Envanter Toplama Sistemi

OCS Belgeler

Server Kurulum Adımları:

Öncelikle kullanıcılar login olduğunda uyarı mesajı veren banner eklendi.
pico /etc/issue.net

pico /etc/ssh/sshd_config
service ssh restart

Sunucu güncellemeleri yapıldı.
apt update -y && apt upgrade -y && apt dist-upgrade -y
apt install net-tools
ifconfig

OCS sistem gereksinimleri yüklendi.
apt-get install make cmake gcc make
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 veri tabanı yüklendi.
apt-get install mysql-server
mysql –version
mysql_secure_installation
mysql
systemctl status mysql.service
systemctl restart mysql
mysqladmin -p -u root version

Webten veri tabanını düzenlemek için phpmyadmin kurulumu yapıldı.
apt install phpmyadmin

Önceki OCS kurulum notlarından ihtiyaç olan diğer perl gereksinimleri yüklendi.
cpan install Apache2::SOAP
cpan install  XML::Entities
cpan install  Mojolicious::Lite
cpan install Switch
cpan install Plack::Handler
cpan install Module
cpan install Module:Install
cpan install XML::Simple
cpan install Compress::Zlib
cpan install DBI
cpan install DBD::Mysql
cpan install Apache:DBI

cpan install Net::IP version
cpan install SOAP::Lite
cpan install Mojolicious::Lite
cpan install Archive::Zip
cpan install YAML
apt install libapache2-mod-perl2
perl -e ‘print “installed!\n”‘
apt install perl
apt-get -y install libapache2-mod-perl2
apt install php-pclzip make build-essential libdbd-mysql-perl libnet-ip-perl libxml-simple-perl php php-mbstring php-soap php-mysql php-curl php-xml php-zip
apt install php-gd
mysql -u root -p
git clone https://github.com/OCSInventory-NG/OCSInventory-Server.git
apt install git
git clone https://github.com/OCSInventory-NG/OCSInventory-Server.git
cd OCSInventory-Server/
git clone https://github.com/OCSInventory-NG/OCSInventory-ocsreports.git ocsreports

Çalıştırılabilir dosaya içerisinde veritabanı kullanıcı yetkileri verilir.
pico setup.sh
mv OCSInventory-Server /var/www/html
cd /var/www/html/OCSInventory-Server/
mv OCSInventory-Server /home/dosyalar/
cd /home/dosyalar/
cp -R OCSInventory-Server/* /var/www/html/
cd /var/www/html/
./setup.sh
systemctl restart apache2
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
pico /usr/share/ocsinventory-reports/ocsreports/dbconfig.inc.php
pico  /etc/apache2/conf-available/z-ocsinventory-server.conf
pico  /etc/apache2/conf-available/zz-ocsinventory-restapi.conf
a2enconf z-ocsinventory-server
a2enconf ocsinventory-reports
a2enconf zz-ocsinventory-restapi
service apache2 restart
unlink /etc/localtime
ln -s /usr/share/zoneinfo/Europe/Istanbul /etc/localtime
timedatectl
date

pico dbconfig.inc.php
pico /etc/apache2/conf-available/ocsinventory-reports.conf
pico /etc/apache2/conf-available/z-ocsinventory-server.conf
pico /etc/apache2/conf-available/zz-ocsinventory-restapi.conf
ln -s /etc/apache2/conf-available/ocsinventory-reports.conf /etc/apache2/conf-enabled/ocsinventory-reports.conf
pico parmaksiz.sh
composer install
apt install composer
composer install
cd ocsreports/
pico dbconfig.inc.php
mv install.php install.php.bak
systemctl restart apache2
cd /usr/share/ocsinventory-reports/ocsreports/
ll
mv install.php install.php.bak
a2enconf z-ocsinventory-server
a2enconf zz-ocsinventory-restapi
a2enconf ocsinventory-reports
updatedb

pico /var/www/html/etc/ocsinventory/ocsinventory-restapi.conf
pico /var/www/html/etc/ocsinventory/ocsinventory-server.conf
pico /var/www/html/etc/ocsinventory/ocsinventory-reports.conf

pico /etc/apache2/conf-available/z-ocsinventory-server.conf
pico /etc/apache2/conf-available/zz-ocsinventory-restapi.conf
pico /etc/apache2/conf-available/z-ocsinventory-server.conf
systemctl restart apache2

Dikkat edilecek hususlar:
1. server dosyalarının bulunduğu dizindeki setup.sh, ocsinventory-restapi.conf.local* ve ocsinventory-server.conf.local* dosyalarının database, user ve şifre bilgileri doğru bir şekilde yapılandırılmalı.
2. setup.sh çalıştırıldığında hiçbir perl bileşeni eksik olmamalı.
3. http://server-ip-adresi/ocsinventory linkine erişmeye çalışıldığında
Bad Request
Your browser sent a request that this server could not understand.


Apache/2.4.38 (Ubuntu) Server at server-ip-adresi Port 80
uyarısı alınmalı.
4.apache conf dizini altındaki z ve zz ile başlayan config dosyalarının credentials yetkilendirme ayarları doğru yapılandırıldıktan sonra a2enconf ile enable etmeyi unutmamalı.

http://server-ip-adresi/ocsreports/index.php sayfasında hata alıyorsanız.  https://github.com/OCSInventory-NG/OCSInventory-ocsreports/issues/816 sayfasındaki nighty sürümleri kullanılabilir.

5.github ve nigthy sürümleri ile uğraşmak işinize gelmezse indirme-linki kullanılarak indirip kurulabilir.

1 yorum

  1. TV

    Çok teşekkürler.

TV için bir cevap yazın Cevabı iptal et

E-posta hesabınız yayımlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir

AlphaOmega Captcha Classica  –  Enter Security Code
     
 

Şu HTML etiketlerini ve özelliklerini kullanabilirsiniz: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>