主要参考https://blog.csdn.net/qq_27923047/article/details/108001624
下面的操作都是在Ubuntu18.04的docker中进行
因为GitHub接入不稳定,因此选用gitee的镜像源

准备工作

step 1:安装必要软件

root@95080ab946bc:~# apt update  -y
root@95080ab946bc:~# apt install gcc cmake build-essential   -y

step 2:安装PCRE2

  • 从https://sourceforge.net/projects/pcre/files/pcre2/10.37/
    下载pcre2-10.37.tar.gz ,并传到docker里
  • 解压配置
root@d86bd7159170:~# tar -zxvf pcre2-10.37.tar.gz root@d86bd7159170:~# cd pcre2-10.37
root@d86bd7159170:~/pcre2-10.37# root@d86bd7159170:~/pcre2-10.37# ./configure
  • 安装查看
root@d86bd7159170:~/pcre2-10.37# make && make install
...
root@d86bd7159170:~/pcre2-10.37# pcre2-config --version
10.37
root@d86bd7159170:~/pcre2-10.37#

step 3:安装libyang

  • 获取源码
root@d86bd7159170:~# git clone https://gitee.com/yaozuluo/libyang.git
Cloning into 'libyang'...
remote: Enumerating objects: 57323, done.
remote: Total 57323 (delta 0), reused 0 (delta 0), pack-reused 57323
Receiving objects: 100% (57323/57323), 41.04 MiB | 6.16 MiB/s, done.
Resolving deltas: 100% (43172/43172), done.
root@d86bd7159170:~# root@d86bd7159170:~# cd libyang/
root@d86bd7159170:~/libyang#
  • 标准安装步骤
# mkdir build; cd build
# cmake ..
# make
# make install
  • 记录一下最后的log
root@d86bd7159170:~/libyang/build# make install
...
Install the project...
-- Install configuration: "Debug"
-- Installing: /usr/local/lib/libyang.so.2.1.4
-- Installing: /usr/local/lib/libyang.so.2
-- Installing: /usr/local/lib/libyang.so
-- Set runtime path of "/usr/local/lib/libyang.so.2.1.4" to ""
-- Installing: /usr/local/include/libyang/libyang.h
-- Installing: /usr/local/include/libyang/context.h
-- Installing: /usr/local/include/libyang/dict.h
-- Installing: /usr/local/include/libyang/log.h
-- Installing: /usr/local/include/libyang/in.h
-- Installing: /usr/local/include/libyang/parser_data.h
-- Installing: /usr/local/include/libyang/parser_schema.h
-- Installing: /usr/local/include/libyang/plugins.h
-- Installing: /usr/local/include/libyang/plugins_exts.h
-- Installing: /usr/local/include/libyang/plugins_exts_compile.h
-- Installing: /usr/local/include/libyang/plugins_exts_print.h
-- Installing: /usr/local/include/libyang/plugins_types.h
-- Installing: /usr/local/include/libyang/out.h
-- Installing: /usr/local/include/libyang/printer_data.h
-- Installing: /usr/local/include/libyang/printer_schema.h
-- Installing: /usr/local/include/libyang/set.h
-- Installing: /usr/local/include/libyang/tree.h
-- Installing: /usr/local/include/libyang/tree_edit.h
-- Installing: /usr/local/include/libyang/tree_data.h
-- Installing: /usr/local/include/libyang/tree_schema.h
-- Installing: /usr/local/include/libyang/version.h
-- Installing: /usr/local/include/libyang/config.h
-- Installing: /usr/local/bin/yanglint
-- Set runtime path of "/usr/local/bin/yanglint" to ""
-- Installing: /usr/local/share/man/man1/yanglint.1
-- Installing: /usr/local/bin/yangre
-- Set runtime path of "/usr/local/bin/yangre" to ""
root@d86bd7159170:~/libyang/build#

step 4:安装sysrepo

  • 获取源码
