xmDNS-avahi SEP2.0 domian .stie

xmDNS-avahi SEP2.0 domian .stie

we can get the source code from github.

https://github.com/Kisensum/xmDNS-avahi

wget https://github.com/Kisensum/xmDNS-avahi/archive/master.zip
unzip master.zip

then install some essential packages

  - intltool
  - pkg-config
  - libgtk2.0-dev
  - libqt3-mt-dev
  - libqt4-core
  - qt4-dev-tools
  - libgtk-3-dev
  - libdbus-1-dev
  - libgdbm-dev
  - libdaemon-dev
  - python-gtk2
  - mono-mcs
  - monodoc-base
  - gtk-sharp2

cd xmDNS-avahi-master/

modify some parts in bootstrap.sh file

vim bootstrap.sh

add 

FLAGS="$FLAGS --disable-monodoc --disable-mono –disable-glib --disable-gobject --disable-qt3 --disable-qt4 --disable-xmltoman --prefix=/opt --with-distro=none --disable-python --disable-glib --disable-gtk --disable-manpages"

 as below

./ bootstrap.sh
make
make install

then

cd /etc/avahi/service/
touch sep.service

copy the following code into sep.service file

<?xml version="1.0" standalone='no'?>
<!DOCTYPE service-group SYSTEM "avahi-service.dtd">
<service-group>
  <name>device-000001111114</name>
  <service>
    <type>_smartenergy._tcp</type>
    <subtype>_edev-2222228._sub._smartenergy._tcp</subtype>
    <port>8000</port>
    <txt-record>txtvers=1</txt-record>
    <txt-record>dcap=/dcap</txt-record>
    <txt-record>path=/upt</txt-record>
    <txt-record>https=443</txt-record>
    <txt-record>level=-S0</txt-record>
  </service>
</service-group>

then 

cd /opt/sbin
./avahi-daemon 

一般情况下,经过以上步骤,如果一直提醒avaho-daemon已工作。ubuntu和debian都默认安装了avahi,从而也就默认启动avahi-daemon.

所以,进入/etc/init.d停止avahi-daemon

 cd /etc/init.d

service avahi-daemon stop

xmDNS-avahi SEP2.0 domian .site

发表评论

电子邮件地址不会被公开。 必填项已用*标注