Learn how to install Snipe-IT on Linux Ubuntu 22.04 LTS
![](https://billysoftacademy.com/wp-content/uploads/2024/05/Learn-how-to-install-Snipe-IT-on-Linux-Ubuntu-22.04-LTS-1024x576.png)
Introduction
Requirements
1) Linux Ubuntu 22.04 LTS or newer
2) A computer with 4GB RAM, a dual core processor and 50GB of free disk space
3) An SSH client such as SolarPuTTY or PuTTy
4) A fully qualified domain name
5) A public static IP address.
Overview
The following is an overview of the steps to take to complete the installation:
1) Download and install the LEMP stack.
2) Create a MySQL database and install Snipe-IT.
3) Create a VirtualHost and access the Snipe-IT Web Admin dashboard.
4) Conclusion and next steps.
Step 1: Download and install the LEMP stack
To install Snipe-IT, you need to set up a LEMP (Linux, NGINX, MySQL, PHP) stack. Here are the detailed steps to install the required packages:
1. First, update the package list by running the following command:`
apt update -y
2. After that, you need to install the necessary packages by running the following command:
apt install nginx mariadb-server php-bcmath php-common php-ctype php-curl php-fileinfo php-fpm php-gd php-iconv php-intl php-mbstring php-mysql php-soap php-xml php-xsl php-zip git -y
This command installs all the required packages, including NGINX, MariaDB, PHP, and other dependencies.
3. Once you’ve installed the packages, run the following command to install PHP Composer:
apt install composer -y
After successful installation of PHP Composer, you can proceed to the next step.
Step 2: Create a MySQL database and install Snipe-IT
mysql -u root -pAfter connecting, create a database and user with the following commands:
mysql> CREATE DATABASE snipeit;Once done, flush the privileges and exit from the MySQL shell by running the following commands:
mysql> GRANT ALL ON snipeit.* TO snipeit@localhost identified by 'password';
mysql> FLUSH PRIVILEGES;Next, navigate to the NGINX web root directory by running the command:
mysql> \q
cd /var/www/htmlDownload the latest version of Snipe-IT using the following command:
git clone https://github.com/snipe/snipe-itThen, move to the Snipe-IT directory and copy the sample environment file as follows:
cd snipe-it cp .env.example .envNext, edit the environment file using the command
nano .envand define your app URL, database, and other information like this:
APP_URL=http://snipeit.example.comSave and close the file, then set proper permissions and ownership by running the following commands:
APP_TIMEZONE='UTC'
DB_DATABASE=snipeit
DB_USERNAME=snipeit
DB_PASSWORD=password
chown -R www-data: /var/www/html/snipe-it chmod -R 755 /var/www/html/snipe-itAfter that, update and install plugins and other required dependencies with the following commands:
composer update --no-plugins --no-scripts composer install --no-dev --prefer-source --no-plugins --no-scriptsFinally, generate the artisan key using the following command:
php artisan key:generateYou will see an output like this:
**************************************
* Application In Production! *
**************************************
Do you really wish to run this command? (yes/no) [no]: > yes
Step 3: Create a VirtualHost and access the Snipe-IT Web Admin dashboard.
server { listen 80; server_name snipeit.example.com; root /var/www/html/snipe-it/public; index index.php; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { include fastcgi.conf; include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php8.1-fpm.sock; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } }3. Save the file and then edit the NGINX main configuration file /etc/nginx/nginx.conf. 4. Add the following line after the line “http {“:
server_names_hash_bucket_size 64;5. Save the file and then restart Nginx service to apply the changes using the command:
systemctl restart nginxTo access the Snipe-IT Web Interface, follow these steps:
1. Open your web browser and access the Snipe-IT web interface using the URL http://snipeit.example.com.
2. You will see the pre-flight check page. Ensure all required dependencies are installed and click the “Next: Create Database Table” button.
3. On the next page, click the “Next: Create User” button.
4. Define your site name, email, user, and password on the following page and click the “Next: Save User” button.
5. You will see the Snipe-IT dashboard.
Conclusion and next steps
By following this guide, you have successfully installed Snipe-IT on your Ubuntu 22.04 LTS server. You can now access the Snipe-IT web interface and begin managing your IT assets. Here are some next steps to consider:
1) Familiarize yourself with the various features offered by Snipe-IT, such as asset tracking, license management, and reporting.
2) Snipe-IT offers a variety of customization options. You can customize fields, workflows, and branding to fit your specific needs.
3) Grant access to Snipe-IT to your team members and assign appropriate permissions based on their roles.
4) If you have existing asset data, you can import it into Snipe-IT to save time and effort.
For further information and assistance, refer to the official Snipe-IT documentation. Please also check the home page for more helpful guides and tutorials.
Thank you for reading!