root@d86bd7159170:~# git clone https://gitee.com/cly11/bak_sysrepo.git
Cloning into 'bak_sysrepo'...
remote: Enumerating objects: 33175, done.
remote: Total 33175 (delta 0), reused 0 (delta 0), pack-reused 33175
Receiving objects: 100% (33175/33175), 17.13 MiB | 15.47 MiB/s, done.
Resolving deltas: 100% (24864/24864), done.
root@d86bd7159170:~# ls -l
total 2260
drwxr-xr-x 12 root root    4096 Jan 10 01:26 bak_sysrepo
drwxr-xr-x 13 root root    4096 Jan 10 00:52 libyang
drwxr-xr-x  8 1169 1169    4096 Jan 10 01:08 pcre2-10.37
-rw-rw-r--  1 1000 1000 2299767 Jan 10 01:05 pcre2-10.37.tar.gz
root@d86bd7159170:~# cd bak_sysrepo/
root@d86bd7159170:~/bak_sysrepo#
  • 标准安装步骤
# mkdir build; cd build
# cmake ..
# make
# make install
  • 记录一下最后的log
...
Install the project...
-- Install configuration: "Debug"
-- Up-to-date: /usr/local/lib/libsysrepo.so.6.0.1
-- Up-to-date: /usr/local/lib/libsysrepo.so.6
-- Up-to-date: /usr/local/lib/libsysrepo.so
-- Up-to-date: /usr/local/include/sysrepo.h
-- Up-to-date: /usr/local/include/sysrepo_types.h
-- Up-to-date: /usr/local/include/sysrepo/version.h
-- Up-to-date: /usr/local/include/sysrepo/values.h
-- Up-to-date: /usr/local/include/sysrepo/xpath.h
-- Up-to-date: /usr/local/bin/sysrepoctl
-- Up-to-date: /usr/local/bin/sysrepocfg
-- Up-to-date: /usr/local/bin/sysrepo-plugind
-- Up-to-date: /usr/local/lib/pkgconfig/sysrepo.pc

step 5:安装zlib和libssh

apt-get install zlib1g-dev libssl-dev -y

step 6:安装libnetconf

  • 获取源码
root@d86bd7159170:~# git clone https://gitee.com/mirrors/libnetconf2.git
Cloning into 'libnetconf2'...
remote: Enumerating objects: 8316, done.
remote: Counting objects: 100% (920/920), done.
remote: Compressing objects: 100% (821/821), done.
remote: Total 8316 (delta 582), reused 114 (delta 68), pack-reused 7396
Receiving objects: 100% (8316/8316), 2.92 MiB | 10.75 MiB/s, done.
Resolving deltas: 100% (6035/6035), done.
root@d86bd7159170:~# cd libnetconf2/
root@d86bd7159170:~/libnetconf2#
  • 标准安装步骤
# mkdir build; cd build
# cmake ..
# make
# make install
  • 记录一下最后的log
Install the project...
-- Install configuration: "Debug"
-- Installing: /usr/local/lib/libnetconf2.so.2.1.20
-- Installing: /usr/local/lib/libnetconf2.so.2
-- Installing: /usr/local/lib/libnetconf2.so
-- Set runtime path of "/usr/local/lib/libnetconf2.so.2.1.20" to ""
-- Installing: /usr/local/include/nc_client.h
-- Installing: /usr/local/include/nc_server.h
-- Installing: /usr/local/include/libnetconf2/log.h
-- Installing: /usr/local/include/libnetconf2/netconf.h
-- Installing: /usr/local/include/libnetconf2/session.h
-- Installing: /usr/local/include/libnetconf2/messages_client.h
-- Installing: /usr/local/include/libnetconf2/messages_server.h
-- Installing: /usr/local/include/libnetconf2/session_client.h
-- Installing: /usr/local/include/libnetconf2/session_client_ch.h
-- Installing: /usr/local/include/libnetconf2/session_server.h
-- Installing: /usr/local/include/libnetconf2/session_server_ch.h
-- Installing: /usr/local/include/libnetconf2/config.h
root@d86bd7159170:~/libnetconf2/build#

step 7:安装netopeer2

  • 获取源码
root@d86bd7159170:~# git clone https://gitee.com/cly11/netopeer2_bak.git
Cloning into 'netopeer2_bak'...
remote: Enumerating objects: 8331, done.
remote: Total 8331 (delta 0), reused 0 (delta 0), pack-reused 8331
Receiving objects: 100% (8331/8331), 3.27 MiB | 95.00 KiB/s, done.
Resolving deltas: 100% (5903/5903), done.
root@d86bd7159170:~# cd netopeer2_bak/
root@d86bd7159170:~/netopeer2_bak#
  • 标准安装步骤外加添加链接
