花生殼是什麼軟件我就不多說了,不懂的可以百度一下。
花生殼Linux 版本下載地址:https://hsk.oray.com/download/
在頁面下方可以找到Linux版本下載,根據需要選擇下載版本,
我選的是Redhat / CentOS Linux(X86_64),這個版本纔是64位的。
Linux安裝花生殼步驟,官網有說明,我這裏就不寫了。
在linux中安裝好花生殼後,進入目錄:
cd /etc/systemd/system
創建啓動文件:
touch phddns.service
編輯文件:
vi phddns.service
在文件中加入如下內容:
[Unit]
Description=phddns Service
Wants=network-online.target
After=network.target
[Service]
Type=simple
# default start cmd
ExecStart=/usr/sbin/phddns start
# Suppress stderr to eliminate duplicated messages in syslog. NM calls openlog()
# with LOG_PERROR when run in foreground. But systemd redirects stderr to
# syslog by default, which results in logging each message twice.
StandardOutput=syslog
StandardError=null
[Install]
WantedBy=multi-user.target
添加好後保存文件退出。
執行命令:
systemctl enable phddns.service
若出現如下提示,則說明設置啓動項成功:
查看啓動項命令:
systemctl list-unit-files | grep phdd
可以看見我們剛剛添加的啓動服務已經是 enabled 狀態了。
重啓linux:
shutdown -r now
啓動完成後執行:
/usr/sbin/phddns status
完美啓動。
學無止境,生生不息。