Composer website<\/a> to get the latest stable version.<\/p>\n\n\n\n# curl -sS https:\/\/getcomposer.org\/installer -o composer-setup.php\n# php composer-setup.php --install-dir=\/usr\/local\/bin --filename=composer<\/pre>\n\n\n\nTo check the Composer version, you can run the following command:<\/p>\n\n\n\n
# composer -V<\/pre>\n\n\n\nThe command above will print an output like this:<\/p>\n\n\n\n
Composer version 2.6.2 2023-09-03 14:09:15<\/pre>\n\n\n\nAs you can see, we have installed the more recent version of the composer<\/p>\n\n\n\n
<\/span>Step 4. Install MariaDB and Create a Database<\/span><\/h2>\n\n\n\nSnipe-IT is based on the Laravel 8 framework. Although Laravel supports MySQL\/MariaDB, PostgreSQL, SQLite, and MSSQL, Snipe-IT only supports MySQL\/MariaDB. In this step, we are going to install the MariaDB server from the default repository. To install the MariaDB server, execute this command:<\/p>\n\n\n\n
# apt install mariadb-server<\/pre>\n\n\n\nMariaDB has been successfully installed, and it is running; now we can proceed with creating a new database and a user for our Bagisto website.<\/p>\n\n\n\n
# mysql<\/pre>\n\n\n\nmysql> CREATE DATABASE snipeit;\nmysql> GRANT ALL ON snipeit.* TO snipeit@localhost identified by 'm0d1fyth15';\nmysql> FLUSH PRIVILEGES;\nmysql> \\q<\/pre>\n\n\n\nPlease ensure that you generate a more robust database password by substituting the existing password “m0d1fyth15” in the aforementioned command with a stronger one.<\/p>\n\n\n\n
<\/span>Step 5. Download Snipe-IT<\/span><\/h2>\n\n\n\nNavigate to your web server\u2019s root directory using the command below.<\/p>\n\n\n\n
# cd \/var\/www\/html<\/pre>\n\n\n\nThen, clone the Snipe-IT GitHub repository and save the contents in the snipe-it directory using the command below.<\/p>\n\n\n\n
# git clone https:\/\/github.com\/snipe\/snipe-it snipe-it<\/pre>\n\n\n\nIf the command returns an error about git, you need to install git first and then rerun the command.<\/p>\n\n\n\n
# apt install git -y<\/pre>\n\n\n\nNext, go to the Snipe-IT directory created using the command below.<\/p>\n\n\n\n
# cd snipe-it<\/pre>\n\n\n\nIn this directory, we need to copy the example .env.example configuration file to .env and modify the content.<\/p>\n\n\n\n
# cp .env.example .env<\/pre>\n\n\n\nOpen the config file using nano or another file editor and enter your database information we created in the previous step.<\/p>\n\n\n\n
# nano .env<\/pre>\n\n\n\nUnder basic app settings, enter your app URL and timezone e.g.<\/p>\n\n\n\n
APP_URL=http:\/\/snipeit.yourdomain.com
APP_TIMEZONE='America\/New_York'<\/pre>\n\n\n\nThen under database settings, enter your database credentials e.g.<\/p>\n\n\n\n
DB_DATABASE=snipeit
DB_USERNAME=snipeit
DB_PASSWORD=m0d1fyth15<\/pre>\n\n\n\nSave the file, then exit from the file editor.<\/p>\n\n\n\n
Set the ownership and permissions for the Snipe-IT data directory.<\/p>\n\n\n\n
# chown -R www-data: \/var\/www\/html\/snipe-it\n# chmod -R 755 \/var\/www\/html\/snipe-it<\/pre>\n\n\n\nNext, update Snipe-IT dependencies.<\/p>\n\n\n\n
# composer update --no-plugins --no-scripts<\/pre>\n\n\n\nAfter updating Composer, we need to install all application dependencies by executing the following command.<\/p>\n\n\n\n
# composer install --no-dev --prefer-source --no-plugins --no-scripts<\/pre>\n\n\n\nIn the \/var\/www\/snipe-it\/.env<\/strong> configuration file you created previously, generate the Laravel APP Key-value using the command below.<\/p>\n\n\n\n# php artisan key:generate<\/pre>\n\n\n\nthe command above will generate a key and write it as APP_KEY value in your .env file.<\/p>\n\n\n\n
Let’s proceed to the next step.<\/p>\n\n\n\n