# mkdir build; cd build
# cmake ..
# make
# ln -s /usr/local/lib/libsysrepo.so.6 /lib/
# ln -s /usr/local/lib/libnetconf2.so.2 /lib/
# ln -s /usr/local/lib/libyang.so /lib/
# ln -s /usr/local/lib/libssh.so.4 /lib/
# make install

运行

  • 运行netopeer2-server,注意运行的目录
root@d86bd7159170:~/netopeer2_bak# netopeer2-server -d -v 2root@d86bd7159170:~/netopeer2_bak# netopeer2-server -d -v 2
[INF]: LY: Searching for "ietf-yang-types" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Newer revision than "ietf-yang-types@2013-07-15" not found, using this as the latest revision.
[INF]: LY: Searching for "ietf-yang-types" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Newer revision than "ietf-yang-types@2013-07-15" not found, using this as the latest revision.
[INF]: SR: Scheduled changes not applied because of other existing connections.
[INF]: LY: Searching for "ietf-datastores" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-datastores@2018-02-14.yang" file.
[INF]: LY: Searching for "ietf-yang-library" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-yang-library@2019-01-04.yang" file.
[INF]: LY: Searching for "ietf-inet-types" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Newer revision than "ietf-inet-types@2013-07-15" not found, using this as the latest revision.
[INF]: LY: Searching for "ietf-datastores" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-datastores@2018-02-14.yang" file.
[INF]: LY: Newer revision than "ietf-datastores@2018-02-14" not found, using this as the latest revision.
[INF]: LY: Searching for "sysrepo-monitoring" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/sysrepo-monitoring@2021-01-15.yang" file.
[INF]: LY: Searching for "sysrepo-plugind" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/sysrepo-plugind@2020-12-10.yang" file.
[INF]: LY: Searching for "ietf-netconf" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-netconf@2013-09-29.yang" file.
[INF]: LY: Searching for "ietf-netconf-acm" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-netconf-acm@2018-02-14.yang" file.
[INF]: LY: Searching for "ietf-yang-metadata" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Newer revision than "ietf-yang-metadata@2016-08-05" not found, using this as the latest revision.
[INF]: LY: Searching for "ietf-netconf-with-defaults" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-netconf-with-defaults@2011-06-01.yang" file.
[INF]: LY: Searching for "ietf-netconf" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-netconf@2013-09-29.yang" file.
[INF]: LY: Newer revision than "ietf-netconf@2013-09-29" not found, using this as the latest revision.
[INF]: LY: Searching for "ietf-netconf-notifications" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-netconf-notifications@2012-02-06.yang" file.
[INF]: LY: Searching for "ietf-origin" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-origin@2018-02-14.yang" file.
[INF]: LY: Searching for "ietf-netconf-monitoring" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-netconf-monitoring@2010-10-04.yang" file.
[INF]: LY: Searching for "ietf-netconf-nmda" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-netconf-nmda@2019-01-07.yang" file.
[INF]: LY: Searching for "ietf-origin" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-origin@2018-02-14.yang" file.
[INF]: LY: Newer revision than "ietf-origin@2018-02-14" not found, using this as the latest revision.
[INF]: LY: Searching for "ietf-netconf-with-defaults" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-netconf-with-defaults@2011-06-01.yang" file.
[INF]: LY: Newer revision than "ietf-netconf-with-defaults@2011-06-01" not found, using this as the latest revision.
[INF]: LY: Searching for "nc-notifications" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/nc-notifications@2008-07-14.yang" file.
[INF]: LY: Searching for "notifications" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/notifications@2008-07-14.yang" file.
[INF]: LY: Searching for "ietf-x509-cert-to-name" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-x509-cert-to-name@2014-12-10.yang" file.
[INF]: LY: Searching for "ietf-crypto-types" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-crypto-types@2019-07-02.yang" file.
[INF]: LY: Searching for "ietf-keystore" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-keystore@2019-07-02.yang" file.
[INF]: LY: Searching for "ietf-crypto-types" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-crypto-types@2019-07-02.yang" file.
[INF]: LY: Newer revision than "ietf-crypto-types@2019-07-02" not found, using this as the latest revision.
[INF]: LY: Searching for "ietf-truststore" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-truststore@2019-07-02.yang" file.
[INF]: LY: Searching for "ietf-tcp-common" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-tcp-common@2019-07-02.yang" file.
[INF]: LY: Searching for "ietf-ssh-server" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-ssh-server@2019-07-02.yang" file.
[INF]: LY: Searching for "ietf-ssh-common" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-ssh-common@2019-07-02.yang" file.
[INF]: LY: Searching for "ietf-keystore" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-keystore@2019-07-02.yang" file.
[INF]: LY: Newer revision than "ietf-keystore@2019-07-02" not found, using this as the latest revision.
[INF]: LY: Searching for "iana-crypt-hash" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/iana-crypt-hash@2014-08-06.yang" file.
[INF]: LY: Searching for "ietf-tls-server" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-tls-server@2019-07-02.yang" file.
[INF]: LY: Searching for "ietf-tls-common" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-tls-common@2019-07-02.yang" file.
[INF]: LY: Searching for "ietf-truststore" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-truststore@2019-07-02.yang" file.
[INF]: LY: Newer revision than "ietf-truststore@2019-07-02" not found, using this as the latest revision.
[INF]: LY: Searching for "ietf-netconf-server" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-netconf-server@2019-07-02.yang" file.
[INF]: LY: Searching for "ietf-x509-cert-to-name" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-x509-cert-to-name@2014-12-10.yang" file.
[INF]: LY: Newer revision than "ietf-x509-cert-to-name@2014-12-10" not found, using this as the latest revision.
[INF]: LY: Searching for "ietf-tcp-client" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-tcp-client@2019-07-02.yang" file.
[INF]: LY: Searching for "ietf-tcp-common" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-tcp-common@2019-07-02.yang" file.
[INF]: LY: Newer revision than "ietf-tcp-common@2019-07-02" not found, using this as the latest revision.
[INF]: LY: Searching for "ietf-tcp-server" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-tcp-server@2019-07-02.yang" file.
[INF]: LY: Searching for "ietf-subscribed-notifications" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-subscribed-notifications@2019-09-09.yang" file.
[INF]: LY: Searching for "ietf-interfaces" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-interfaces@2018-02-20.yang" file.
[INF]: LY: Searching for "ietf-network-instance" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-network-instance@2019-01-21.yang" file.
[INF]: LY: Searching for "ietf-ip" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-ip@2018-02-22.yang" file.
[INF]: LY: Searching for "ietf-yang-schema-mount" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-yang-schema-mount@2019-01-14.yang" file.
[INF]: LY: Searching for "ietf-restconf" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-restconf@2017-01-26.yang" file.
[INF]: LY: Use of anydata to define configuration data is not recommended. /ietf-subscribed-notifications:filters/stream-filter/{uses='stream-filter-elements'}/filter-spec/stream-subtree-filter/stream-subtree-filter
[INF]: LY: Use of anydata to define configuration data is not recommended. /ietf-subscribed-notifications:subscriptions/subscription/{uses='subscription-policy'}/{uses='subscription-policy-dynamic'}/{uses='subscription-policy-modifiable'}/target/stream/stream-filter/within-subscription/{uses='stream-filter-elements'}/filter-spec/stream-subtree-filter/stream-subtree-filter
[INF]: LY: Searching for "ietf-yang-push" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-yang-push@2019-09-09.yang" file.
[INF]: LY: Searching for "ietf-subscribed-notifications" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-subscribed-notifications@2019-09-09.yang" file.
[INF]: LY: Newer revision than "ietf-subscribed-notifications@2019-09-09" not found, using this as the latest revision.
[INF]: LY: Searching for "ietf-yang-patch" in "/root/bak_sysrepo/build/repository/yang".
[INF]: LY: Loading schema from "/root/bak_sysrepo/build/repository/yang/ietf-yang-patch@2017-02-22.yang" file.
[INF]: LY: Use of anydata to define configuration data is not recommended. /ietf-yang-push:{augment='/sn:filters'}/ietf-yang-push:selection-filter/{uses='selection-filter-types'}/filter-spec/datastore-subtree-filter/datastore-subtree-filter
[INF]: LY: Use of anydata to define configuration data is not recommended. /ietf-subscribed-notifications:filters/stream-filter/{uses='stream-filter-elements'}/filter-spec/stream-subtree-filter/stream-subtree-filter
[INF]: LY: Use of anydata to define configuration data is not recommended. /ietf-yang-push:{augment='/sn:subscriptions/sn:subscription/sn:target'}/ietf-yang-push:datastore/{uses='datastore-criteria'}/{uses='selection-filter-objects'}/selection-filter/within-subscription/{uses='selection-filter-types'}/filter-spec/datastore-subtree-filter/datastore-subtree-filter
[INF]: LY: Use of anydata to define configuration data is not recommended. /ietf-subscribed-notifications:subscriptions/subscription/{uses='subscription-policy'}/{uses='subscription-policy-dynamic'}/{uses='subscription-policy-modifiable'}/target/stream/stream-filter/within-subscription/{uses='stream-filter-elements'}/filter-spec/stream-subtree-filter/stream-subtree-filter
[INF]: LY: The ordered-by statement is ignored in lists representing notification content (/ietf-yang-push:push-change-update/datastore-changes/{uses='ypatch:yang-patch'}/yang-patch/edit).
[INF]: SR: Connection 60 created.
[INF]: SR: Session 42 (user "root", CID 60) created.
[ERR]: SR: RPC subscription for "/ietf-netconf:get-config" with priority 0 already exists.
[ERR]: NP: Subscribing for "/ietf-netconf:get-config" RPC failed (Invalid argument).
[ERR]: NP: Server RPC subscribe failed.
[INF]: NP: Server terminated.
[INF]: SR: No datastore changes to apply.
root@d86bd7159170:~/netopeer2_bak#
  • 确认服务
