日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

ng linux 存储 配置,linux学习之--安装一套OCS inventory-ng 环境

發布時間:2024/10/14 linux 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 ng linux 存储 配置,linux学习之--安装一套OCS inventory-ng 环境 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

安裝一套OCS inventory-ng 環境

官網 : http://www.ocsinventory-ng.org/en/

首先安裝Server

相關的包在官網上下載即可

我下載的是

OCSNG_UNIX_SERVER-1.02.3.tar.gz

我使用SecureCRT連接我的linux測試機

用rz上傳到對應的目錄,我安裝在?/usr/local/

然后解壓

tar -zxvf OCSNG_UNIX_SERVER-2.1.2.tar.gz

cd OCSNG_UNIX_SERVER-2.1.2

sh setup.sh

其中前面的數據庫配置直接默認就ok

//apache 二進制文件的執行路徑

Where is Apache daemon binary [] ?/usr/local/apache2/bin/apachectl

//apache 主配置文件的路徑

Where is Apache main configuration file [/usr/local/apache2/conf/httpd.conf] ?

之后的選著perl ,用戶和用戶組等可以自己指定

之后安裝完成會顯示

Setup has created a log file /usr/local/OCSNG_UNIX_SERVER-2.1.2/ocs_server_setup.log. Please, save this file.

If you encounter error while running OCS Inventory NG Management server,

we can ask you to show us his content !

DON'T FORGET TO RESTART APACHE DAEMON !

Enjoy OCS Inventory NG ;-)

這樣就提示安裝完成了

在安裝過程中可能會報錯,缺少perl模塊,我們下載相應的組件即可

可以通過CPAN下載比較方便

perl -MCPAN -e shell

之后install你想要安裝的模塊就好

當然也可以perl -MCPAN -e "install ........."

安裝OCS inventory-ng 也需要PHP和MySQL,至于這兩項的安裝也很簡單

服務器我們也可以使用nginx

我使用nginx,安裝完成之后把php前端copy到相應的目錄下就好

配置nginx文件

upstream fcgi-ocsreports {

server unix:/dev/shm/php-fpm.sock;

}

server {

server_name yourIp;

listen 80;

index?????? index.php;

root???????? 你的php項目的目錄;

access_log? /home/logs/nginx/fcgi.access.log main;? //日志文件目錄

error_log?? /home/logs/nginx/fcgi.error.log error;

send_timeout??????????????????? 180;

fastcgi_connect_timeout???????? 180;

fastcgi_send_timeout??????????? 180;

fastcgi_read_timeout??????????? 180;

location ~* \.php$ {

include???????? fcgi.conf;

fastcgi_index?? index.php;

fastcgi_pass??? fcgi-ocsreports;

}

}

然后就可以進入ocs的web前端來配置數據庫了

之后安裝agent,windows的agent安裝比較簡單,這里主要說明linux下的agent安裝

同樣的在OCS的官網下載對應的agent版本

tar解壓

然后perl Makefile.PL

make

make install? 安裝

以下提示一路回車

Do you want to configure the agent

Please enter 'y' or 'n'?> [y]

Where do you want to write the configuration file?

0 -> /etc/ocsinventory

1 -> /usr/local/etc/ocsinventory

2 -> /etc/ocsinventory-agent

?>

2 (選擇配置文件存放目錄)

Do you want to create the directory /etc/ocsinventory-agent?

Please enter 'y' or 'n'?> [y]

[info] The config file will be written in /etc/ocsinventory/ocsinventory-agent.cfg,

What is the address of your ocs server?> [ocsinventory-ng]

192.168.50.92(輸入ocsinventory-server的ip地址)

Do you need credential for the server? (You probably don't)

Please enter 'y' or 'n'?> [n]

Do you want to apply an administrative tag on this machine

Please enter 'y' or 'n'?> [y] (該服務器是否使用管理標簽)

tag?>

viong?(顯示在web管理控制界面中)

ocsinventory agent presents: /usr/bin/ocsinventory-agent

Where do you want the agent to store its files? (You probably don't need to change it)?> [/var/lib/ocsinventory-agent]

Do you want to create the /var/lib/ocsinventory-agent directory?

Please enter 'y' or 'n'?> [y]

New settings written! Thank you for using OCS Inventory

Should I remove the old linux_agent

Please enter 'y' or 'n'?> [n]

Do you want to use OCS-Inventory software deployment feature?

Please enter 'y' or 'n'?> [y]

Do you want to use OCS-Inventory SNMP scans feature?

Please enter 'y' or 'n'?> [y]

Do you want to send an inventory of this machine?

Please enter 'y' or 'n'?> [y]

[info] Accountinfo file doesn't exist. I create an empty one.

-> Success!

看到以上信息,說明安裝成功

[root@localhost Ocsinventory-Agent-2.0rc2]# ocsinventory-agent –debug

………………………………………….省略

[debug] Calling handlers : `end_handler'

如果沒提示error說明安裝OK!

在安裝的過程中也可能會提示缺少perl模塊,使用CPAN安裝即可

與50位技術專家面對面20年技術見證,附贈技術全景圖

總結

以上是生活随笔為你收集整理的ng linux 存储 配置,linux学习之--安装一套OCS inventory-ng 环境的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。