Ads 468x60px


02 3月, 2017

從別的機台複製整個 deamon 以 mosquitto 為例

尋找有關的 mosquitto 檔案

cat /lib/systemd/system/mosquitto.service
知道 /usr/sbin/mosquitto -c /etc/mosquitto/conf.d 要cp 過去

find /usr/ -name mosquitto*
結果得知 下面的 要 cp 過去


scp -r /etc/mosquitto/ root@
scp /usr/sbin/mosquitto  root@
scp /usr/bin/mosquitto*  root@
scp /lib/systemd/system/mosquitto.service  root@


systemctl enable mosquitto
The unit files have no [Install] section. They are not meant to be enabled
using systemctl.
Possible reasons for having this kind of units are:
1) A unit may be statically enabled by being symlinked from another unit's
   .wants/ or .requires/ directory.
2) A unit's purpose may be to act as a helper for some other unit which has
   a requirement dependency on it.
3) A unit may be started when needed via activation (socket, path, timer,
   D-Bus, udev, scripted systemctl call, ...).

因為找不到 install target
vim /lib/systemd/system/mosquitto.service


systemctl start mosquitto

ps 後有看到 mosquitto 即成功

0 意見:


Blogger Templates