Git Product home page Git Product logo

snipeit_iso's Introduction

Snipe-IT Custom ISO

Snipe-IT is the best open source web-based inventory system that I have ever used.

Spending some time on gitter and github, it was observed that most of the newcomers run into a few challenges when trying to get up and running with Snipe-IT

The goal of this project is to eliminate or limit this challenge by creating a customised ISO where Snipe-IT will be installed without the user having to get their hands dirty.

If you don't want the hassel of updates, upgrades and will like faster turnover to your issues, it is highly recommended that you use the hosted option provided by Snipe-IT


Project Goal

Configure an unattended installation of Snipe-IT using CentOS

The installation uses kickstart to automate the OS installation and run a modified version of snipeit.sh script. It also contains snipeit directory with all composer necessary downloads. After the OS installation, you will be forced to change all default credentials root, snipeit and mariaDB root password. The APP key will be generated, database will be migrated and you will then get the option to configure email notification, if you do not wish to configure email notification at this time, it can be done at anytime by executing /usr/sbin/local/snipeit_mail_setup.sh from the shell. This ensures that you can have Snipe-IT functional without an internet connection

Make the OS menu driven

  • Create a menu which will be activated after the user logs on
  • Split the menu in two parts, first part will consists of basic OS administration with option to go to the shell and the second part will help you to manage Snipe-IT, e.g. upgrades, clearing the cache, toggling debugging, etc.

OS and software versions

The version of OS and software are.

  • CentOS 7.5
  • PHP 7.2
  • Snipe-IT 4.6.5

This custom ISO includes both EPEL and IUS repository; therefore, upgrading the OS and Snipe-IT will be achieved by using the following commands.

  • yum -y upgrade
  • cd /var/www/html/snipeit/ && sudo -u apache php upgrade.php

To minimise the size of the OS, only the required packages were used, additional packages Perl and Python are included.

Additionally, a few changes were made from the standard behaviour from a vanilla CentOS, these are

  • Changes in firewalld default zone from public to drop
  • Restricting root access via ssh
  • SSH sessions automatically times out after 15 minutes of being inactive
  • Disable unused filesystems
  • Disable uncommon protocols
  • Harden SSH
  • Enforce password policy

Download OS

The ISO can be downloaded at Trinipino.org


Installation

Once you have downloaded the ISO mount it to your favourite virtualisation tool, e.g. Vmware, KVM, Virtual Box, etc.

The OS will be installed and configured for you, the server will reboot and perform a few post installation steps, when you are at the login prompt, you will receive the default creadentials, after you have successfully authenticated, the final script will be executed, this script will ensure that you change the default credentials

When default credentials are reset, the APP key (php artisan key:generate --force) will be generated, additionally, the database will be migrated (php artisan migrate --force). These are required for Snipe-IT; therefore, do not cancel this script for a few reasons

  • These important processes will not take place
  • You will be prompt each time to change the OS credentials (root and snipeit) and MariaDB root password.

Troubleshooting

During the initial relase of this custom ISO, the .env.sample was modified to remove duplicate BACKUP_ENV this was later updated by upstream. Since upstream pushes this via Git, the upgrade will fail; therefore you will need to do the following.

  • git stash
  • sudo -u apache php upgrade.php

If you are unable to stash that change, you will need to tell Git who you are; therefore, you will need to use the following commands.

  • git config user.email an_email_address
  • git config user.name "Your Name"

Then try stashing the changes and you will be able to perform the upgrade. This issue was resolved on 2 September; therefore, all downloads after this date will not experience this issue.

Tips

There are a few aliases for the snipeit user, you must be in the snipeit root directory /var/www/html/snipeit/. These aliases are.

  • snipe_home (change to snipeit home directory)
  • clear_config (clear Snipe-IT config)
  • clear_cache (clear Snipe-IT cache)
  • snipe_backup (create a Snipe-IT backup)
  • snipe_migrate (database migration)
  • snipe_upgrade (perform an upgrade)

There is also a script in /etc/cron.weekly/ that will run upgrade.php on a weekly basis. If you do not wish to have Snipe-IT upgraded weekly simply delete the below script from /etc/cron.weekly/

  • snipe_upgrade.sh

Snipe-IT Custom ISO Release

Version 2-8

  • Added self-signed SSL certificate

Version 2-9

  • Fix bug that was causing error code 500 from Apache

snipeit_iso's People

Contributors

earlramirez avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

snipeit_iso's Issues

Installation fails for vmware guests

After the OS boots and kickstart has been initiated, the following error is thrown
error populating transactions, anaconda is retrying
The installation then sits there.

Cant Install phpmyadmin

Hi, I cant Install phpmyadmin on fresh install snipeit using iso the error is

Error: php73-common conflicts with php72u-common-7.2.26-1.el7.ius.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

After that error i tried to install it by " yum install phpmyadmin --skip-broken "

after that there is new error

**Downloading packages:
warning: /var/cache/yum/x86_64/7/ius/packages/php72u-cli-7.2.26-1.el7.ius.x86_64.rpm: Header V4 RSA/SHA256 Signature, key ID 4b274df2: NOKEY
Retrieving key from file:///etc/pki/rpm-gpg/IUS-COMMUNITY-GPG-KEY

The GPG keys listed for the "IUS Community Packages for Enterprise Linux 7 - x86_64" repository are already installed but they are not correct for this package.
Check that the correct key URLs are configured for this repository.

Failing package is: php72u-cli-7.2.26-1.el7.ius.x86_64
GPG Keys are configured as: file:///etc/pki/rpm-gpg/IUS-COMMUNITY-GPG-KEY**

can you please help me?

HTTP ERROR 500

Hi there, thanks for making this first of all!

Everything went smoothly with the install, it was working perfectly. However after 1-2h every time, the Snipe-IT page under the IP address starts giving a "Page not found, HTTP ERROR 500". I created another VM with another IP as well and tried a fresh install, same result. Worked just fine for 2h then the same error. These VMs are accessible via SSH and everything seems to be fine. Any ideas what might be causing it?

Need to disable https,

I need to know how to completely disable https on my Snipe IT instance. I don't need https enable as it will be running on a closed internal network. I want to be able to access SNIPE IT with http instead.

Change IP Address

Hi

the problem is there're no chance to let me input the IP address I want, how can I change the IP Address during the installation?
If DHCP available in the network, Snipe-IT will get an random IP, if it don't, http:// IP is blank, so, that's the point! Thanks.

Brian

Update to 5.0+?

First of thanks for your work on this, really simplified things as I was having issues on both the Docker and hard installs before.

I noticed that the update past 4.95 would cause things to stop working, I removed the cron update and it keeps working now, I was wondering if there was a chance to have this updated to either be able to upgrade past that on existing, or even if needed I would rather re-install and transfer things over.. just to stay current...

Thanks again for your work, very much appreciated.

No composer cache file exists

During the upgrade, the following error is thrown.

Step 5: Updating composer dependencies:
(This may take an moment.)

-- Local composer.phar detected, so we'll use that.

Cannot create cache directory /usr/share/httpd/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /usr/share/httpd/.composer/cache/files/, or directory is not writable. Proceeding without cache
Generating optimized autoload files
Cannot create cache directory /usr/share/httpd/.composer/cache/repo/https---packagist.org/, or directory is not writable. Proceeding without cache
Cannot create cache directory /usr/share/httpd/.composer/cache/files/, or directory is not writable. Proceeding without cache

Need to create the .composer directory and grant the user permission.

Preflight Check

The preflight check fails for /var/www/html/snipeit/.env

Need to correct the permission and change the SELinux label for the directory.

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.