12. Next, configure the snipe-it environment, here you’ll provide the database connection settings and many more.
First open the .env file.
Then Find and change the following variables according to instructions given.
Save and close the file.
13. Now you need to set the appropriate permissions on certain directories as follows.
$ sudo chmod -R 755 storage
$ sudo chmod -R 755 public/uploads
$sudo chown -R apache:apache storage public/uploads
14. Next, install all the dependencies required by PHP using Composer dependency manager as follows.
$ sudo composer install --no-dev –prefer-source
15. Now you can generate the “APP_KEY” value with the following command (this will be set automatically in the .env file).
$ sudo php artisan key:generate
16. Now, you need to create a virtual host file on the web server for Snipe-IT.
$ sudo vi /etc/httpd/conf.d/snipeit.example.com.conf
Then add/modify the line below in your Apache config file (use your server IP address here).
<VirtualHost 192.168.1.2:80>
ServerName 192.168.1.2
DocumentRoot /var/www/snipe-it/public
<Directory /var/www/snipe-it/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
Save and close the file.
17. Lastly, restart Apache web server to take new changes into effect.
$ sudo systemctl restart httpd
18. Now open your web browser and enter the URL: http://192.168.1.2 to view the Snipe-IT web installation interface.
First you will see the Pre-Flight Check page below, click Next: Create Database Tables.