linuxCentos_8安装cisco_yang-exp-创新互联
linuxCentos_8 安装cisco_yang-explorer 需要先安装python2
安装python2.7 所需的依赖包yum install gcc openssl-devel bzip2-devel
安装python2.7yum install python2
进入linux的软连接存放位置cd /usr/bin
.查看现有python的软连接指向的版本ls -al *python*
删除旧的软连接sudo rm python2
建立新的软连接sudo ln -s python2.7 python
安装 PIP2curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
python get-pip.py
============================
安装python2 虚拟环境
pip2 install virtualenv
安装依赖组件
yum install libxml2-devel libxslt-devel python2-devel zlib-devel
graphviz(可视化图形工具)
yum install graphviz
安装pyang
pip2 install pyang
安装Git
yum install git
安装yang-explorer
[root@localhost ~]#git clone https://github.com/CiscoDevNet/yang-explorer.git
[root@localhost ~]# cd yang-explorer/
[root@localhost yang-explorer]# bash setup.sh~忽略安装内容~
#提示是否使用root初始化数据集
Do you want to continue as root ? (n/N) y
编辑YangExplorer.html //
[root@localhost static]# pwd
/root/yang-explorer/server/static
[root@localhost static]# vi YangExplorer.html
编辑后如下图(编辑60,61行内容host=本linux,ip地址,port= 8088 #ip和端口要用《‘ ’》引起):
编辑start.sh【本linnx的ip,端口默认】
[root@localhost yang-explorer]# pwd
/root/yang-explorer
[root@localhost yang-explorer]# vim start.sh
启动yang-explorer
[root@localhost yang-explorer]# bash ./start.sh
Activating virtualenv ..
Starting YangExplorer server ..
Use http://192.168.1.100:8088/static/YangExplorer.html
Performing system checks...
System check identified no issues (0 silenced).
June 27, 2018 - 02:23:34
Django version 1.8.3, using settings 'server.settings'
Starting development server at http://192.168.1.100:8088/
Quit the server with CONTROL-C
使用同一网段的主机浏览器打开(需要加载Flash)
访问yang-explorer(http://192.168.1.100:8088/static/YangExplorer.html)
登录yang-explorer(密码:guest)
注意事项:如果安装Django出故障的解决办法
[root@localhost yang-explorer]# cd v
[root@localhost v]# source bin/activate
(v) [root@localhost v]# pip2 install Django-1.8.3-py2.py3-none-any.whl
Processing ./Django-1.8.3-py2.py3-none-any.whl
Installing collected packages: Django
Successfully installed Django-1.8.3
(v) [root@localhost v]# python
Python 2.7.5 (default, Apr 11 2018, 07:36:10)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-28)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
">>> import django
">>> exit()
另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
网站题目:linuxCentos_8安装cisco_yang-exp-创新互联
本文路径:http://myzitong.com/article/joisg.html