How to Install Oxidized on MXLinux Latest

Oxidized is an open source network configuration management tool. It helps in backing up and storing network configurations in a Git repository. In this tutorial, we will guide you on how to install Oxidized on MXLinux Latest.

Prerequisites

Before starting with the installation, make sure that you have the following prerequisites:

Step 1: Install Dependencies

The first step is to install the necessary dependencies that Oxidized requires to run properly. Run the following command to install the dependencies:

sudo apt-get update
sudo apt-get install ruby ruby-dev libsqlite3-dev libssl-dev pkg-config zlib1g-dev

Step 2: Install Oxidized

Now that we have installed the required dependencies, it's time to install Oxidized. The easiest and recommended way to install Oxidized is through RubyGems. Run the following command to install Oxidized:

sudo gem install oxidized

Step 3: Install Optional Dependencies

Oxidized supports a few optional dependencies that can help to enhance its functionality. To install them, run the following command:

sudo apt-get install -y sshpass dnsutils make gcc

Step 4: Configure Oxidized

After installing Oxidized, we need to configure it to use it. Create a new directory for the Oxidized configuration files by running the following command:

sudo mkdir /etc/oxidized

Now, create the configuration file for Oxidized by running the following command:

sudo nano /etc/oxidized/config

Add the following code to the configuration file:

---
username: admin
password: admin
model: cisco
interval: 3600
use_syslog: true
log: /var/log/oxidized/oxidized.log
rest: 0.0.0.0:8888
cache: /var/cache/oxidized
input:
  default: ssh
output:
  default: git
  git:
    user: Oxidized
    email: oxidized@example.com
    repo: "/var/lib/oxidized/default.git"
source:
  default: csv
  csv:
    file: /etc/oxidized/devices.csv
    delimiter: !ruby/regexp /[!$#\\n]+/
    map:
      name: 0
      ip: 1
      model: 2
      group: 3

Make sure to replace the values for username, password, and email with your own.

Save and close the configuration file.

Step 5: Create a Directory for the Git Repository

In this step, we will create the directory where Oxidized will store the Git repository. Run the following command to create the directory:

sudo mkdir /var/lib/oxidized

Now, initialize the Git repository by running the following commands:

cd /var/lib/oxidized
sudo git init

You can also configure the remote Git repository if you wish.

Step 6: Create a Devices List

In this step, we will create a CSV file that contains the list of devices that Oxidized will manage. Run the following command to create the CSV file:

sudo nano /etc/oxidized/devices.csv

Add the following code to the file:

switch1.example.com, 192.168.1.1, cisco, lab
switch2.example.com, 192.168.1.2, cisco, lab

Make sure to replace the values for switch1.example.com, switch2.example.com, and 192.168.1.x addresses with your own devices.

Save and close the CSV file.

Step 7: Start Oxidized

Now that we have finished the configuration, it's time to start Oxidized. Run the following command to start the service:

sudo oxidized

Check the logs to make sure the service is running:

sudo tail -f /var/log/oxidized/oxidized.log

Conclusion

Congratulations! You have successfully installed Oxidized on MXLinux Latest. You can now use Oxidized to back up network device configurations and store them in a Git repository.

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!