linux用飞信发短信

一.下载飞信

到此网站下载飞信机器人

http://www.it-adv.net/

下载完把飞信移动到/usr/local/fetion

 mv cenos54X64_20101113/lib ./

vim /etc/ld.so.conf.d/fetion.conf

/usr/local/fetion/lib

ldconfig

cp fetion /bin

[root@node2 fetion]# ldd /bin/fetion
    linux-gate.so.1 =>  (0x00c33000)
    libACE-5.7.2.so => /usr/local/fetion/lib/libACE-5.7.2.so (0x00610000)
    libACE_SSL-5.7.2.so => /usr/local/fetion/lib/libACE_SSL-5.7.2.so (0x00805000)
    libssl.so.4 => /usr/local/fetion/lib/libssl.so.4 (0x001fa000)
    libstdc++.so.6 => /usr/local/fetion/lib/libstdc++.so.6 (0x004f8000)
    libm.so.6 => /lib/libm.so.6 (0x00d58000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00e90000)
    libc.so.6 => /lib/libc.so.6 (0x0022e000)
    libcrypto.so.4 => /usr/local/fetion/lib/libcrypto.so.4 (0x03e4a000)
    librt.so.1 => /lib/librt.so.1 (0x00c1d000)
    libdl.so.2 => /lib/libdl.so.2 (0x00d8e000)
    libgssapi_krb5.so.2 => not found
    libkrb5.so.3 => not found
    libcom_err.so.2 => /usr/local/fetion/lib/libcom_err.so.2 (0x008bb000)
    libk5crypto.so.3 => not found
    libresolv.so.2 => /lib/libresolv.so.2 (0x003c5000)
    /lib/ld-linux.so.2 (0x00d96000)
    libz.so.1 => not found
    libgssapi_krb5.so.2 => not found
    libkrb5.so.3 => not found
    libk5crypto.so.3 => not found
    libz.so.1 => not found
    libpthread.so.0 => /lib/libpthread.so.0 (0x003df000)

没有的全装上

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

yum -y install libz.so.1 libk5crypto.so.3 libkrb5.so.3 libgssapi_krb5.so.2 libz.so.1 libk5crypto.so.3 libkrb5.so.3 libgssapi_krb5.so.2


配置好网络dns就可以发短信了


fetion    --mobile=15000760031    --pwd=cptbtptp    --to=15000760031  --msg-utf8="早上好"


第一次会在fetion的可执行文件目录下生成一个验证码,查看填上就好了,第二次就不要了

[root@node2 fetion]# fetion    --mobile=15000760031    --pwd=123456  --to=15000760031  --msg-utf8="sdfsadf早上好"
SIP-C/4.0 280 Send SMS OK
T: sip:[email protected];p=8908
I: 2
Q: 1 M
RQ: 43873342515
L: 112
XI: 0ac5a7e1b42a4e88b966a95de835ff3a

你可能感兴趣的:(linux,监控,短信)