Repository URL to install this package:
|
Version:
0.0.3~20240819090515-SNAPSHOT-6180dae ▾
|
| .. |
| LICENSE |
| README.md |
| SECURITY.md |
| SUPPORT.md |
Open source projects from n2x.io.
This repository contains n2xctl, a tool for managing the n2x.io SASE platform from the command line.
n2xctl is available for a variety of Linux platforms, macOS and Windows.
n2xctl has the same minimum requirements as Go:
See Quick Start to learn how to start building your n2x cloud-agnostic architecture.
See Installation for more details and other platforms.
For the complete n2x.io platform documentation visit n2x.io/docs.
Linux, macOS and Windows binary downloads are available from the Releases page.
You can download the pre-compiled binaries and install them with the appropriate tools.
Download the latest release.
curl -LO "https://dl.n2x.io/binaries/stable/latest/linux/amd64/n2xctl"
Validate the binary (optional).
Download the n2xctl checksum file:
curl -LO "https://dl.n2x.io/binaries/stable/latest/linux/amd64/n2xctl_checksum.sha256"
Validate the n2xctl binary against the checksum file:
sha256sum --check < n2xctl_checksum.sha256
If valid, the output must be:
n2xctl: OK
If the check fails, sha256 exits with nonzero status and prints output similar to:
n2xctl: FAILED sha256sum: WARNING: 1 computed checksum did NOT match
Install n2xctl.
sudo install -o root -g root -m 0755 n2xctl /usr/local/bin/n2xctl
Note: If you do not have root access on the target system, you can still install n2xctl to the
~/.local/bindirectory:chmod +x n2xctl mkdir -p ~/.local/bin mv ./n2xctl ~/.local/bin/n2xctl # and then append (or prepend) ~/.local/bin to $PATH
Verify that the installed version is the latest:
n2xctl version show
n2x.io provides a package repository that contains both DEB and RPM downloads.
Run the following to setup a new APT sources.list entry and install n2x-cli:
echo 'deb [trusted=yes] https://repo.n2x.io/apt/ /' | sudo tee /etc/apt/sources.list.d/n2x.list sudo apt update sudo apt install n2x-cli
Verify that the installed version is the latest:
n2xctl version show
Run the following to create a n2x.repo file and install n2x-cli:
cat <<EOF | sudo tee /etc/yum.repos.d/n2x.repo [n2x] name=n2x repository - stable baseurl=https://repo.n2x.io/yum enabled=1 gpgcheck=0 EOF sudo yum install n2x-cli
Verify that the installed version is the latest:
n2xctl version show
If you are on Linux and using Homebrew package manager, you can install the n2x.io CLI with Homebrew.
Run the installation command:
brew install n2x-io/tap/n2x-cli
Verify that the installed version is the latest:
n2xctl version show
Download the latest release.
Intel:
curl -LO "https://dl.n2x.io/binaries/stable/latest/darwin/amd64/n2xctl"
Apple Silicon:
curl -LO "https://dl.n2x.io/binaries/stable/latest/darwin/arm64/n2xctl"
Validate the binary (optional).
Download the n2xctl checksum file:
Intel:
curl -LO "https://dl.n2x.io/binaries/stable/latest/darwin/amd64/n2xctl_checksum.sha256"
Apple Silicon:
curl -LO "https://dl.n2x.io/binaries/stable/latest/darwin/arm64/n2xctl_checksum.sha256"
Validate the n2xctl binary against the checksum file:
shasum --algorithm 256 --check n2xctl_checksum.sha256
If valid, the output must be:
n2xctl: OK
If the check fails, sha256 exits with nonzero status and prints output similar to:
n2xctl: FAILED sha256sum: WARNING: 1 computed checksum did NOT match
Make the n2xctl binary executable.
chmod +x n2xctl
Move the n2xctl binary to a file location on your system PATH.
sudo mkdir -p /usr/local/bin sudo mv n2xctl /usr/local/bin/n2xctl sudo chown root: /usr/local/bin/n2xctl
Note: Make sure
/usr/local/binis in yourPATHenvironment variable.
Verify that the installed version is the latest:
n2xctl version show
If you are on macOS and using Homebrew package manager, you can install the n2x.io CLI with Homebrew.
Run the installation command:
brew install n2x-io/tap/n2x-cli
Verify that the installed version is the latest:
n2xctl version show
Open the Windows PowerShell as Administrator and create the n2x folder.
mkdir 'C:\Program Files\n2x'
Download the latest release into the n2x folder.
curl -LO "https://dl.n2x.io/binaries/stable/latest/windows/amd64/n2xctl.exe"
Validate the binary (optional).
Download the n2xctl.exe checksum file:
curl -LO "https://dl.n2x.io/binaries/stable/latest/windows/amd64/n2xctl.exe_checksum.sha256"
Validate the n2xctl.exe binary against the checksum file:
Using Command Prompt to manually compare CertUtil's output to the checksum file downloaded:
CertUtil -hashfile n2xctl.exe SHA256 type n2xctl.exe_checksum.sha256
Using PowerShell to automate the verification using the -eq operator to get a True or False result:
$($(CertUtil -hashfile n2xctl.exe SHA256)[1] -replace " ", "") -eq $(type n2xctl.exe_checksum.sha256).split(" ")[0]
Add the folder C:\Program Files\n2x to your PATH environment variable. You can either append or prepend it to the existing value.
$ENV:PATH="$ENV:PATH;C:\Program Files\n2x"
Verify that the installed version is the latest:
n2xctl version show
You can also run n2xctl as a Docker container.
Registry:
ghcr.io/n2x-io/n2xctlExample usage:
docker run --rm -ti -v $HOME/.n2x:/root/.n2x:ro ghcr.io/n2x-io/n2xctl help
All artifacts are checksummed and the checksum file is signed with cosign.
Download the files you want and the checksums.txt, checksum.txt.pem and checksums.txt.sig files from the Releases page:
Verify the signature:
cosign verify-blob \ --cert checksums.txt.pem \ --signature checksums.txt.sig \ checksums.txt
If the signature is valid, you can then verify the SHA256 sums match the downloaded binary:
sha256sum --ignore-missing -c checksums.txt
Our Docker images are signed with cosign.
Verify the signatures:
COSIGN_EXPERIMENTAL=1 cosign verify ghcr.io/n2x-io/n2xctl
To view a list of available commands and options, simply run:
n2xctl help
For in-depth information about specific commands and their usage, refer to our dedicated CLI Command Reference guide.
To remove n2xctl from the system, use the following commands:
sudo rm /usr/local/bin/n2xctl sudo rm -f $HOME/.n2x
sudo apt-get -y remove n2x-cli sudo rm -f $HOME/.n2x
sudo yum -y remove n2x-cli sudo rm -f $HOME/.n2x
To remove n2xctl from the system, use the following commands:
sudo rm /usr/local/bin/n2xctl sudo rm -f $HOME/.n2x
To remove n2xctl from the system, open the Windows PowerShell as Administrator and use the following commands:
rm 'C:\Program Files\n2x' -r -force
Have questions, need support and or just want to talk?
Get in touch with the n2x community!
Participation in the n2x community is governed by the Contributor Covenant Code of Conduct. Please make sure to read and observe this document.
Please make sure to read and observe this document. By participating, you are expected to uphold this code.
The n2x open source projects are licensed under the Apache 2.0 License.