日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 >

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

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

安裝一套OCS inventory-ng 環(huán)境

官網(wǎng) : http://www.ocsinventory-ng.org/en/

首先安裝Server

相關(guān)的包在官網(wǎng)上下載即可

我下載的是

OCSNG_UNIX_SERVER-1.02.3.tar.gz

我使用SecureCRT連接我的linux測試機(jī)

用rz上傳到對應(yīng)的目錄,我安裝在?/usr/local/

然后解壓

tar -zxvf OCSNG_UNIX_SERVER-2.1.2.tar.gz

cd OCSNG_UNIX_SERVER-2.1.2

sh setup.sh

其中前面的數(shù)據(jù)庫配置直接默認(rèn)就ok

//apache 二進(jìn)制文件的執(zhí)行路徑

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模塊,我們下載相應(yīng)的組件即可

可以通過CPAN下載比較方便

perl -MCPAN -e shell

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

當(dāng)然也可以perl -MCPAN -e "install ........."

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

服務(wù)器我們也可以使用nginx

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

配置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;

}

}

然后就可以進(jìn)入ocs的web前端來配置數(shù)據(jù)庫了

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

同樣的在OCS的官網(wǎng)下載對應(yīng)的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] (該服務(wù)器是否使用管理標(biāo)簽)

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位技術(shù)專家面對面20年技術(shù)見證,附贈技術(shù)全景圖

總結(jié)

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

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。