Snipe IT is an open-source asset management software that helps you manage your organization's assets, their location, and their condition. In this tutorial, we will discuss how to install Snipe IT on Debian latest version.
Before starting with the installation, make sure that you have the following prerequisites:
The first step is to install required dependencies for Snipe IT. Run the following command to update the package manager:
sudo apt update
Then, install the required dependencies by running the following command:
sudo apt install git curl libpng-dev libpq-dev build-essential libfreetype6-dev libjpeg-dev libzip-dev libssl-dev libmcrypt-dev libonig-dev libcurl4-openssl-dev
Snipe IT requires a web server to run. In this tutorial, we will use the Apache web server to serve Snipe IT. Run the following command to install Apache web server:
sudo apt install apache2
Once the installation is completed, you need to enable Apache and start the service by running the following commands:
sudo systemctl enable apache2
sudo systemctl start apache2
Next, you need to install PHP and PHP extensions required by Snipe IT. Run the following command to add the PHP repository:
sudo apt install lsb-release apt-transport-https ca-certificates -y
sudo wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php.list
Then, run the following command to update the package manager:
sudo apt update
Finally, install PHP and required extensions by running the following command:
sudo apt install php8.0 libapache2-mod-php8.0 php8.0-common php8.0-cli php8.0-curl php8.0-json php8.0-mbstring php8.0-mysql php8.0-xml php8.0-zip
After installing the required dependencies, you can now install Snipe IT. Run the following command to clone the Snipe IT repository:
sudo git clone https://github.com/snipe/snipe-it.git /var/www/html/snipe-it
Once the cloning is completed, navigate to the snipe-it directory and copy the .env.example to .env file:
cd /var/www/html/snipe-it
sudo cp .env.example .env
Update the .env file with your database credentials:
DB_HOST=localhost
DB_DATABASE=snipeit
DB_USERNAME=your_database_username
DB_PASSWORD=your_database_password
Next, install composer by running the following command:
sudo curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
Then, run the following command to install the required dependencies:
sudo composer install --no-dev --prefer-source
Once the installation is completed, run the following command to generate an application key:
sudo php artisan key:generate
Finally, run the following command to set the correct permissions for the Snipe IT installation:
sudo chown -R www-data:www-data /var/www/html/snipe-it
sudo chmod -R 755 /var/www/html/snipe-it
The final step is to configure Apache web server for Snipe IT. Open the default Apache configuration file using a text editor:
sudo nano /etc/apache2/sites-available/000-default.conf
Add the following lines to the configuration file:
ServerName your_ip_address
DocumentRoot /var/www/html/snipe-it/public
<Directory /var/www/html/snipe-it/public>
AllowOverride All
Order allow,deny
Allow from all
Require all granted
</Directory>
Save and exit the file. Then, restart the Apache web server by running the following command:
sudo systemctl restart apache2
The installation of Snipe IT is now completed. You can now access the Snipe IT web interface by navigating to the following URL in your web browser:
http://your_ip_address
Where "your_ip_address" is the IP address of your server. You will see the Snipe IT login page. Use the default username "admin" and password "admin" to log in to the web interface for the first time.
Congratulations! You have successfully installed Snipe IT on Debian latest version. You can now start managing your organization's assets using Snipe IT.
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!