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

歡迎訪問 生活随笔!

生活随笔

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

linux

飞信机器人 ld-linux.so.2,飞信机器人安装

發(fā)布時間:2023/12/18 linux 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 飞信机器人 ld-linux.so.2,飞信机器人安装 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

Centos6.2_x86_64系統(tǒng)下配置飛信機器人,實現(xiàn)手機接收報警短信! 2013-06-19 11:11:45

分類: 系統(tǒng)運維

最近,新上一批服務器,安裝的操作系統(tǒng)為:Centos6.2_x86_64。應監(jiān)控需要,想在其中的一臺管理機上安裝配置飛信機器人報警。但是,安裝配置中,遇到N多難纏的問題。網(wǎng)上有人說,centos6.0以后,飛信機器人的支持效果不太好。但是,經(jīng)過本人實踐發(fā)現(xiàn),centos6.0-centos6.4都是可以成功安裝配置的。下面是以Centos6.2_x86_64系統(tǒng)為例,說明如何配置飛信報警機器人,實現(xiàn)手機接收報警短信!

一、配置使用本地yum源:

參考linux中yum源安裝方法

然后就可以使用yum命令安裝你所需要的軟件包了

二、安裝配置fetion機器人:

1.上傳fetion包及安裝lib庫文件(lib庫文件已包含在fetion壓縮包中):

# cd /usr/local/src/

# tar xvfz fetion.good.tar.gz

# cd fetion

# cp -r /usr/lib /usr/lib.bak

# cp -r lib/ /usr/lib/

# yum install /lib/ld-linux.so.2

# yum install -y ?libstdc++.so.6 libgssapi_krb5.so.2 libz.so.1

以上紅色字體最好先別執(zhí)行。

2.驗證機器人是否正常:

# ./fetion

************************ IMPORTANT STATEMENT ************************

** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? **

** ? PLEASE DON'T USE THIS SOFTWARE TO SEND JUNK SHORT MESSAGES. ? **

** ? OTHERWISE PLEASE BEAR YOUR OWN CONSEQUENCES. ? ? ? ? ? ? ? ? ?**

** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? **

** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Version:[20101205002-linux] ? ? ?**

*********************************************************************

This program is the console version of China Fetion!

It's free for personal user.

This project website: http://www.it-adv.net/

AUTHOR:KelvinH MSN/EMAIL:shichangguo@msn.com

Usage:

--mobile=[mobile]

--sid=[sid]

--pwd=[pwd]

--config=[config file] *format:index mobile password

--index=[index no in config file,refer to sample.conf]

--debug ?*debug mode on

--hide ?*login fetion in hidden state

--to=[mobile/sid]

--command-path=[command file path]

--robotmode

--daemon(linux only)

--proxy-ip(http proxy ip)

--proxy-port(http proxy port)

--msg-gb=[gb2312/gbk message]

--msg-utf8=[utf8 message]

--msg-type=[0/1/2 sms longsms smartmsg]

--file-gb=[gb2312/gbk file]

--file-utf8=[utf8 file]

--query-cmcc-no

--auto-retry

--exit-on-verifycode

--t3key=[http://www.tui3.com/page/smssend/]

至此,飛信機器人就可以正常發(fā)送短信了。如果,經(jīng)過上面的安裝配置,仍然存在一些問題,請穩(wěn)步到步驟三:

三、現(xiàn)網(wǎng)遇到的問題:

1.在安裝libgssapi_krb5.so.2時,出現(xiàn)如下錯誤:

# yum install libgssapi_krb5.so.2

Loaded plugins: fastestmirror, refresh-packagekit, security

Loading mirror speeds from cached hostfile

dvd ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?| 4.0 kB ? ? 00:00 ...

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package krb5-libs.i686 0:1.9-22.el6 will be installed

--> Finished Dependency Resolution

Error: Protected multilib versions: krb5-libs-1.9-22.el6.i686 != krb5-libs-1.10.3-10.el6_4.3.x86_64

You could try using --skip-broken to work around the problem

You could try running: rpm -Va --nofiles --nodigest

于是,根據(jù)提示嘗試添加--skip-broken參數(shù),使用rpm -Va --nofiles --nodigest命令均無效。想到強制卸載64位的版本:

# rpm -e krb5-libs-1.10.3-10.el6_4.3.x86_64 --nodeps

# rpm -qa|grep krb5-libs-1.10.3-10.el6_4.3.x86_64

卸載后,再執(zhí)行yum安裝命令,卻又報出如下錯誤:(yum報廢了,郁悶啊!)

# yum install libgssapi_krb5.so.2

There was a problem importing one of the Python modules

required to run yum. The error leading to this problem was:

libgssapi_krb5.so.2: cannot open shared object file: No such file or directory

Please install a package which provides this module, or

verify that the module is installed correctly.

It's possible that the above module doesn't match the

current version of Python, which is:

2.6.6 (r266:84292, Dec ?7 2011, 20:48:22)

[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)]

If you cannot solve this problem yourself, please go to

the yum faq at:

