- Download NSO from Cisco Website
- Make sure java and python have been install in your server.
Java -version should indicate a java version of “1.7” or higher.Python2 needs to be version 2.7.5 or higher. For Python3, the version needs to be 3.4 or higher.
Install Java
1
[root@localhost ~]# tar -zxvf jdk-8u202-linux-x64.tar.gz2
[root@localhost ~]# mkdir /usr/java3
[root@localhost ~]# mv jdk1.8.0_202/ /usr/java4
[root@localhost ~]# vi /etc/profile5
6
export JAVA_HOME=/usr/java/jdk1.8.0_2027
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar8
export PATH=$PATH:$JAVA_HOME/binInstall NSO(local-install)
1
[root@localhost ~]# chmod 777 nso-5.2.1.linux.x86_64.signed.bin 2
[root@localhost ~]# ./nso-5.2.1.linux.x86_64.signed.bin 3
[root@localhost ~]# ./nso-5.2.1.linux.x86_64.installer.bin $HOME/nso-5.2.14
[root@localhost ~]# echo 'source $HOME/nso-5.2.1/ncsrc' >> ~/.bashrc5
[root@localhost ~]# ncs-setup --dest ./ncs-runInstall Ned
1
[root@localhost ~]# chmod 777 ncs-5.2-cisco-iosxr-7.13.4.signed.bin 2
[root@localhost ~]# ./ncs-5.2-cisco-iosxr-7.13.4.signed.bin3
[root@localhost ~]# tar -xvf ncs-5.2-cisco-iosxr-7.13.4.tar.gz4
[root@localhost src]# pwd5
/root/cisco-iosxr-cli-7.13/src6
[root@localhost src]# make all7
8
[root@localhost ~]# mv cisco-iosxr-cli-7.13/ nso-5.2.1/packages/neds/9
[root@localhost ~]# ln -s $HOME/nso-5.2.1/packages/neds/cisco-iosxr-cli-7.13 ./ncs-run/packages/10
[root@localhost ~]# cd ncs-run/11
[root@localhost ncs-run]# ncs12
[root@localhost ncs-run]# ncs_cli -u admin -C13
admin@ncs# 14
admin@ncs# packages reload 15
admin@ncs# show packages package package-version Add devices
1
admin@ncs(config)# devices authgroups group calo2
admin@ncs(config-group-calo)# default-map remote-name cisco3
admin@ncs(config-group-calo)# default-map remote-password cisco4
admin@ncs(config-group-calo)# commit5
admin@ncs(config)# devices device 55016
admin@ncs(config-device-5501)# address 10.75.49.1377
admin@ncs(config-device-5501)# authgroup calo8
admin@ncs(config-device-5501)# device-type cli ned-id cisco-iosxr-cli-7.13 9
admin@ncs(config-device-5501)# device-type cli protocol ssh10
admin@ncs(config-device-5501)# state admin-state unlocked 11
admin@ncs(config-device-5501)# commit1
admin@ncs(config)# devices device 5501 ssh fetch-host-keys2
admin@ncs# devices device 5501 sync-from 3
4
NCS5501:5
ssh server v26
ssh server netconf vrf default7
RP/0/RP0/CPU0:R2-5501#show run netconf-yang agent 8
Thu Oct 31 04:24:33.798 UTC9
netconf-yang agent10
ssh11
RP/0/RP0/CPU0:R2-5501#show run netconf 12
Thu Oct 31 04:24:22.880 UTC13
netconf agent ttyEnable Web GUI
1
[root@localhost ~]# firewall-cmd --permanent --zone=public --add-port=8080/tcp2
[root@localhost ~]# firewall-cmd --permanent --zone=public --add-port=8080/udp3
[root@localhost ~]# firewall-cmd --reload4
5
Web GUI password admin/adminNSO-system install
1
[root@localhost ~]#sudo sh nso-5.2.1.linux.x86_64.installer.bin --system-install 2
[root@localhost ~]#groupadd ncsadmin3
[root@localhost ~]#groupadd ncsoper4
[root@localhost ~]#id root5
[root@localhost ~]#usermod -a -G 'ncsadmin' 'root'6
[root@localhost ~]#usermod -a -G 'ncsoper' 'root'1
Intsall log:2
[root@localhost ~]# sudo sh nso-5.2.1.linux.x86_64.installer.bin --system-install3
INFO Using temporary directory /tmp/ncs_installer.91949 to stage NCS installation bundle4
INFO Using /opt/ncs/ncs-5.2.1 for static files5
INFO Using /etc/ncs for configuration files6
INFO Using /var/opt/ncs for run-time state files7
INFO Using /var/log/ncs for log files8
INFO Unpacked ncs-5.2.1 in /opt/ncs/ncs-5.2.19
INFO Found and unpacked corresponding DOCUMENTATION_PACKAGE10
INFO Found and unpacked corresponding EXAMPLE_PACKAGE11
INFO Generating default SSH hostkey (this may take some time)12
INFO SSH hostkey generated13
INFO Environment set-up generated in /opt/ncs/ncs-5.2.1/ncsrc14
INFO NSO installation script finished15
INFO Found and unpacked corresponding NETSIM_PACKAGE16
INFO Generating keys for encrypted-strings17
INFO Configuring installation for PAM authentication18
INFO Using PAM service system-auth for authentication19
INFO Generating self-signed certificates for HTTPS20
INFO Installed init script /etc/init.d/ncs21
INFO Installed user profile script ncs.sh in /etc/profile.d22
INFO Installed user profile script ncs.csh in /etc/profile.d23
INFO Installed 'logrotate' configuration file ncs in /etc/logrotate.d24
25
INFO The installation has been configured for PAM authentication,26
INFO with group assignment based on the OS group database27
INFO (e.g. /etc/group file). Users that need access to NCS must28
INFO belong to either the 'ncsadmin' group (for unlimited access29
INFO rights) or the 'ncsoper' group (for minimal access rights).30
INFO To create the 'ncsadmin' group, use OS shell command:31
32
groupadd ncsadmin33
34
INFO To create the 'ncsoper' group, use OS shell command:35
36
groupadd ncsoper37
38
INFO To add an existing user to one of these groups, use OS shell command:39
40
usermod -a -G <groupname> <username>41
42
INFO NCS installation complete43
44
[root@localhost ~]#
This Blog from Xuxing's Blog;
Link: http://imxing.cn/?p=308
No comments:
Post a Comment