How to Install Snipe IT asset management on Ubuntu

How to Install Snipe IT asset management on Ubuntu

In large IT environment, hell in any IT setup, keeping track of where your assets is vital. There’s a wealth of great asset management tools out there – including apps like Wasp Asset Management or the specialist School Asset Manager – but if you are after an open source solution then Snipe is definitely the one to look at.

Like any open source tool it can take some tweaking but what you get is a decent asset management tool that supports checkin and checkout receipts, custom fields, reporting, QR codes and much more. To make things easier here’s a belt and braces guide to getting it up and working. We’ll be using Ubuntu 14 Server LTS configured for a standard LAMP implementation – just choose LAMP from the list of installation options during the setup of Ubuntu – but Snipe also supports Windows with WAMP and IIS support but I found it waayyyyyyyyyy easier to get running in Linux.

  1. Download the handy Snipe install script to your home directory.
    wget https://raw.githubusercontent.com/snipe/snipe-it/master/install.sh
  2. Make it executable.
    chmod 744 install.sh ./install.sh
  3.  Run the install script.
    ./install.sh
  4. Once the installer has run through it’s paces, and asked you a series of questions, you will have a working Snipe installation. Congratulations. Now to a few tweaks.
  5. Copy the example app.php file to a new file.
    sudo vi /var/www/snipeit/app/config/production/app.example.php
  6. Change the following lines to ensure that your server is working. If you want to enable HTTPS via an SSL cert then feel free to skip this step and have a google as to how to use OpenSSL to do that.Change…
    'url' => 'https://myhostname',
    for…
    'url' => 'http://myhostname',
  7. Change the following lines to ensure that email addresses user imports are handled nicely. If you won’t be doing any imports feel free to skip this step but it’s good practice to update this.Change…
    'domain' => '',
    for…
    'domain' => 'http://myhostname.co.uk',

Sending mail

You’ll be wanting to make use of email in order to support the check-in and check-out receipts. Snipe supports SMTP and Sendmail. I couldn’t get its SMTP implementation working for love nor money but, whilst I’m no lover of Sendmail, I did get Sendmail working.

We use Exchange here as our local mail server so we only needed Sendmail to send emails out via Exchange as a smart relay. A very simple implementation. If you need something more, have a quick google.

  1. Install sendmail on Ubuntu.
    sudo apt-get install sendmail
  2. Edit the sendmail.mc and configure your smart relay host.
    sudo vi /etc/mail/sendmail.mc
  3. At the bottom of the file add the following line and save and exit.
    define('SMART_HOST','exchange.mydomain.co.uk')
  4. Update Sendmail with the new configuration. Run sendmailconfig and just keep pressing Y for yes.
    sudo sendmailconfig
  5. Now it’s time to edit the Snipe config file and enter the new settings. Copy the example mail configuration file.
    sudo cp /var/www/snipeit/app/config/production/mail.example.php /var/www/snipeit/app/config/production/mail.php
  6. Edit the file and make the changes.
    sudo vi /var/www/snipeit/app/config/production/mail.php
  7. Change the following lines to enable sendmail use.  On a normal install you shouldn’t have to change the location of Sendmail but, if you do need to, you can also look at sendmail location parameter at the end of the mail.php file.Change…
    'driver' => 'smtp',
    for…
    'driver' => 'sendmail',
  8. Now when you are adding your Asset Categories in Snipe you can tick the box to send check-in emails and the user will receive them.snipe_email

Configuring LDAP

If you are an organisation of any decent size then adding your users will be a real effort. It’s much easier to look at importing via LDAP direct from your Active Directory servers.

  1. Create a user in Active Directory for the LDAP settings to connect with. This doesn’t have to be an administrator, just a normal user. However make sure that they have a good secure password, and you might want to secure the account and prevent external logons and the like. I’ll leave that to you.
  2. Log in to Snipe using your admin logon created during the install process. Click on the Admin menu then choose Settings.Snipe Settings
  3. You’ll need to configure the LDAP settings for your own environment but here are my settings. The “LDAP Bind Username” parameter points to the username of your LDAP user that you created before. The “Base Bind DN” is the location in your directory where your users reside. You might want to specify the root, or you might want to target a specific OU.
    Click to enlarge

    Click to enlarge

  4. Make sure you have a Location created in Snipe. Go to Admin > Locations and click Create New.
  5. Now go to the Peoples section of Snipe and click the LDAP Import button. Choose which location to import those users to and hit import.
    LDAPImport

Author

Oliver works as Head of Sales at a leading provider of IT services to the education sector. Out of hours he's a runner with a limp, has a board game addiction and a owns a dog that looks like a badger.
Show Buttons
Hide Buttons

Before you go...

or
Subscribe to my newsletter

If you enjoyed this article then why not let me know.