In this tutorial, we will go through the process of installing Oxidized on the latest version of nixOS. Oxidized is an open-source network configuration management tool that is widely used for backing up network configuration files. It supports a wide range of network devices including Cisco, Juniper, and many more.
Before we proceed with the installation process, make sure that you have the following prerequisites:
To install Oxidized on nixOS, we need to install some dependencies. In this step, we will install the required dependencies using the nix package manager.
First, open up a terminal on your nixOS machine.
Run the following command to update your package list:
sudo nix-channel --update
Then, install the required dependencies using the following command:
sudo nix-env -i -A nixos.pkgs.libssh
sudo nix-env -i -A nixos.pkgs.ruby_3_0
sudo nix-env -i -A nixos.pkgs.git
This command will install the libssh library, the Ruby programming language (version 3.0), and the Git version control system.
Now that we have installed the required dependencies, we can proceed with the Oxidized installation process.
Open up a terminal on your nixOS machine.
Clone the Oxidized repository using the following command:
git clone https://github.com/ytti/oxidized.git
Change into the oxidized directory using the following command:
cd oxidized
Install Oxidized using the following command:
sudo make install
This command will compile and install Oxidized on your nixOS machine.
Now that we have installed Oxidized on our nixOS machine, we need to configure it.
Open up a terminal on your nixOS machine.
Create a configuration file for Oxidized using the following command:
sudo mkdir /etc/oxidized
sudo touch /etc/oxidized/config
Open the configuration file using a command-line editor such as nano, vim or emacs:
sudo nano /etc/oxidized/config
Add the following configuration to the file:
---
username: admin
password: admin
model: cisco_ios
interval: 3600
use_ssl: false
debug: false
threads: 30
timeout: 20
retries: 3
prompt: !ruby/regexp /^([\w.@-]+[#>]\s?)$/
rest: 127.0.0.1:8888
groups:
router:
username: some_user
password: some_password
switch:
username: another_user
password: another_password
input:
default: ssh
ssh:
secure: true
output:
default: file
file:
directory: /var/lib/oxidized/configs
This is a sample configuration that you can modify according to your requirements. You should change the device type and groups to match your network devices.
Now that we have configured Oxidized, we can start it up.
Open up a terminal on your nixOS machine.
Start the oxidized service using the following command:
sudo systemctl start oxidized
Check the status of the service using the following command:
sudo systemctl status oxidized
If the service status returns "active (running)", then Oxidized has been successfully installed and configured on your nixOS machine.
In this tutorial, we have gone through the process of installing and configuring Oxidized on the latest version of nixOS. With Oxidized, you can easily backup and manage your network device configurations, saving you time and hassle in the long run.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!