Skip to main content

NSO-Initial Install

·3 mins
Nso
Table of Contents
  • 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
#

[root@localhost ~]# tar -zxvf jdk-8u202-linux-x64.tar.gz
[root@localhost ~]#  mkdir /usr/java
[root@localhost ~]# mv jdk1.8.0_202/ /usr/java
[root@localhost ~]# vi /etc/profile

export JAVA_HOME=/usr/java/jdk1.8.0_202
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin

Install NSO(local-install)
#

[root@localhost ~]# chmod 777 nso-5.2.1.linux.x86_64.signed.bin
[root@localhost ~]# ./nso-5.2.1.linux.x86_64.signed.bin
[root@localhost ~]# ./nso-5.2.1.linux.x86_64.installer.bin $HOME/nso-5.2.1
[root@localhost ~]# echo 'source $HOME/nso-5.2.1/ncsrc' >> ~/.bashrc
[root@localhost ~]# ncs-setup --dest ./ncs-run

Install Ned
#

[root@localhost ~]# chmod 777 ncs-5.2-cisco-iosxr-7.13.4.signed.bin
[root@localhost ~]# ./ncs-5.2-cisco-iosxr-7.13.4.signed.bin
[root@localhost ~]# tar -xvf ncs-5.2-cisco-iosxr-7.13.4.tar.gz
[root@localhost src]# pwd
/root/cisco-iosxr-cli-7.13/src
[root@localhost src]# make all

[root@localhost ~]# mv cisco-iosxr-cli-7.13/ nso-5.2.1/packages/neds/
[root@localhost ~]# ln -s $HOME/nso-5.2.1/packages/neds/cisco-iosxr-cli-7.13 ./ncs-run/packages/
[root@localhost ~]# cd ncs-run/
[root@localhost ncs-run]# ncs
[root@localhost ncs-run]# ncs_cli -u admin -C
admin@ncs#
admin@ncs# packages reload
admin@ncs# show packages package package-version

Add devices
#

admin@ncs(config)# devices authgroups group calo
admin@ncs(config-group-calo)# default-map remote-name cisco
admin@ncs(config-group-calo)# default-map remote-password cisco
admin@ncs(config-group-calo)# commit
admin@ncs(config)# devices device 5501
admin@ncs(config-device-5501)# address 10.75.49.137
admin@ncs(config-device-5501)# authgroup calo
admin@ncs(config-device-5501)# device-type cli ned-id cisco-iosxr-cli-7.13
admin@ncs(config-device-5501)# device-type cli protocol ssh
admin@ncs(config-device-5501)# state admin-state unlocked
admin@ncs(config-device-5501)# commit
admin@ncs(config)# devices device 5501 ssh fetch-host-keys
admin@ncs# devices device 5501 sync-from

NCS5501:
ssh server v2
ssh server netconf vrf default
RP/0/RP0/CPU0:R2-5501#show run netconf-yang agent
Thu Oct 31 04:24:33.798 UTC
netconf-yang agent
 ssh
RP/0/RP0/CPU0:R2-5501#show run netconf
Thu Oct 31 04:24:22.880 UTC
netconf agent tty

Enable Web GUI
#

[root@localhost ~]#  firewall-cmd --permanent --zone=public --add-port=8080/tcp
[root@localhost ~]# firewall-cmd --permanent --zone=public --add-port=8080/udp
[root@localhost ~]# firewall-cmd --reload

Web GUI password admin/admin

NSO-system install
#

[root@localhost ~]#sudo sh nso-5.2.1.linux.x86_64.installer.bin --system-install
[root@localhost ~]#groupadd ncsadmin
[root@localhost ~]#groupadd ncsoper
[root@localhost ~]#id root
[root@localhost ~]#usermod -a -G 'ncsadmin' 'root'
[root@localhost ~]#usermod -a -G 'ncsoper' 'root'
Intsall log:
[root@localhost ~]# sudo sh nso-5.2.1.linux.x86_64.installer.bin --system-install
INFO  Using temporary directory /tmp/ncs_installer.91949 to stage NCS installation bundle
INFO  Using /opt/ncs/ncs-5.2.1 for static files
INFO  Using /etc/ncs for configuration files
INFO  Using /var/opt/ncs for run-time state files
INFO  Using /var/log/ncs for log files
INFO  Unpacked ncs-5.2.1 in /opt/ncs/ncs-5.2.1
INFO  Found and unpacked corresponding DOCUMENTATION_PACKAGE
INFO  Found and unpacked corresponding EXAMPLE_PACKAGE
INFO  Generating default SSH hostkey (this may take some time)
INFO  SSH hostkey generated
INFO  Environment set-up generated in /opt/ncs/ncs-5.2.1/ncsrc
INFO  NSO installation script finished
INFO  Found and unpacked corresponding NETSIM_PACKAGE
INFO  Generating keys for encrypted-strings
INFO  Configuring installation for PAM authentication
INFO  Using PAM service system-auth for authentication
INFO  Generating self-signed certificates for HTTPS
INFO  Installed init script /etc/init.d/ncs
INFO  Installed user profile script ncs.sh in /etc/profile.d
INFO  Installed user profile script ncs.csh in /etc/profile.d
INFO  Installed 'logrotate' configuration file ncs in /etc/logrotate.d

INFO  The installation has been configured for PAM authentication,
INFO  with group assignment based on the OS group database
INFO  (e.g. /etc/group file). Users that need access to NCS must
INFO  belong to either the 'ncsadmin' group (for unlimited access
INFO  rights) or the 'ncsoper' group (for minimal access rights).
INFO  To create the 'ncsadmin' group, use OS shell command:

  groupadd ncsadmin

INFO  To create the 'ncsoper' group, use OS shell command:

  groupadd ncsoper

INFO  To add an existing user to one of these groups, use OS shell command:

  usermod -a -G <groupname> <username>

INFO  NCS installation complete

[root@localhost ~]#



Comments