root@d86bd7159170:~/netopeer2_bak# ps -ef | grep net
root       17019       1  0 02:58 ?        00:00:00 netopeer2-server
root       17031       7  0 03:01 pts/0    00:00:00 grep --color=auto net
root@d86bd7159170:~/netopeer2_bak# root@d86bd7159170:~/netopeer2_bak# ss -apn | grep 830
tcp   LISTEN     0       5                0.0.0.0:830             0.0.0.0:*      users:(("netopeer2-serve",pid=17019,fd=34))
root@d86bd7159170:~/netopeer2_bak#
  • 给root设置密码
root@d86bd7159170:~/netopeer2_bak# passwd
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@d86bd7159170:~/netopeer2_bak#
  • 运行netopeer2-cli ,;连接netopeer2-server
root@d86bd7159170:~/netopeer2_bak# netopeer2-cli
> connect localhost
Interactive SSH Authentication
Type your password:
Password:
>

*接着 获取running

> get-config --source running
DATA
<data xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><keystore xmlns="urn:ietf:params:xml:ns:yang:ietf-keystore"><asymmetric-keys><asymmetric-key><name>genkey</name><algorithm>rsa2048</algorithm><public-key>MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAubowy3luPuk3/5PZtXApS+Y6XopgcvpMZNbtoS9nvH4sZBd75ApZ3Zwd3WXs/KQvylX14ktczxrVs+NLtN5ZZO0vOZMF/v/wGoOoWMljboRt5Bx1oV27qjmd9pohesrusDl+DpyOo1kmvFwypgXk6PWzVBBUJKifdk5VnGdEGoBF8opMxqmgYUaCqjKLFnpgXfkDu9RGp4KO/oHyvtQQ49ChMnWkphYUc+73msG2rkcrJO0yUCeY1HNA8um1ihilnnmphT3DfCib8PinJjzyaekFvVbxdHwB/swYtwIZWrqSLibfUS6fL99DPVHs2QtTUCAYUGBzjp3042lhC+9hewIDAQAB</public-key><private-key>MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQC5ujDLeW4+6Tf/k9m1cClL5jpeimBy+kxk1u2hL2e8fixkF3vkClndnB3dZez8pC/KVfXiS1zPGtWz40u03llk7S85kwX+//Aag6hYyWNuhG3kHHWhXbuqOZ32miF6yu6wOX4OnI6jWSa8XDKmBeTo9bNUEFQkqJ92TlWcZ0QagEXyikzGqaBhRoKqMosWemBd+QO71Eango7+gfK+1BDj0KEydaSmFhRz7veawbauRysk7TJQJ5jUc0Dy6bWKGKWeeamFPcN8KJvw+KcmPPJp6QW9VvF0fAH+zBi3AhlaupIuJt9RLp8v30M9UezZC1NQIBhQYHOOnfTjaWEL72F7AgMBAAECggEAedJ57Q0SViuNcpOdKpiOTd2OjbKAPwqUj1Q2/BHnHkk4ftK0jciIV4buQ+l2P+TGABbQOIWsM6Brahn9734k7sFwx3f7Z96itBGFm+9EzBoLJqPQOG8OCELQrQ8+RJfVZjvfxl/EY7q3YLes9R9Knc+Dt/EZ8A22wtfw6a0Gi8ZXaeGK4/y7o2vU5JdPhMcZUJQ9l42Rd+rxtVggD/IvN5TWNl7gV+CxpfjZF5KyL/tkSXaUMxZfGykuNAKpenOwG6hV448i2aphqhiFEP5LRJvtcqiDbc//HIdg+zbQIrrzyc+cSPVxWaSHxiGxP1U26zBZWCXtan2qW+MYJ0oIaQKBgQDg/AzM5FDbTJ7/di7s4s7Wvbu0mHObWrDy0PPKaJJ6nnrFiMtz5OoXKpRJFW+Z4jUvEYz43cbsRC0nCUjQdZAMGWOewYWiGKLXRXy8jtv6/nKgWwVOs4knQob5bU7gA5j7WEoAvVRDcdRyfRW1Qx70QQN2eUl0/jroONzV7PCunwKBgQDTVLWIwqYkp/xCprrKQ7W+kgPT4f/fKvFReRxtT4f9THm3UP74vZes/k1/D4IvXJiASjgLy6fqgd9K+6lzHn7symWmKx1lzeaFmDSniB6ChiQZfIKu2NIkegU8nr+xORkhLZyQTD+JcVa+Laq1lN9Yed1gvW7NQHFQM6w7NfILpQKBgQCZUYqTkj+7wpJTusEtsz6LPo8M+htGUl5lipmoZOz1XMyDkr47A1O3Z8/XoiEEeBAQPGCaM+Bcn/U5Ne2GCaeZZy/pPy4HEcze8L6ZbK1idUW+G2kZgeXEeGSs0529sRXuqvL7YAptT8QcJTvG46/Tef6XHP4/GQUhvaZYrngyNwKBgQCFPMgDRG2JeNvDjekAcvYYA2kkYj13D1T7//abOGRNn7SxjgBjBO2m5OIpNLboc2G2qJRzY2AnquAEH2yzJsvxMJ4ryM0NDWbEXbT81wYdVsNVyjl+UTcURlYc5R2Id65PS7mFBH2egvWki5gwSX8TAio/vs8n2vRWE24IGrfS/QKBgQCtMrDtNVLkVpY5bPHAXJJ3KmwN0cEuOeI2Mjg9nfjjitJIG4gOUSxif6KoR8y1OSZjtJBttiAb21XvFnA/kaSk0qBsvo5iHwaBidDHK+qRCEClshvTzOz80QE9XfvFnpKcKiGH1uClgPNhmy/w6aQqbHmbrwRIb5VkiDo3sdxHYQ==</private-key></asymmetric-key></asymmetric-keys></keystore><netconf-server xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-server"><listen><endpoint><name>default-ssh</name><ssh><tcp-server-parameters><local-address>0.0.0.0</local-address><keepalives><idle-time>1</idle-time><max-probes>10</max-probes><probe-interval>5</probe-interval></keepalives></tcp-server-parameters><ssh-server-parameters><server-identity><host-key><name>default-key</name><public-key><keystore-reference>genkey</keystore-reference></public-key></host-key></server-identity><client-authentication><supported-authentication-methods><publickey/><passsword/><other>interactive</other></supported-authentication-methods></client-authentication></ssh-server-parameters></ssh></endpoint></listen></netconf-server>
</data>>

