How to install Snipe IT on Elementary OS Latest

Snipe IT is a free and open source IT asset management tool. It allows you to track your company's inventory of hardware, software, licenses, and accessories. In this tutorial, we will guide you through the installation process of Snipe IT on Elementary OS Latest.

Prerequisites

Before installing Snipe IT, make sure that your system meets the following requirements:

Step 1: Install LAMP Stack

Snipe IT requires a LAMP (Linux, Apache, MySQL, PHP) stack to run. To install the LAMP stack on Elementary OS Latest, run the following commands:

sudo apt update
sudo apt install apache2 mysql-server php libapache2-mod-php php-mysql

During the installation, you will be prompted to set a root password for MySQL. Enter a secure password and remember it for later.

Once the installation is complete, start both Apache and MySQL services and enable them to start automatically on boot:

sudo systemctl start apache2
sudo systemctl start mysql
sudo systemctl enable apache2
sudo systemctl enable mysql

Step 2: Install PHP Extensions

Snipe IT requires specific PHP extensions to be installed. Run the following command to install them:

sudo apt install php-mbstring php-xml php-curl php-gd php-zip

Step 3: Download Snipe IT

Download the latest version of Snipe IT from the official website:

wget https://github.com/snipe/snipe-it/releases/download/v5.3.0/snipeit-5.3.0.zip

Next, extract the downloaded archive to the Apache document root directory:

sudo unzip snipeit-5.3.0.zip -d /var/www/html/

Step 4: Configure Snipe IT

Next, edit the .env file in the Snipe IT directory:

sudo nano /var/www/html/snipeit-5.3.0/.env

Find the following lines in the file:

DB_DATABASE=snipeit
DB_USERNAME=homestead
DB_PASSWORD=secret

Replace them with the following:

DB_DATABASE=snipeit
DB_USERNAME=root
DB_PASSWORD=<your_mysql_root_password>

Save and close the file.

Step 5: Set Permissions

Set Apache as the owner of the Snipe IT directory:

sudo chown -R www-data:www-data /var/www/html/snipeit-5.3.0/

Set the permissions on the storage and bootstrap/cache directories:

sudo chmod -R 775 /var/www/html/snipeit-5.3.0/storage
sudo chmod -R 775 /var/www/html/snipeit-5.3.0/bootstrap/cache

Step 6: Create a Virtual Host

Create a virtual host configuration file for Snipe IT:

sudo nano /etc/apache2/sites-available/snipeit.conf

Paste the following configuration into the file:

<VirtualHost *:80>
    ServerName your_domain_name_or_IP_address
    DocumentRoot /var/www/html/snipeit-5.3.0/public
    <Directory /var/www/html/snipeit-5.3.0/public>
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

Save and close the file.

Enable the virtual host:

sudo a2ensite snipeit.conf

Restart Apache:

sudo systemctl restart apache2

Step 7: Complete the Installation

Open a web browser and visit the address you set for your virtual host in Step 6. You will be redirected to the Snipe IT installation page. Follow the installation wizard and provide the required information.

Congratulations! You have successfully installed Snipe IT on Elementary OS Latest. You can now start using it to manage your company's IT assets.

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!

Alternatively, for the best virtual desktop, try Shells!