2022/04/28

OCS Inventory NG 2.9.2 很多頁面是空白的

 因為原本的OCS Inventory NG太舊了,agent已不支援最新版的win10,所以要來升級到最新的 2.9.2。

最新的OCS server只能裝在Linux上,所以就選欲centos7來安裝,安裝過程主要是照 https://kifarunix.com/install-and-setup-ocs-ng-inventory-server-on-centos-7/ 這篇來操作。

裝的過程都蠻順利的,agent也要裝到client上了,但最後產生兩個問題。

1. 有抓到client,但軟體清單都是0,這個是因為OCS上有一個整理軟體的程序並不會自動執行,要自己去把這程序設到排程裡,才會統計軟體清單,程序是  /usr/share/ocsinventory-reports/ocsreports/crontab/cron_all_software.php

2. 看到軟體清單後,又發現另一個問題,系統會統計所有軟體被多少電腦安裝的數量,點擊那個次數就可以秀出是哪些電腦,但點擊後卻是空白畫面。


查了兩天,試過升級OCS nightly最新版,OS重裝,關閉SELINUX,都沒用,然後突然發現一篇文章就是在說這個問題,原來是PHP的版本太舊了,只要把PHP的版本升到最新,OCS也不用重裝,網頁畫面就可以正常顯示了。


Due to the outdated version of OCS Inventory NG, the agent no longer supports the latest version of Windows 10. Therefore, it is necessary to upgrade to the latest version, 2.9.2.

The latest OCS server can only be installed on Linux, so CentOS 7 was chosen for the installation process. The installation was primarily performed following the steps outlined in the article: "https://kifarunix.com/install-and-setup-ocs-ng-inventory-server-on-centos-7/".

The installation process went smoothly, and the agent was also installed on the client. However, two issues arose at the end of the process.

The client was detected, but the software inventory showed as 0. This occurred because OCS has a software sorting process that does not execute automatically. To resolve this, it is necessary to manually set up the process in the scheduler. The process is located at "/usr/share/ocsinventory-reports/ocsreports/crontab/cron_all_software.php".

After the software inventory was visible, another issue arose. The system was supposed to track the number of installations of each software on different computers. Clicking on the installation count was expected to display which computers had the software installed, but it resulted in a blank page.

After two days of investigation, attempts were made to upgrade to the latest version of OCS nightly, reinstall the OS, and disable SELINUX, but none of these resolved the issue. Then, by chance, an article was found that addressed this problem. It turned out that the issue was caused by an outdated version of PHP. Upgrading PHP to the latest version resolved the problem, and there was no need to reinstall OCS. The web page now displays correctly.


沒有留言:

張貼留言