溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

ncpa安裝

發(fā)布時間:2020-06-29 21:01:07 來源:網(wǎng)絡 閱讀:1007 作者:zjyklwg117 欄目:移動開發(fā)

安裝

NCPA為所有的目標平臺準備了安裝包。包括windows,linux RRM 和 DEB包,除此之外也為其他較少使用的操作系統(tǒng)準備了tarballs。NCPA不支持未知的平臺。NCPA包為所有的目標平臺提供了一個非常簡便的安裝方法,這個文檔將通過例子來講述如何安裝NCPA.

首先這里講述的是如何進行簡便安裝,如果你有一個很復雜的環(huán)境,你或許得跳過這里。除非你知道該如何去做,在這里并不存在很復雜的安裝NCPA的方法

注意

這并不是一個能適應任何情況的指南,也許你應該調整你自己防火墻,為NCPA放行5693端口。通常windows會自動放行這個端口,就象MAC OS 一樣。請你時刻記住這一點,當首次安裝后出現(xiàn)不能工作的情況,請檢查這一點。


在windows中安裝NCPA

首先下載安裝程序到機器中。安裝程序下載地址:NCPA’s Windows Installer link.

圖形化安裝

安裝程序下載以后,雙擊安裝程序,同意license后,你將會看到一個配置界面,這是詢問你填配置信息。

ncpa安裝

NCPA作為一個代理的時候,僅需要填寫一個簡單的進入token 到文本框中就可以單擊下一步了。 你必須記住這個token,在配置Nagios XI向導或使用check_ncpa.py plugin 需要用到它.如果你是安裝這個代理發(fā)送被動的檢查結果給Nagios,有額外的信息需要填寫。 

  • Token - NCPA 使用它用來做身份驗證。你需要這個token當你安裝配置 Nagios的監(jiān)控代理的時候。

對于被動代理這個token不是絕對必需的,有其他的參數(shù)需要指定:

  • NRDP URL

  • 這個URL是NCPA 作為被動代理發(fā)送檢查結果的目標。對于主動代理這個是不需要的。

    • NRDP Token

    • 這是NRDP身份驗證的token值。作為被動代理時需要填寫。

  • Hostname

  • 這個主機名是代理將報告發(fā)回nagios需要填寫的主機名,由nagios進行定義。

    Config Name

  • This is the NRDS config name that the agent will request when contacting the NRDS server.

注意:

如果你使用被動檢查,在初始安裝的時候"NRDP token"由NRDP與NRDS共用。如果這個值請編ncpa.cfg. 

寂靜安裝

windows安裝包也支持寂靜安裝,效果與GUI安裝相同。

注意:


寂靜安裝請求在命令行實用 /S 參數(shù)。同時跟隨其他參數(shù),如:

/<directive>="<value>"

這些參數(shù)都可以在命令行下使用

  • TOKEN

  • The token that will be used to access the agent’s API and web interface.

  • NRDPURL

  • This specifies the NRDP URL to use if passive checks are being implemented.

  • NRDPTOKEN

  • This is the token that will be used to authenticate NRDP passive checks and to authenticate with NRDS.

  • HOST

  • The host that the passive agent will report back as.

  • CONFIG

  • The name of the NRDS config the agent will be associated with.

這里有一個使用寂靜安裝的例子 TOKEN ‘fishingrocks’:

ncpa-<version>.exe /S /TOKEN='fishingrocks'

Note

所有這些值都可以在安裝完之后,很容易的改變。當感覺到這些安裝參數(shù)通過后,請記錄下來。

現(xiàn)在NCPA服務已經(jīng)安裝完畢并啟動。

To test your installation see Testing Your Installation.

使用RPM包安裝NCPA

首先根據(jù)操作系統(tǒng)類型下載對應的RPM安裝包。


    • 32-bit

    • 64-bit

    • CentOS 5.x



    • 32-bit

    • 64-bit

    • CentOS 6.x



    • 64-bit

    • CentOS 7.0



    • 32-bit

    • 64-bit

    • openSUSE 13.x


Note

這些RPM或許未能覆蓋你的系統(tǒng),或者在你的系統(tǒng)上無法工作,你可以從git上獲取源代碼進行build。

這是一個使用rpm進行安裝例子,當然你也可以使用yum或zypper也一樣。

rpm -ivh --nomd5 <path to the NCPA RPM>

現(xiàn)在NCPA 服務經(jīng)安裝并啟動 。

你需要編輯  /usr/local/ncpa/etc/ncpa.cfg 去指定一個通訊字符串  在  [api] section 中 ,設置 你自己的  token:

[api]
community_string=<your token>

更改ncpa.cfg之后,需要重新啟動 ncpa_listener.重啟命令 :

/etc/init.d/ncpa_listener restart

To test your installation see Testing Your Installation.

使用 DEB Packaging安裝 NCPA

下載安裝包 


    • 32-bit

    • 64-bit

    • Debian/Ubuntu


安裝命令 

dpkg -i <path to the NCPA deb>

修改  /usr/local/ncpa/etc/ncpa.cfg 中的通訊字符串 ,在  [api] section 中 設置你自己的 token:

[api]community_string=XXXXXX

重啟動服務 

/etc/init.d/ncpa_listener restart

To test your installation see Testing Your Installation.

在  Mac OS X 上安裝 

Note

The install process on Mac OS X is still experimental. If you would like to help make this process better, please get in contact with the author (whose address can be found at the bottom of the page.)

Download the DMG here .

Download the NCPA DMG here . You will need to log in as root, or at least as a user who can run commands as root to continue with the installation. Then, depending on where you installed it (we will assume you downloaded it to your /tmp directory), run the following commands:

cd /tmp
hdiutil attach /tmp/ncpa-<version>.dmg
sudo zsh /Volumes/NCPA-<version>/install.sh

What this script does:

  • Creates the folder /usr/local/ncpa if it does not exist

  • Moves all necessary files there

  • Sets the owner of /usr/local/ncpa to nagios:nagcmd

  • Sets the mode of /usr/local/ncpa to 775

  • Creates the group nagcmd if it does not exist

  • Creates the user nagios if it does not exist

  • Starts the listener daemon

If any of this fails, you will need to do the steps manually. The steps that may fail most often are adding users and groups. If they do, add the user ‘nagios’ and make sure the group ‘nagcmd’ exists and that ‘nagios’ user is in the group ‘nagcmd’.

測試你的安裝結果 

Warning

配置防火墻放行  5693 端口 

你需要知道以下信息 

  • 代理者 IP

  • 在  [api] 中定義的  community_string (這個  token field 在  Windows Installer時定義 )

打開瀏覽器輸入 https://ip:5693, 如果提示你輸入 token意味著安裝成功 .


向AI問一下細節(jié)

免責聲明:本站發(fā)布的內容(圖片、視頻和文字)以原創(chuàng)、轉載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權內容。

AI