http://yum.baseurl.org/wiki/Faq

別著急,辦法還是有的,活人不能被XX死啊!哈哈!

換一種思路,yum不行了,咱們不是還有rpm嘛?,F(xiàn)在,就嘗試如下操作:

解決辦法:

# rpm -ivh /mnt/Packages/krb5-libs-1.9-22.el6.i686.rpm

Preparing... ? ? ? ? ? ? ? ?########################################### [100%]

1:krb5-libs ? ? ? ? ? ? ?########################################### [100%]

# rpm -ivh /mnt/Packages/krb5-libs-1.9-22.el6.x86_64.rpm

Preparing... ? ? ? ? ? ? ? ?########################################### [100%]

1:krb5-libs ? ? ? ? ? ? ?########################################### [100%]

# ./fetion

************************ IMPORTANT STATEMENT ************************

** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? **

** ? PLEASE DON'T USE THIS SOFTWARE TO SEND JUNK SHORT MESSAGES. ? **

** ? OTHERWISE PLEASE BEAR YOUR OWN CONSEQUENCES. ? ? ? ? ? ? ? ? ?**

** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? **

** ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?Version:[20101205002-linux] ? ? ?**

*********************************************************************

This program is the console version of China Fetion!

It's free for personal user.

This project website: http://www.it-adv.net/

AUTHOR:KelvinH MSN/EMAIL:shichangguo@msn.com

Usage:

--mobile=[mobile]

--sid=[sid]

--pwd=[pwd]

--config=[config file] *format:index mobile password

--index=[index no in config file,refer to sample.conf]

--debug ?*debug mode on

--hide ?*login fetion in hidden state

--to=[mobile/sid]

--command-path=[command file path]

--robotmode

--daemon(linux only)

--proxy-ip(http proxy ip)

--proxy-port(http proxy port)

--msg-gb=[gb2312/gbk message]

--msg-utf8=[utf8 message]

--msg-type=[0/1/2 sms longsms smartmsg]

--file-gb=[gb2312/gbk file]

--file-utf8=[utf8 file]

--query-cmcc-no

--auto-retry

--exit-on-verifycode

--t3key=[http://www.tui3.com/page/smssend/]

2、安裝/lib/ld-linux.so.2遇到如下問題:

Error Downloading Packages:

nscd-2.5-107.el5_9.5.x86_64: failure: RPMS/nscd-2.5-107.el5_9.5.x86_64.rpm from update: [Errno 256] No more mirrors to try.

然后沒有找到原因,我直接重新安裝了一下結果成功了。

接下來,可以進行測試一下飛信機器人發(fā)送短信,操作如下:

修改sendsms.sh文件最后一行,把執(zhí)行fetion腳本的路徑寫好,后面寫上具體發(fā)送者的信息

測試吧:

# sh sendsms.sh 15811283479 "This Fetion Alarm Test,Please reply Me."

SIP-C/4.0 280 Send SMS OK

T: sip:755792951@fetion.com.cn;p=30015

I: 2

Q: 1 M

L: 113

XI: 7e30d99149cc47518b8da914f1e3af59

看到如上提示,說明短信發(fā)送成功。

注意:第一次測試發(fā)送短信時,會出現(xiàn)一個對話提示,這時候會在當前目錄下生成一個以手機號命名的驗證碼圖片(例如名為:15811283479.jpg 的驗證碼圖片),只需切換到其他session下將其下載至本地查看,將驗證碼輸入到前面的對話提示后,回車即可。以后,再發(fā)送短信時,就不需要驗證碼了。

5、新增zabbix的Media Type

登錄到zabbix,進入“Administration" >> ”Media types",點擊右上角“Create Media Type"。

Description填"Fetion"或其它名稱,Type選擇"Script",Script填”sendsms.sh"。

點擊"Save"保存配置。

# vim /etc/zabbix/zabbix_server.conf

找到AlertScriptsPath參數(shù)并修改成 AlertScriptsPath=/usr/bin/

重啟zabbix-server服務

6、新增zabbix的Actions配置

登錄到zabbix,進入"Configation" >> "Actions",點擊右上角"Create Actions"。

輸入”Name",其它都默認

點擊右側“Action Operations"下的"New"按鈕,"Operation Type"選擇"Send message","Send Message to"選擇一個或多個要發(fā)送消息的用戶組,”Send only to"選擇我們之前新增的Fetion。

點擊"Save"保存配置。

7、zabbix用戶配置

登錄到zabbix, 進入"Adimistration" >> "Users",在之前選定要發(fā)送消息的組里的Members欄位里選擇一個用戶,例如選擇Admin用戶。

在用戶信息修改界面最下方的”Media"處點擊"Add"按鈕。

Type選擇"Fetion",Send to填入收信手機號碼,其它參數(shù)按需修改,點擊Add添加。

點擊"Save"保存配置。

至此配置完成,觸發(fā)一個警報試下手機是否收到訊息。

總結

以上是生活随笔為你收集整理的飞信机器人 ld-linux.so.2,飞信机器人安装的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

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