Cisco Nexus 9000 Series NX-OS Software Upgrade and Downgrade Guide, Release 10.6(x)

PDF

Configure an FTP server and set up a local FTP YUM repository

Updated: February 5, 2026

Overview

This section outlines the steps to create an FTP server and configure a local FTP YUM repository for managing NX-OS software packages.

For setting up a local FTP YUM repository, you have to first create an FTP server, create a local FTP YUM repository, and configure the NX-OS switch to reach the FTP server as outlined in this illustration.

Figure 1. Configure an FTP server and set up a local FTP YUM repository
Note

For NX-OS Release 10.1(1), visit https://devhub.cisco.com/artifactory/open-nxos/10.1.1/ for open-nxos repository.


Create an FTP server on Red Hat Enterprise Linux 7 (RHEL7) Virtual Machine

Complete the following steps to create an FTP server on Red Hat Enterprise Linux 7 (RHEL7) Virtual Machine (VM):

Procedure

1.

Install vsftpd, an FTP server, using the dnfinstall vsftpd command.

2.

Start the FTP server using the systemctl start vsftpd command.

3.

Check the status of the FTP server using the systemctl status vsftpd command.

4.

Provide access to the FTP services from the external systems and open port 21 using the firewall-cmd --zone=public --permanent --add-port=21/tcp command.

5.

Add the FTP service using the firewall-cmd --zone=public --permanent --add-service=ftp command.

6.

Reload the server using the firewall-cmd --reload command.

7.

Host a file in the FTP server (for example, test.txt) and attempt Wget of that file using thewget ftp:// < ip of FTP server > / test.txt command.

Note

The /var/ftp/ directory is the default home directory of the FTP server.


Create a local FTP YUM repository

Complete the steps provided in this procedure to synchronize the external repository RPMs to the FTP server and create a local FTP YUM repository.

Procedure

1.

Create a repository file using the touch/etc/yum.repos.d/local.repo command.

Create a repository file under /etc/yum.repos.d/ , for example, creates local.repo repository and adds the base URL.

Example:

bash-4.3# touch /etc/yum.repos.d/local.repo 
2.

Edit the repository file and copy the localrepo details.using the vim /etc/yum.repos.d/local.repo command.

Note

Modify the base URL to the required repository URL.

Example:

bash-4.3# vim /etc/yum.repos.d/local.repo 

[localrepo]
name=localrepo
baseurl=
https://devhub.cisco.com/artifactory/open-nxos/7.0-3-I2-1/x86_64/
enabled=1
gpgcheck=0
sslverify=0
3.

Verify the local repository data to proceed further using the cat /etc/yum.repos.d/local.repo command.

Example:

bash-4.3# cat /etc/yum.repos.d/local.repo 

[localrepo]
name=localrepo
baseurl=
https://devhub.cisco.com/artifactory/open-nxos/7.0-3-I2-1/x86_64/
enabled=1
gpgcheck=0
sslverify=0
4.

Check the reachability of the repository using the dnf repolist command.

Example:

bash-4.3# dnf repolist 
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
* base: mirror.dhakacom.com
* extras: mirror.dhakacom.com
* updates: mirror.dhakacom.com
repo id repo name status
base/7/x86_64 CentOS-7 - Base 9,911
extras/7/x86_64 CentOS-7 - Extras 313
localrepo localrepo 687
updates/7/x86_64 CentOS-7 - Updates 711
repolist: 11,622
5.

Synchronize all the packages from the external repository to the FTP server home directory using the nohup reposync -r < repo-name mentioned in the local.repo > -p < directory path to sync > & command.

Example:

nohup reposync -r localrepo -p /var/ftp/ &

This command creates a directory with the name local.repo inside /var/ftp/ and downloads all the packages from devhub.cisco.com to the directory.

6.

Check the status of the synchronization using the tail -f nouhup.out command.

  1. ls /var/ftp/localrepo

  2. cd /var/ftp/localrepo/ && createrepo .


Configure a switch to reach an FTP server

Complete the following steps to configure a switch to reach an FTP server:

Procedure

1.

Log in as a sudo user using the run bash sudo su command.

2.

Verify that the FTP server can be reached using the ip netns exec management ping < ip_address > command.

This command checks the reachability of the FTP server address from the switch using the ping command.

3.

Create a repository file using the touch/etc/yum/repos.d/ftp.repo command.

This command creates a repository file under /etc/yum/repos.d/ , for example, it creates the ftp.repo repository.

Example:

bash-4.3# touch /etc/yum/repos.d/ftp.repo 
4.

Edit the repository file and copy the ftp repo details using the vim /etc/yum/repos.d/ftp.repo command.

Note

Modify the base URL to the required ftp server IP.

Example:

bash-4.3# vim /etc/yum/repos.d/ftp.repo 

[ftp]
name=ftp
baseurl=
ftp://198.51.100.1/localrepo/
enabled=1
gpgcheck=0
sslverify=0
5.

Create a repository file on the switch with the FTP server address as the URL using the cat /etc/yum/repos.d/ftp.repo command.

Example:

bash-4.3# cat /etc/yum/repos.d/ftp.repo
[ftp]
name=ftp
baseurl=ftp://198.51.100.1/localrepo/
enabled=1
gpgcheck=0
sslverify=0
6.

To use the Bash shell prompt, run the ip netns exec management bash command.

7.

Check the reachability of the newly created repository using the dnfrepolist command.

Example:

bash-4.3# dnf repolist
Loaded plugins: downloadonly, importpubkey, localrpmDB, patchaction, patching,
: protect-packages
groups-repo | 1.1 kB 00:00 ...
localdb | 951 B 00:00 ...
patching | 951 B 00:00 ...
thirdparty | 951 B 00:00 ...
thirdparty/primary | 758 B 00:00 ...
thirdparty 1/1
repo id repo name status
groups-repo Groups-RPM Database 37
localdb Local RPM Database 0
patching Patch-RPM Database 0
thirdparty Thirdparty RPM Database 1
ftp ftp 686
repolist: 724
8.

List the available packages in the new repository using the dnflist available command.