对接成功!

在Ubuntu18.04上搭建netopeer2环境相关推荐

  1. 在Ubuntu18.04上搭建私有网盘 —— ownCloud

    欢迎访问我的个人博客: luomuxiaoxiao.com 您可能还会对这篇文章感兴趣:如何下载网站的在线视频 一 安装ownCloud 二 设置默认目录 三 为ownCloud建立数据库 四 配置o ...

  2. 从0开始在ubuntu18.04上搭建嵌入式Linux开发环境以及嵌入式Qt5.6开发环境

    博客中提到的一些工具文件都可以在该链接中下载:https://pan.baidu.com/s/10r4kku8C0bt8vLampOyvWQ 目录 一  Oflash软件通过openJtag下载u-b ...

  3. Ubuntu 20.04 上搭建 LEMP/LAMP 环境运行 WordPress

    Ubuntu 20.04 上搭建 LEMP 环境运行 WordPress Wordpress 是最流行的内容管理系统之一,也是常用的 CMS(内容管理系统)程序之一.Wordpress 可以在 VPS ...

  4. Ubuntu18.04中搭建事件相机模拟器rpg-esim环境

    Ubuntu18.04中搭建事件相机模拟器rpg-esim环境 esim 是 ETH 开发的一款的模拟事件相机工作原理的仿真器,其是基于ROS环境的,在安装esim环境之前,需要先安装ROS.在官方给 ...

  5. 基于30系显卡以及Ubuntu18.04系统的YOLOv3环境搭建和训练模型以及测试

    基于30系显卡以及Ubuntu18.04系统的YOLOv3环境搭建和训练模型以及测试 安装环境 下面是官网对N卡框架以及驱动和cuda版本的部分对应关系 驱动 (可以跳过这段安装,你可以在安装CUDA ...

  6. ubuntu14.04上搭建android开发环境

    这几天心血来潮,想在ubuntu上写写android软件.所以就上网找些资料在ubuntu上搭建android环境.结果要么时不完整的,要么就是过时的. 所以我把我搭建android环境的过程写下了, ...

  7. 在Ubuntu18.04上安装ros2的环境,ros2的常用命令:播放包、录制包等

    在Ubuntu18.04上安装ros2的环境,ros2的常用命令:播放包.录制包等 1 添加密钥和ros2下载 2 更新源和安装ros-eloquent-desktop及其依赖 3 配置环境 3.1 ...

  8. ubuntu16.04上搭建stm32f4开发环境

    ubuntu16.04上搭建stm32f4开发环境 工程源码的地址 https://github.com/txson/ubuntu-stm32 欢迎大家参与修改 搭建交叉编译环境 stm32 属于ar ...

  9. 《在(虚拟机)ubuntu16.04上进行openwrt环境搭建及源码下载》

    广西·河池学院 广西高校重点实验室培训基地 系统控制与信息处理重点实验室 本篇博客来之河池学院:OpenWrt无线路由组 写作时间: 2020年7月30日21:00:51 <在(虚拟机)ubun ...

最新文章

  1. 如何评价LoRa这项应用于低功率长距离场景的物联网传输技术?
  2. 为什么Redis内存不宜过大
  3. 【Linux】 任务调度/计划 cron
  4. WEB UI篇——以结构化的方式写CSS
  5. nvidia控制面板点了没反应win7_win7系统Nvidia控制面板怎么设置?
  6. 二进制的认识、进制之间的转换、计算机储存单位
  7. 为何boss上的HR要了简历就不回复了?
  8. Kubernetes-Service服务(十一)
  9. oc引导windows蓝屏_Win10开机蓝屏无法启动?不急,教你一招轻松解决,无需重装系统...
  10. 科大讯飞语音识别率从97%提升至98% 用AI赋能方言保护
  11. 值得收藏-50个免费可商用图库
  12. 滚轮控制摄像机移动_缩放视角_限制上下限
  13. 华哥倒酒(二分答案)
  14. linux,debian系统安装录制视频软件simplescreenRecorder
  15. 医院预约挂号mysql_医院预约挂号系统代码 mysql+myeclipse
  16. 数据科学家必备的5种离群点/异常检测方法
  17. 新视野大学英语(1)课本单词汇总
  18. robot_marm catkin_make报错
  19. win10系统的计算机C盘在哪,win10系统只有一个C盘怎么解决
  20. UVa 11437 (梅涅劳斯定理) Triangle Fun

热门文章

  1. Zigbee联盟推出物联网通用语言Dotdot
  2. ZIP密码如何删除?忘记密码怎么办?
  3. C/S架构的性能测试
  4. 【QT】实现本地音乐播放器
  5. 把学生名与考试分数录入到集合中,并按分数显示前三名成绩学员的名字
  6. windows live writer 设置默认字体
  7. 钓鱼网站也在使用https加密,如何识别钓鱼网站?
  8. 数学物理方程王明新考点笔记二
  9. 数学物理方程王明新考点笔记一
  10. html 冒泡事件拦截,JavaScript阻止事件冒泡与事件捕获