This commit is contained in:
snipe
2016-03-15 20:53:58 -07:00
parent d84479d9fc
commit 59c203b6ae
35 changed files with 2026 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
---
currentMenu: home
---
# Snipe-IT Installation Guide
Snipe-IT is a Free Open Source (FOSS) project for IT asset management, to enable IT departments to track who has which laptop, when it was purchased, which software licenses and accessories are available, and so on.
It is built on [Laravel 4.2](http://laravel.com) and uses the [Sentry 2](https://github.com/cartalyst/sentry) package.
This project is actively developed and we [release quite frequently](https://github.com/snipe/snipe-it/releases). __Check out the [Snipe-IT website](http://www.snipeitapp.com) for a demo, a comprehensive list of features, screenshots and [our blog](http://snipeitapp.com/news/) for updates on new versions.__
__This is web-based software__. This means there there is no executable file (aka no .exe files), and it must be run on a web server and accessed through a web browser. It runs on any flavor of Linux or OSX as well as Windows.
-----
<center>
<span style="font-size: 200%; font-weight: bold;">We </span>
<i class="fa fa-heart fa-3x heart pulse2" style="padding: 10px;"></i> <i class="fa fa-linux fa-3x" style="padding: 10px;"></i> <i class="fa fa-plus fa-2x" style="padding: 10px;"></i> <i class="fa fa-windows fa-3x" style="padding: 10px;"></i> <i class="fa fa-plus fa-2x" style="padding: 10px;"></i> <i class="fa fa-apple fa-3x" style="padding: 10px;"></i>
</center>
-----
### Bug Reports & Feature Requests
Feel free to check out the [GitHub Issues for this project](https://github.com/snipe/snipe-it/issues) to open a bug report or see what open issues you can help with. Please search through existing issues (open and closed) to see if your question hasn't already been answered before opening a new issue.
We use Waffle.io to help better communicate our roadmap with users. Our [project page there](http://waffle.io/snipe/snipe-it) will show you the backlog, what's ready to be worked on, what's in progress, and what's completed.
[![Stories in Ready](https://badge.waffle.io/snipe/snipe-it.png?label=ready+for+dev&title=Ready+for+development)](http://waffle.io/snipe/snipe-it)
-----
### Announcement List
To be notified of important news (such as new releases, security advisories, etc), [sign up for our list](http://eepurl.com/XyZKz). We'll never sell or give away your info, and we'll only email you when it's important.
+176
View File
@@ -0,0 +1,176 @@
---
currentMenu: common-issues
---
# Common Issues
<div id="generated-toc" class="generate_from_h2"></div>
While installation should be pretty simple, here are some of the more common questions/issues people have.
-----
## The requested URL /auth/signin was not found on this server
Chances are that `mod_rewrite` is either not installed on your system, or has not been configured correctly for your virtualhost using AllowOverride.
__Troubleshooting:__
Add garbage text into the `public/.htaccess` file on your local install and hit the homepage again. If it bombs out (it should), then mod_rewrite is probably working. If it doesn't, it means your webserver isn't even looking for the .htaccess rules and you'll need to check your virtualhost config.
(Make sure to take the garbage out of the .htaccess file once you've gotten it sorted!)
-----
## PHP Warning: require(/var/www/html/snipeit/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory
When you see this error, it means that you either forgot to install or run composer, or you did and it failed somewhere and didn't complete, so the dependencies Snipe-IT needs were not installed. See the docs on <a href="installation/composer.html">installing and running composer</a>, and check for any errors composer might return when you attempt to run `composer install`.
Once your composer errors are resolved, you can <a href="installation/command-line.html">continue with the installation</a>.
-----
## Error message: mcrypt_encrypt(): Size of key is too large for this algorithm
In `app/config/production/app.php`, find the `key` on line 56.
You can run
```
php artisan key:generate
```
to auto-generate a 32-character key for you. Paste the generated key in as the value of `key` in your config (within single quotes):
```
'key' => '36VpJ9xE3WyPQu4GYgckF82hRh9AVjYM',
```
-----
## Error message: mcrypt_encrypt(): Key size not supported by this algorithm. Only keys of sizes 16, 24 or 32 supported.
In `app/config/production/app.php`, find the `key` on line 56.
You can run
```
php artisan key:generate
```
to auto-generate a 32-character key for you. Paste the generated key in as the value of `key` in your config (within single quotes):
```
'key' => '36VpJ9xE3WyPQu4GYgckF82hRh9AVjYM',
```
-----
## During install or running migrations - SQLSTATE[HY000]: General error: 1005 Can't create table 'snipeit.#sql-3626_1c6' (errno: 150)
This happens when your default table engine is set to MyISAM (which in general is weird. InnoDB has been the default table engine in MySQL for quite some time).
If you see this error:
```
Illuminate\Database\QueryException]
SQLSTATE[HY000]: General error: 1005 Can't create table 'snipeit.#sql-3626_1c6' (errno: 150) (SQL: alter table users add constraint users_company
_id_foreign foreign key (company_id) references companies (id))
[PDOException]
SQLSTATE[HY000]: General error: 1005 Can't create table 'snipeit.#sql-3626_1c6' (errno: 150)
```
Try running:
```
ALTER TABLE companies ENGINE = InnoDB;
```
on your MySQL database and then re-run migrations.
-----
## Call to undefined function Controllers\Admin\ldap_connect()
The PHP LDAP extension is not installed on your server. While this extension is not required for all Snipe-IT installations, it must be installed if you wish to use any of the LDAP functionality.
-----
## White page with error: Error in exception handler.
Make sure you've changed the permissions on the `app/storage` directory and all of the directories within to be writable by the web server.
-----
## Database [] not configured
This happens when you think you're running the app in a different environment than your app thinks it's running in. The most common reason for this is you either forgot to edit `bootstrap/start.php` to include your hostname in whichever environment you want to run it as, or the hostname you entered there is incorrect.
Snipe-IT will always default to production if it can't figure out what mode to run in.
To find your hostname, type `hostname` in a terminal prompt and copy the output to whichever of the environments in `bootstrap/start.php` that you want to run it in. The app examines this array, and if it finds a hostname there that matches the actual hostname, that's the environment it will run in.
Alternatively, you can try just copying your config files over into `app/config/production` and just letting it default to production if you don't plan on doing any code development.
-----
## FatalErrorException. Syntax error, unexpected '[', expecting ')'
The version of PHP you're using is too old to run Snipe-IT, which [requires](requirements.html) PHP 5.4 or later.
After upgrading PHP, you should also delete the contents of the cached views in `app/storage/views` once you upgrade PHP, to resolve any cached issues.
-----
## Error message: Error Output: PHP Fatal error: Call to undefined method IlluminateFoundationApplication::registerCoreContainerAliases() in ../src/Illuminate/Foundation/start.php on line 106
Remove `bootstrap/compiled.php` and your vendors dir, and try running `php composer.phar update`.
-----
## Image Source not readable
This usually means that the temporary directory is not writable by the web server. Check the permissions section of the documentation for your server OS and make sure you've granted the user the ability to write to the temp directory.
-----
## While running composer: intervention/image dev-master requires ext-fileinfo * -> the requested PHP extension fileinfo is missing or not enabled on your system.
As the error states, your server is missing the `fileinfo` extension, which is one of the requirements for running Snipe-IT.
Windows users must include the bundled `php_fileinfo.dll `DLL file in `php.ini` to enable this extension. To enable Fileinfo, add or uncomment this line in your php.ini:
```
extension=php_fileinfo.dll
```
and restart the web server.
Linux users need to add or uncomment the following in their `php.ini`:
```
extension=fileinfo.so
```
and restart the web server.
-----
## During composer install, it's asking me for my Github credentials
This is an artifact of Github having a very low API rate limit for unauthenticated accounts. Make sure you're using the `--prefer-source` flag when doing your composer installs and updates.
-----
## Call to undefined method IlluminateCookieCookieJar::get()
If you're using Snipe-IT 1.2.6 or earlier, grab the latest off of the develop branch and run `php composer install`, or edit your composer.json to use Sentry 2.1.* and then run `php composer update`.
-----
## PHP Fatal error: Class 'Patchwork\Utf8\Bootup' not found in \bootstrap\autoload.php on line 43
This happens sometimes with composer, though we don't really know why, as it's not specific to Snipe-IT. If you run into this error after running `php composer.phar install --no-dev --prefer-source`, try the following:
- delete your `composer.lock` file
- run `php composer.phar dump-autoload`
- run `php composer.phar update --no-dev --prefer-source`
+83
View File
@@ -0,0 +1,83 @@
---
currentMenu: contributing
---
# Contribution Guidelines
<div id="generated-toc" class="generate_from_h2"></div>
**Before opening an issue to report a bug or request help, make sure you've checked the [Common Issues](common-issues.html) and [Getting Help](getting-help.html) pages.**
## Developing on Snipe-IT
Please submit all pull requests to the [snipe/snipe-it](http://github.com/snipe/snipe-it) repository in the `develop` branch!
**As you're working on bug-fixes or features, please break them out into their own feature branches and open the pull request against your feature branch**. It makes it _much_ easier to decipher down the road, as you open multiple pull requests over time, and makes it much easier for us to approve pull requests quickly.
If you don't have a feature in mind, but would like to contribute back to the project, check out the [open issues](https://github.com/snipe/snipe-it/issues?state=open) and see if there are any you can tackle.
If you have a feature in mind that hasn't been asked for in Github Issues, please open an issue so that we can discuss how it should work so that it will benefit the entire community.
We use Waffle.io to help better communicate our roadmap with users. Our [project page there](http://waffle.io/snipe/snipe-it) will show you the backlog, what's ready to be worked on, what's in progress, and what's completed. Issues that have been approved by the project maintainer are labeled "ready for dev".
[![Stories in Ready](https://badge.waffle.io/snipe/snipe-it.png?label=ready+for+dev&title=Ready+for+Development)](http://waffle.io/snipe/snipe-it)
The labels we use in GitHub Issues and Waffle.io indicate also whether we've confirmed an issue as a bug, whether we're considering the issue as a potential feature, and whether it's ready for someone to work on it. We also provide labels such as "n00b", "intermediate" and "advanced" for the experience level we think it requires for contributors who want to help.
-----
## Setting Up a Dev Installation
The only real difference in setting Snipe-IT up for local development versus setting it up for production usage is the configuration files, and remembering to add the local environment flag on the artisan commands.
Youll notice in your `app/config directory`, you have directories such as `local`, `staging`, and `production`. (The `testing` directory is reserved for unit tests, so dont mess with that one.)
Youll want to make sure you have the configuration files updated for whichever environment youre in, which will most likely be `local`.
If your development, staging and production sites all run on the same server (which is generally a terrible idea), see [this example](http://words.weareloring.com/development/setting-up-multiple-environments-in-laravel-4-1/) of how to configure the app using environmental variables.
If you run the command line tools without the local flag, it will default to the production environment, so youll want to make sure you run the commands as:
```
php artisan key:generate --env=local
php artisan app:install --env=local
```
-----
## Set up the debugbar
In dev mode, we use the fabulous [Laravel Debugbar](https://github.com/barryvdh/laravel-debugbar) by [barryvdh](https://github.com/barryvdh).
The profiler is enabled by default if you have `debug` set to `true` in your `app.php`. You certainly dont have to use it, but its pretty handy for troubleshooting queries, seeing how much memory your pages are using, making sure your code isn't introducing n+1 queries, etc.
-----
## Database Considerations
Always make sure you're eager loading queries where possible, to avoid "N+1 query" issues with large data sets. The debugbar at the bottom of your development installation will show you the number of queries you're executing, which should alert you to any issues.
-----
## Purging the autoloader
If youre doing any development on this, make sure you purge the auto-loader if you see any errors stating the new model you created cant be found, etc, otherwise your new models wont be grokked.
```
php composer.phar dump-autoload
```
-----
## Localization Support
When developing on Snipe-IT, please always use language strings (`@lang('path/to/file.string')` in blades, `Lang::get('path/to/file.string')` in controllers) instead of regular text on any user-facing text, so that we can easily extend your changes out to the translation community.
You do not need to provide translated strings for all of the languages we support, only English (`app/lang/en`). We use CrowdIn for translation management by native speakers, so you only need to provide English strings. More info on translations [available here](translations.html).
-----
## Contributor Code of Conduct
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. [See the source on Github](https://github.com/snipe/snipe-it) to read the current version of the Code of Conduct.
+154
View File
@@ -0,0 +1,154 @@
template:
# Name of the directory containing the website template (default is "website")
directory: website
# Or if you are using a remote template, you can set the Git URL
#url: https://github.com/snipe/Template-ReadTheDocs.git
# List of directories to exclude from the processing (default contains "vendor" and "website")
# Paths are relative to the repository root
exclude:
- vendor
- app
- public
- website
- public
- .DS_STORE
# Any variable you put in this file is also available in the Twig layouts:
title: Snipe-IT Documentation
# The left menu bar
menu:
sections:
introduction:
name:
items:
home:
text: Introduction
relativeUrl: index.html
requirements:
text: Requirements
relativeUrl: requirements.html
security:
text: Security
relativeUrl: security.html
installation:
name: '<i class="fa fa-cog"></i> Installation'
items:
overview:
text: Overview
relativeUrl: installation/index.html
downloading:
text: 1. Downloading
relativeUrl: installation/downloading.html
configuration:
text: 2. Configuration
relativeUrl: installation/configuration.html
composer:
text: 3. Install Dependencies
relativeUrl: installation/composer.html
command-line:
text: 4. The CLI Installer
relativeUrl: installation/command-line.html
server:
text: 5. Server Configuration
relativeUrl: installation/server/index.html
linux-osx:
text: "<span class='subnav-indent'><i class='fa fa-caret-right'></i> Linux/OSX</span>"
relativeUrl: installation/server/linux-osx.html
windows:
text: "<span class='subnav-indent'><i class='fa fa-caret-right'></i> Windows</span>"
relativeUrl: installation/server/windows.html
wamp:
text: "<span class='subnav-indent'><i class='fa fa-caret-right'></i> WAMP</span>"
relativeUrl: installation/server/wamp.html
xampp:
text: "<span class='subnav-indent'><i class='fa fa-caret-right'></i> XAMPP</span>"
relativeUrl: installation/server/xampp.html
docker:
text: "<span class='subnav-indent'><i class='fa fa-caret-right'></i> Docker</span>"
relativeUrl: installation/server/docker.html
subdirectory:
text: "Subdirectories"
relativeUrl: installation/subdirectory.html
proxy:
text: "Using a Reverse Proxy"
relativeUrl: installation/proxy.html
manually-editing-data:
text: "Manually Editing Data"
relativeUrl: installation/manually-editing-data.html
upgrading:
text: Upgrading
relativeUrl: upgrading.html
contributing:
text: Contributing
relativeUrl: contributing.html
translations:
text: Translations
relativeUrl: translations.html
help:
name: "<i class='fa fa-life-ring'></i> Help"
items:
common-issues:
text: Common Issues
relativeUrl: common-issues.html
getting-help:
text: "Getting Help"
relativeUrl: getting-help.html
manual:
name: "<i class='fa fa-book'></i> User's Manual"
items:
manual-home:
text: Basic Concepts
relativeUrl: manual/index.html
user-management:
text: "LDAP / User Management"
relativeUrl: manual/user-management/index.html
importing-assets:
text: "Importing Assets"
relativeUrl: manual/importing-assets.html
importing-licenses:
text: "Importing Licenses"
relativeUrl: manual/importing-licenses.html
alerts:
text: "Configuring Alerts"
relativeUrl: manual/alerts.html
labels:
text: "Generating Labels"
relativeUrl: manual/labels.html
backups:
text: "Backups"
relativeUrl: manual/backups.html
custom-fields:
text: Custom Fields and Fieldsets
relativeUrl: manual/custom-fields.html
misc:
name:
items:
license:
text: License
relativeUrl: license.html
website:
text: Main Website
absoluteUrl: http://snipeitapp.com
# Base URL of the published website (no "/" at the end!)
# You are advised to set and use this variable to write your links in the HTML layouts
baseUrl: http://docs.snipeitapp.com
# Used to link to the GitHub project
github:
user: snipe
repo: snipe-it
+41
View File
@@ -0,0 +1,41 @@
# Developing & Contributing
<div id="generated-toc"></div>
Please be sure to see the [contributing guidelines](https://github.com/snipe/snipe-it/blob/develop/CONTRIBUTING.md) before submitting pull requests.
The only real difference in setting Snipe-IT up for local development versus setting it up for production usage is the configuration files, and remembering to add the local environment flag on the artisan commands.
You'll notice in your `app/config` directory, you have directories such as `local`, `staging`, and `production`. (The `testing` directory is reserved for unit tests, so don't mess with that one.)
You'll want to make sure you have the configuration files updated for whichever environment you're in, which will most likely be `local`.
If you run the command line tools without the local flag, it will default to the production environment, so you'll want to make sure you run the commands as:
php artisan key:generate --env=local
php artisan app:install --env=local
### Set up the debugbar
In dev mode, I use the fabulous [Laravel Debugbar](https://github.com/barryvdh/laravel-debugbar) by [barryvdh](https://github.com/barryvdh). After you've installed/updated composer, you'll need to publish the assets for the debugbar:
php artisan debugbar:publish
The profiler is enabled by default if you have debug set to true in your app.php. You certainly don't have to use it, but it's pretty handy for troubleshooting queries, seeing how much memory your pages are using, etc.
-----
### Purging the autoloader
If you're doing any development on this, make sure you purge the auto-loader if you see any errors stating the new model you created can't be found, etc, otherwise your new models won't be grokked.
php composer.phar dump-autoload
-----
### Translations
You do not need to provide translated strings for all of the languages we support, only English (`app/lang/en`). We use CrowdIn for translation management by native speakers, so you only need to provide English strings. More info on translation is [available here](../translations.html).
-----
+42
View File
@@ -0,0 +1,42 @@
---
currentMenu: getting-help
---
# Getting Help
If you're having trouble setting up Snipe-IT, don't worry!
__First__, check the [common issues page](common-issues.html) to make sure your problem hasn't already been addressed. We update that page frequently as requests come in.
If you can't find your issue there, simply post a new issue in the [Github Issues for Snipe-IT](https://github.com/snipe/snipe-it/issues), or ask in the [Snipe-IT Gitter chat room](https://gitter.im/snipe/snipe-it?utm_source=share-link&utm_medium=link&utm_campaign=share-link) and we'll try to get you sorted out.
Before posting an issue, please read the following so we can help you as quickly and efficiently as possible.
### Enable debug mode
In your `app/config/production/app.php`, set `debug` to true. You'll switch this back to false once we're done debugging your issue, but this will turn on verbose errors on the screen and will help you see what's breaking.
__If you get an "Oops!" or "Whoops!" message in the browser when you hit a specific page, that means debug is set to `false`.__ Set it to `true`, and reload for detailed errors.
### Enable your browser's error console
Sometimes errors reported by your browser can lend clue as to what's going on. [Enable your browser's error console](http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers) to see any client-side errors that may be causing issues.
### Posting an issue to Github or Gitter
When posting a new issue, please be SURE to include the following:
- Version of Snipe-IT you're running. (If you didn't grab an official release, let us know which branch you pulled from.)
- What OS and web server you're running Snipe-IT on
- What method you used to install Snipe-IT (`install.sh`, manual installation, docker, etc)
- If you're getting an error in your browser, include that error.
- What specific Snipe-IT page you're on, and what specific element you're interacting with to trigger the error
- If a stacktrace is provided in the error, include that too.
- Any errors that appear in your browser's error console.
- Confirm whether the error is reproduceable [on the demo](https://snipeitapp.com/demo).
- Include any additional information you can find in `app/storage/logs` and your webserver's logs.
- Include what you've done so far in the installation, and if you got any error messages along the way.
- Indicate whether or not you've manually edited any data directly in the database
#### It will be nearly impossible for us to help you without this info, so please try to be sure to include it with every help request so that we can try to get your problem sorted quickly.
**__Please do not email for installation support. Github Issues allows us to share solutions so that other people can learn from them, which gives the community the most benefit.__**
+13
View File
@@ -0,0 +1,13 @@
---
currentMenu: overview
---
# Installation Overview
The installation instructions provided here are for a production installation of Snipe-IT. If you are a developer looking to contribute to Snipe-IT, please see the [Contributing](/contributing.html) page.
Once you have [downloaded Snipe-IT](downloading.html), you'll need to complete all of the steps in the installation section, in addition to configuring your server. That means you will now create an empty MySQL/MariaDB database, [customize your configuration files](configuration.html), [install the dependencies with composer](composer.html), and run the [command line utility](command-line.html), and then configure your web server.
Installation should take around twenty minutes or less, if nothing goes wrong, and if you're pretty familiar with web server configuration.
If this all looks too overwhelming for you, we do offer [affordable hosted solutions](http://snipeitapp.com/hosting/) for folks who want to use Snipe-IT but don't know how to run a web server, or don't have time to keep up with updates.
+53
View File
@@ -0,0 +1,53 @@
---
currentMenu: command-line
---
# Using the CLI Installer
At this point you should have an *empty* database created, and all of your configuration settings set up the way you want them by carefully following the [configuration documentation](/installation/configuration.html) and editing the configuration files.
Now, you need to create yourself an admin user.
Use the following command to create your database tables, add a default user, create the default user groups and run all the necessary database migrations to ensure your database schema is up to date.
-----
#### <i class="fa fa-linux"></i> Linux / OSX
```
php artisan app:install --env=production
```
#### <i class="fa fa-windows"></i> Windows
Open `C:\inetpub\wwwroot\snipe-it` in Windows Explorer
- Right Click and select `Use Composer here`
- Type `php artisan app:install --env=production` and follow the prompts
-----
When it asks you if youre sure you want to run the migrations, type in `y`. You may have to do this a few times.
-----
### Seed the Database (Optional)
During the `php artisan app:install` process, it will ask you if you wish to seed the database.
Loading up the sample data will give you an idea of how this should look, how your info should be structured, etc. It only pre-loads a handful of items, so you wont have to spend an hour deleting sample data, but this step is optional. If you dont wish to seed the database, type in `n` when the installer asks you whether you want to seed.
If you answer no, but change your mind after the installer is complete, you can run the database seeder by running:
```
php artisan db:seed --env=production
```
If you run this command on a database that already has your own production asset data in it, IT WILL OVER-WRITE YOUR ENTIRE DATABASE. ALL of your data will be gone forever. NEVER run the db seeder on production after on your initial install.
-----
### Update Your Secret Key (If you didnt already)
After running the `php artisan app:install --env=production` command above, the output of your terminal window should show you a generated secret key. If you missed it in all the scrollback, thats okay, you can manually run `php artisan key:generate --env=production`.
Update the value of `key` in your `app/config/production/app.php` file with the newly generated secret key.
+34
View File
@@ -0,0 +1,34 @@
---
currentMenu: composer
---
# Install Dependencies with Composer
Composer is a package manager for PHP that allows us to manage the dependencies for the various vendor packages we utilize in Snipe-IT. Vendor packages are PHP libraries that someone else wrote, and that we use in Snipe-IT to help make it awesome.
These are not the same thing as the [system requirements](../requirements.html), which are technologies that the server itself needs in order to run Snipe-IT (such as a database, etc).
__NOTE: Never run composer as a super-user or Administrator. Always run it as the user that owns the Snipe-IT files. Running composer as a super-user will break things in ways that will be difficult to debug later. Just don't do it.__
## <i class="fa fa-linux"></i> Linux / OSX
It is not required to install composer globally, however if you wish to, you can find instructions on how to do so on [the Composer website](https://getcomposer.org/).
```bash
cd <install-dir>
curl -sS https://getcomposer.org/installer | php
php composer.phar install --no-dev --prefer-source
```
### For global composer installations
```bash
cd <install-dir>
composer install --no-dev --prefer-source
```
## <i class="fa fa-windows"></i> Windows
- [Download Composer-Setup.exe](https://getcomposer.org/Composer-Setup.exe) from the Composer website.
- Move the `Composer-Setup.exe` file `C:\inetpub\wwwroot\snipe-it`
- Open `C:\inetpub\wwwroot\snipe-it` in Windows Explorer
- Right click and select `Composer Install`. This will install the dependencies.
+248
View File
@@ -0,0 +1,248 @@
---
currentMenu: configuration
---
# Snipe-IT Configuration Files
<div id="generated-toc" class="generate_from_h2"></div>
## Set Your Environment
Update the file `bootstrap/start.php` under the section Detect The Application Environment to include your server's hostname in the `production` array. This configuration option tells Snipe-IT whether it should run in development mode (local), staging, or production mode. __Unless you are a PHP developer setting up a local installation so that you can contribute code towards Snipe-IT, you should be running Snipe-IT in production mode__.
To find out your local machines hostname, type `hostname` from a terminal prompt on the machine youre installing it on. The command-line response is that machines hostname. __Please note that the hostname is usually NOT the same as the domain name__.
So for example, if youre installing this on your server named `CentOS-ip-9875`, the environmental variable section of `bootstrap/start.php` might look like this:
```php
$env = $app->detectEnvironment(array(
...
'production' => array('CentOS-ip-9875')
));
```
-----
## Set Timezone and Language Preferences
Open up `app/config/app.php` and edit the `timezone` and `language` settings to reflect your desired timezone and language. The default timezone is UTC. The timezone you use should be formatted as [an accepted PHP timezone](http://php.net/manual/en/timezones.php), so for example, for Pacific Time, you could use `America/Los_Angeles`:
```
'timezone' => 'America/Los_Angeles',
```
The default language is US English, however we have additional language translations available, thanks to a great community of people [helping us translate Snipe-IT](../translations.html).
```
'locale' => 'en',
```
If you wish to use one of the other available languages, simply replace the default value of `locale` from `en` to one of the values listed below.
| Language | Value |
| ------------- | ------------- |
|Arabic|`ar`|
|Chinese Simplified|`zh-CN`|
|Czech|`cs`|
|Danish|`nl`|
|Dutch|`nl`|
|English|`en`|
|English, UK |`en-GB`|
|Finnish|`fi`|
|French|`fr`|
|German|`de`|
|Hungarian|`hu`|
|Italian|`it`|
|Japanese|`ja`|
|Korean|`ko`|
|Malay|`ms`|
|Norwegian|`no`|
|Polish|`pl`|
|Portuguese|`pr-PT`|
|Portuguese, Brazilian|`pr-BR`|
|Romanian|`ro`|
|Russian|`ru`|
|Spanish|`es-ES`|
|Swedish|`sv-SE`|
|Thai|`th`|
|Turkish|`tr`|
|Vietnamese|`vi`|
If you're interested in additional languages, or would like to help us translate some of the incomplete existing languages, please see the [Translations](../translations.html) page.
-----
## Edit Database Settings
__Note: You must create the database yourself. Snipe-IT does not create the database or database users for you.__
Copy the example database config from `app/config/production/database.example.php` to `app/config/production/database.php`. Update the file `app/config/production/database.php` with your database name and credentials, replacing `snipeit_laravel` with your database name, `travis` with your database username, and so on:
```
'mysql'=> array(
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'snipeit_laravel',
'username' => 'travis',
'password' => '',
'charset' => 'utf8',
'collation'=> 'utf8_unicode_ci',
'prefix' => '',
),
```
You can generally leave `charset`, `collation` and `prefix` as they are.
You do not need to run migrations or worry about the database schema during the installation. The [command-line installer](/installation/command-line.html) will create the initial database tables for you.
-----
## Edit Mail Settings
Copy the example mail config from `app/config/production/mail.example.php` to `app/config/production/mail.php`, and update the new `app/config/production/mail.php` file with your settings for SMTP server, email username and password.
These settings will be used to send emails to your users, when they register and when they request a password reset.
While your mail settings will vary depending on how you've set up your server, the one line you must change regardless of your configuration is:
```
'from' => array('address' => null, 'name' => null),
```
__Make sure as you edit this section that you change the **values**, not the **keys**.__ For example,
```
'from' => array('address' => 'me@example.com', 'name' => 'John Smith'),
```
is __correct__, while
```
'from' => array('me@example.com' => null, 'John Smith' => null),
```
is __incorrect__ and will cause errors when it tries to send email.
Make sure you enclose your values in single quotes. For example,
```
'username' => 'myusername',
```
is __correct__, while
```
'username' => myusername,
```
is __incorrect__ and will cause errors when it tries to send email.
If you don't have an SMTP server to use, you can set the `driver` value to `mail`:
```
'driver' => 'mail',
```
### GoDaddy Email
If you're using GoDaddy for hosting, you will need to set your mail server to use `relay-hosting.secureserver.net` on port `25`, with `username` and `password` left as null values. See the [GoDaddy relay server documentation](https://www.godaddy.com/help/what-is-the-name-of-my-hosting-accounts-relay-server-953) for more specifics.
### Using Gmail
If you're using Gmail to send your emails, you'll want to use the settings below (in addition to filling out the from address and name in the config file):
| Setting | Value |
| ------------- | -----------|
|`driver`|`'smtp'` |
|`host`|`'smtp.gmail.com''` |
|`port`|`587` |
|`encryption`|`'tls'` |
|`username`|`'your_gmail_username'` |
|`password`|`'your_gmail_password'` |
Additionally, you may need to tweak a few settings in your Gmail account to handle Google's security that can kick in if Google doesn't recognize the system you're trying to access it through.
- Sign into the Gmail account in a browser
- Go [here](https://www.google.com/settings/security/lesssecureapps) and enable access for "less secure" apps:
- Then go [here](https://accounts.google.com/b/0/DisplayUnlockCaptcha) and click Continue.
- If you're still getting errors, try [this solution on StackOverflow](http://stackoverflow.com/a/26041277/200021).
(More info on sending email through Laravel and Gmail is [available here](http://code.tutsplus.com/tutorials/sending-emails-with-laravel-4-gmail--net-36105), and more info on why Google makes you jump through these hoops is [available here](https://googleonlinesecurity.blogspot.co.uk/2014/04/new-security-measures-will-affect-older.html).)
### If you're still having problems
If you dont have easy access to a mail server (or you can't get your settings to work for some reason), we suggest signing up for [Mandrill](http://mandrillapp.com). Their free tier allows for 12k free sends a month, which should more than cover normal Snipe-IT email usage.
-----
## Application Settings
Copy the example app config from `app/config/production/app.example.php` to `app/config/production/app.php`, and then update your new `app/config/production/app.php` with your URL settings.
```
'url'=> 'http://www.yourserver.com',
```
**This value should begin with the protocol (http:// or https://), as reflected in the example above.**
You should also change your secret key here from `Change_this_key_or_snipe_will_get_ya` to a random 32 character string. If you prefer to have your key randomly generated, run the `php artisan key:generate` command from the application root a little later in this process.
-----
## Set Directory Permissions
Youll need to make sure that the `app/storage` directory and its subdirectories are writable by your web server, since caches and log files get written there. You should use the minimum permissions available for writing, based on how youve got your web server configured. You also need to change permissions for your `uploads` directory for user avatars and model images.
First, you'll need to figure out which user your webserver is running under. On Linux/OS X systems, it's usually something like "nobody", "apache", "httpd", "www", or "\_www" Determine that by using `ps auxwww` - then you can see who the server is running as.
Once you've determined your webserver's user, you will want to make sure your webserver has ownership of the appropriate directories:
```sh
chown -R that_username app/storage app/private_uploads public/uploads
```
Next, you'll want to ensure that this user has write permissions to those directories.
On Linux/OS X, you would do something like this:
```
chmod -R 755 app/storage
chmod -R 755 app/private_uploads
chmod -R 755 public/uploads
```
For help fixing permissions on IIS, see the [Windows Installation guide](server/windows.html).
If you still run into a permissions error, you may need to increase the permissions to 775, or twiddle your user/group permissions on your server so that the web server itself (Apache, IIS, etc) can write to files owned by the Snipe-IT user.
__Note: It should go without saying, but make sure the Snipe-IT project directory is not owned by root. Your webserver should be running as your webservers user (often apache, nobody, or www-data). But never, ever root. Ever.__
-----
## Optional: Set Cookies to HTTPS-only
As an extra security feature, Snipe-IT allows you to set your cookies to HTTPS-only, which will ensure that session cookies will only be sent back to the server if the browser has a HTTPS connection.
If you are running Snipe-IT over SSL and wish to use this feature, copy the example session config from `app/config/production/session.example.php` to `app/config/production/session.php`, and then update your new `app/config/production/session.php` file to reflect:
```
'secure' => true,
```
If you have this option set to `true` in your session config, your users will not be able to login if they access Snipe-IT over the non-HTTPS connection.
**Note: If you are NOT running Snipe-IT over SSL and you enable this option, your users will not be able to login. Only use this option if you are running Snipe-IT over SSL.**
-----
## Optional: Set Your .htaccess to Redirect to SSL
If you are running Snipe-IT over HTTPS and wish to automatically redirect the user to the HTTPS version if they accidentally go to the HTTP version, uncomment the following lines from the `public/.htaccess` file:
```
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
```
**Note: If you are NOT running Snipe-IT over SSL and you enable this option, your users will not be able to access the site. Only use this option if you are running Snipe-IT over SSL.**
+29
View File
@@ -0,0 +1,29 @@
---
currentMenu: downloading
---
# Downloading
The installation instructions provided here are for a production installation of Snipe-IT. If you are a developer looking to contribute to Snipe-IT, please see the Contributing page.
#### Clone the Repository
```bash
git clone https://github.com/snipe/snipe-it your-folder
```
or
#### Download the source from [https://github.com/snipe/snipe-it/archive/master.zip](https://github.com/snipe/snipe-it/archive/master.zip)
or
#### Download and run the installer script (centos/redhat and debian/ubuntu)
Note: requires Centos 6 or Ubuntu 14 or greater.
```bash
wget https://raw.githubusercontent.com/snipe/snipe-it/master/install.sh
chmod 744 install.sh
./install.sh
```
@@ -0,0 +1,21 @@
---
currentMenu: manually-editing-data
---
# Manually Editing Data in the Database
The short version:
## Don't.
If you start deleting records from tables manually, you will almost assuredly mangle your data in a way that will cause real problems. This software uses a relational database system, which means that some tables exist just to establish relationships between other pieces of data. When you delete part of that equation, Bad Things Happen&#0153;.
We utilize soft deletes in Snipe-IT, which means records are never really deleted, they are simply marked as deleted. This is by design, so that you don't lose history on an asset when, for example, you delete a user. Just because the user is no longer at your organization, that doesn't mean you would want to wipe the previous history of the assets they had while they were there.
## If you decide to do it anyway
**ALWAYS back up your database before you start manually editing database records**, so that when it breaks everything (and it probably will), you will be able to restore it.
If you absolutely insist on deleting data directly, make sure the corresponding records in the `asset_logs` table are also deleted. The `asset_logs` table holds all of the history for assets, accessories and users, and if you delete the assets, accessories, or users it ties together, things break.
If all else fails, delete the contents of `asset_logs`. This should be considered an absolute last resort, as you will be wiping out the history of every checkin, checkout and file upload in the history of the app.
+69
View File
@@ -0,0 +1,69 @@
---
currentMenu: proxy
---
# Running Snipe-IT Through a Reverse Proxy
<div id="generated-toc" class="generate_from_h2"></div>
If you wish to use a Reverse Proxy in front of your web server, you'll need to take a few extra steps to make it work.
A typical Reverse Proxy scenario looks like this:
Internet <i class="fa fa-arrow-right"></i> Reverse Proxy Server (Public & Private IPs) <i class="fa fa-arrow-right"></i> Web Server (Private IPs)
The Reverse Proxy Server is functioning as a reverse proxy (Nginx, Squid, Apache's Mod_Proxy, or Varnish).
In most deployments the Reverse Proxy will perform HTTP to HTTPS redirection and only pass requests and responses via HTTPS to the remote client.
Scenario: <span style="color: red;">**BROKEN**</span>
Client <i class="fa fa-arrow-left"></i> HTTPS <i class="fa fa-arrow-right"></i> Reverse Proxy Server <i class="fa fa-arrow-left"></i> HTTP <i class="fa fa-arrow-right"></i> Web Server
Scenario: <span style="color: green;">**WORKS**</span>
Client <i class="fa fa-arrow-left"></i> HTTP <i class="fa fa-arrow-right"></i> Reverse Proxy Server <i class="fa fa-arrow-left"></i> HTTP <i class="fa fa-arrow-right"></i> Web Server <br>
Client <i class="fa fa-arrow-left"></i> HTTPS <i class="fa fa-arrow-right"></i> Reverse Proxy Server <i class="fa fa-arrow-left"></i> HTTPS <i class="fa fa-arrow-right"></i> Web Server
## Explanation
In the above scenario the generated HTML will reference `http://` instead of `https://` for all assets. This causes most browsers to throw security warnings and refuse to display the content. (Typically, you'll see mixed content warnings because the browser won't load insecure elements on an SSL page.)
__This assumes that your Reverse Proxy Server and Web Server are correctly configured and working properly. Meaning you have other correctly functioning Applications behind the proxy and the Web Server for Snipe-IT works properly if accessed directly.__
Snipe-IT is unaware that requests to the proxy are being handled through HTTPS instead of HTTP. As such no effort is made to generate HTTPS links for Assets (javascript, CSS, images, etc.)
Snipe-IT needs to be made aware of the presence of the Reverse Proxy Server. The `X-Forwarded-Proto` header should be passed from the Reverse Proxy Server to the Web Server.
## Server Configuration
In Nginx, you would use:
```
proxy_set_header X-Forwarded-Proto $scheme;
```
With Apache's Mod_Proxy, you would add:
```
RequestHeader set X-Forwarded-Proto "https"
```
to your virtual host configuration.
## Snipe-IT Configurations
Copy the `app/config/packages/fideloper/proxy/config.example.php` to `app/config/packages/fideloper/proxy/config.php`, and change
```
'proxies' => '*'
```
to
```
'proxies' => array('YOUR.IP.GOES.HERE'),
```
replacing `YOUR.IP.GOES.HERE` with the IP address(es) of your Reverse Proxy. Note that IPs and CIDR Notation are accepted. **Do not leave this as the default asterisk as that is highly insecure.**
You may also want to see the [security notes](../security.html) for additional steps you can take for SSL configurations.
+41
View File
@@ -0,0 +1,41 @@
---
currentMenu: server
---
# Server Configuration
As mentioned, Snipe-IT is web-based software, which means it requires a web server to run.
#### You must complete all of the steps in the installation section, in addition to configuring your server. That means you will [download the software](../downloading.html), [customize your configuration files](../configuration.html), [install the dependencies with composer](../composer.html), and run the [command line utility](../command-line.html), in addition to configuring your web server.
Installation should take around twenty minutes or less, if nothing goes wrong, and if you're pretty familiar with web server configuration.
__NOTE: You should never run Snipe-IT (or any website, ever) as a root (Linux) or Administrator (Windows). Create an unprivileged user and make them the owner of the files.__
<div class="grey-alert">
<div style="float: left; padding-right: 10px">
<a href="windows.html" style="color: black"><i class="fa fa-windows fa-2x"></i></a>
</div>
<div style="float: left; vertical-align: middle;">
<strong>
<a href="windows.html" style="color: black;">Windows 2008 R2 With IIS Configuration Guide</a>
</strong>
</div>
<div class="clear"></div>
</div>
<div class="grey-alert">
<div style="float: left; padding-right: 10px">
<a href="linux-osx.html" style="color: black"><i class="fa fa-linux fa-2x"></i></a>
</div>
<div style="float: left; vertical-align: middle;">
<strong>
<a href="linux-osx.html" style="color: black;">Linux / OSX Server Configuration Guide</a>
</strong>
</div>
<div class="clear"></div>
</div>
We also provide server configuration instructions for [XAMPP](xampp.html), [WAMP](wamp.html) and [Docker](docker.html).
If this all looks too overwhelming for you, we do offer [affordable hosted solutions](http://snipeitapp.com/hosting/) for folks who want to use Snipe-IT but don't know how to run a web server, or don't have time to keep up with updates.
+144
View File
@@ -0,0 +1,144 @@
---
currentMenu: docker
---
# Installing Snipe-IT on Docker
The easiest way, by far, is to just use the version we push to [Docker Hub](https://hub.docker.com/r/snipe/snipe-it/):
```sh
docker pull snipe/snipe-it
```
Then you have a functioning Snipe-IT container. Skip ahead to "How to get up and
running" to configure it and get it connected to your database.
## How to get up and running
The best way to handle all of the various settings for your various containers is to use an `env-file`.
See the Docker documentation for more details. It should be just a simple text file with environment
variable names and values, separated by ```=``` signs.
Your `docker.env` should look something like this:
```env
# Mysql Parameters
MYSQL_ROOT_PASSWORD=YOUR_SUPER_SECRET_PASSWORD
MYSQL_DATABASE=snipeit
MYSQL_USER=snipeit
MYSQL_PASSWORD=YOUR_snipeit_USER_PASSWORD
# Email Parameters
# - the hostname/IP address of your mailserver
MAIL_PORT_587_TCP_ADDR=smtp.whatever.com
#the port for the mailserver (probably 587, could be another)
MAIL_PORT_587_TCP_PORT=587
# the default from address, and from name for emails
MAIL_ENV_FROM_ADDR=youremail@yourdomain.com
MAIL_ENV_FROM_NAME=Your Full Email Name
# - pick 'tls' for SMTP-over-SSL, 'tcp' for unencrypted
MAIL_ENV_ENCRYPTION=tcp
# SMTP username and password
MAIL_ENV_USERNAME=your_email_username
MAIL_ENV_PASSWORD=your_email_password
# Snipe-IT Settings
SNIPEIT_TIMEZONE=UTC
SNIPEIT_LOCALE=en
SERVER_URL=https://myserver.com
```
First get a MySQL container running. MySQL 5.6 or earlier are easiest.
```sh
docker run --name snipe-mysql --env-file=my_env_file -d -p $(docker-machine ip b2d)::3306 mysql:5.6
```
**WARNING:** Newer MySQL containers (5.7 and later, or MariaDB) may run in strict-mode by default, and the initial migrations and application setup will fail in strict mode. If you want to use one of those versions, you need to disable strict mode first!
That should set you up with your database to use. (You can also specify environment variables on the command-line instead of the env-file, but that can get very clunky very quickly; see ```docker run --help``` for details)
* If your Email solution requires its own container, start that container or service. Make sure to expose port 587 for mail submission, and use ```--link mail:...```.
### Start your Snipe-IT container
First off, decide whether or not you want to have your Snipe-IT container manage SSL for you, or not.
#### SSL disabled
Start your Snipe-IT container -
```sh
docker run -d -p $(docker-machine ip b2d)::80 --name="snipeit" --link snipe-mysql:mysql --env-file=my_env_file snipe-it
```
#### SSL enabled
Start your Snipe-IT container - but make sure you can "mount" your local copies of your SSL key and SSL certificate onto the container.
They're expected to be named exactly: `/etc/ssl/private/snipeit-ssl.key` and `/etc/ssl/private/snipeit-ssl.crt` for the key and certificate, respectively.
```sh
docker run -d -P --name="snipeit" --link snipe-mysql:mysql -v /Absolute/Path/To/Your/SSL_Cert_directory:/etc/ssl/private --env-file=my_env_file snipe-it
```
### Email, Management, Access
If you have a separate container running for email, you will also want a ```--link``` setting for email as well.
You can find out what port Snipe-IT is running on with:
```sh
docker port snipeit
```
And finally, you can initialize the application and database like this:
```sh
docker exec -i -t snipeit php artisan app:install
```
(Go ahead and answer the questions however you like. Type 'yes' when asked whether or not you want to run migrations.)
## For Development
You can build the snipe-it image using the ```Dockerfile``` at the root directory of Snipe-IT by doing this:
```sh
docker build -t snipe-it .
```
Then you can use your newly built image as ```snipe-it```
When you call ```docker run``` - make sure to mount your own snipe-it directory *over* the /var/www/html directory. Something like:
```sh
docker run -d -v /Path/To/My/snipe-it/checkout:/var/www/html -p $(docker-machine ip b2d)::80 --name="snipeit" --link mysql:mysql snipeit
```
Then your local changes to the code will be reflected. You will have to re-run ```composer install``` -
```sh
docker exec -i -t snipeit composer install
```
You'll need to copy the docker/database.php file to ```app/config/production/``` , and copy the ```app/config/production/app.example.php to app/config/production/app.php```
And also app:install -
```sh
docker exec -i -t snipeit php artisan app:install
```
And you may still need to generate the key with -
```sh
docker exec -i -t snipeit php artisan key:generate --env=production
```
While you're developing, you may need to occasionally run -
```sh
docker exec snipeit composer dump-autoload
```
To fix the autoloading cache (if, for example, your class names change, or you add new ones...)
**NOTE: When upgrading your docker install, make a note of the app key in `app/config/production/app.php`. If you are using LDAP, your LDAP server password is encrypted using this app key, and you will have a bad time if your app key changes. The upgraded docker WILL change your app key, so just replace the newly created on with your old one. **
+172
View File
@@ -0,0 +1,172 @@
---
currentMenu: linux-osx
---
# <i class="fa fa-linux"></i> Installing Snipe-IT on Linux/OSX
<div id="generated-toc" class="generate_from_h2"></div>
## Using Apache
The most common setup for Snipe-IT on a linux server is to use Apache, so if you're not sure what to pick, Apache might be the best bet, as it's free, easy to configure, and well documented.
__The `DocumentRoot` for the app should be set to the `public` directory.__
In a standard Apache virtualhost setup, that might look something like this:
```
<VirtualHost *:80>
<Directory /var/www/html/public>
Allow From All
AllowOverride All
Options +Indexes
</Directory>
DocumentRoot /var/www/html/public
ServerName www.yourserver.com
# Other directives here
</VirtualHost>
```
**Note**: `/var/www/html/public` is a common path used on web servers, however you will want to change `/var/www/html/public` to wherever the `public` directory is in within the Snipe-IT files on your server. If you are using the installer script for Centos6+/Ubuntu 14+ remember to change your `Directory` and `DocumentRoot` to `/var/www/html/snipeit/public`.
An OS X virtualhost setup could look more like:
```
<Directory "/Users/youruser/Sites/snipe-it/public/">
Allow From All
AllowOverride All
Options +Indexes
</Directory>
<VirtualHost *:80>
ServerName "www.yourserver.com"
DocumentRoot "/Users/youruser/Sites/snipe-it/public"
</VirtualHost>
```
Snipe-IT requires `mod_rewrite` to be installed and enabled on systems running Apache. For more information on how to set up `mod_rewrite`, [click here](http://xmodulo.com/2013/01/how-to-enable-mod_rewrite-in-apache2-on-debian-ubuntu.html).
__Note that in Apache 2.4, you may need to use `Require all granted` instead of `Allow From All`.__
-----
## Using Nginx and PHP-FPM
If you wish to use Nginx and PHP-FPM instead of Apache, PHP-FPM will need to be installed and setup to listen on a socket. For more information on how to setup PHP-FPM, [click here](https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-on-ubuntu-12-04#step-five—configure-php).
```
server {
listen 80;
server_name localhost;
root /Users/youruser/Sites/snipe-it/public/;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
try_files $uri $uri/ =404;
fastcgi_pass unix:/var/run/php5-fpm-www.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
```
If you prefer to use a forced SSL setup, you can use the following configuration instead.
```
server {
listen 80;
server_name localhost;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name localhost;
ssl_certificate /path/to/your.crt;
ssl_certificate_key /path/to/your.key;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-RC4-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:RC4-SHA:!aNULL:!eNULL:!EXPORT:!DES:!3DES:!MD5:!DSS:!PKS;
ssl_session_timeout 5m;
ssl_session_cache builtin:1000 shared:SSL:10m;
root /Users/youruser/Sites/snipe-it/public/;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
try_files $uri $uri/ =404;
fastcgi_pass unix:/var/run/php5-fpm-www.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
```
Note that with the SSL configuration you will need to adjust the path to your SSL certificate or it will not work. You can use a proper certificate generated from a CA or a self-signed certificate. For more information on creating a self-signed certificate, [click here](https://www.digitalocean.com/community/tutorials/how-to-create-a-ssl-certificate-on-nginx-for-ubuntu-12-04).
-----
## Running this on an EC2 Micro Instance
Depending on your needs, you could probably run this system in an EC2 micro instance. It doesn't take up very much memory and typically won't be a super-high-traffic application. EC2 micros fall into the free/dirt-cheap tier, which might make this a nice option. One thing to note though - composer can be a little memory-intensive while you're running updates, and you may have trouble with it failing on a micro. You can crank the memory_limit up in php.ini, but EC2 micros have swap disabled by default, so even that may not cut it. If you run into totally unhelpful error messages while running composer updates (like simply 'Killed') or fatal memory issues mentioning phar, your best bet will be to enable swap:
sudo /bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=1024
sudo /sbin/mkswap /var/swap.1
sudo /sbin/swapon /var/swap.1
If you need more than 1024MB then change that to something higher.
To enable it by default after reboot, add this line to /etc/fstab:
/var/swap.1 swap swap defaults 0 0
-----
## Notes on SELinux
If youre running SELinux, youll need to change the security context in order for the web server to be able to write to files where needed (log files, image uploads, sessions, etc).
If youre not sure, dont worry about it unless youve set up Snipe-IT and youre hitting permission errors even after youve updated the directory permissions to be writable.
To tell if youre running SELinux, you can run:
```
cat /etc/sysconfig/selinux
```
or
```
sestatus
```
If it turns out youre running SELinux, the syntax for changing the security context on a directory is:
```
chcon -type <type> <file>
chcon --reference <file1> <file2>
```
So for example, you might do something like:
```
chcon -R --type httpd_sys_rw_content_t /srv/snipeit
chcon -R --reference=/var/www/html /srv/snipeit
```
Depending on where your Snipe-IT files are located.
+9
View File
@@ -0,0 +1,9 @@
---
currentMenu: wamp
---
# Installing Snipe-IT on WAMP
To install Snipe-IT on WAMP, see the video below on how to set up the server and database and then proceed to the documentation on [installing Snipe-IT for Linux/OSX](linux-osx.html).
<center><iframe src="https://www.youtube.com/embed/DqEdTWjSnAQ?rel=0" width="480" height="360" frameborder="0" allowfullscreen="allowfullscreen"></iframe></center>
+83
View File
@@ -0,0 +1,83 @@
---
currentMenu: windows
---
# <i class="fa fa-windows"></i> Install Snipe-IT on Windows 2008 R2 with IIS
### Setting Up an IIS Website
- Extract [Snipe-IT](../downloading.html) to `C:\inetpub\wwwroot\snipe-it` (folder name can be changed but we will reference it as is shown here)
- Run IIS Manager
- Right Click `Sites` and `Add Website`
```
Site name: Snipe IT
Physical path: C:\inetpub\wwwroot\snipe-it\public
Binding
Type: http
IP address: All Unassigned or a specific IP if you have one you will be using
Port: 80 or any you wish to use
Host name: assets.portal.local (this can be changed to suit your needs)
```
- Click `OK`
Your site will now appear in the list.
- Double click on your site
- Double Click `URL Rewrite`
- In the action pane click `Import Rules...`
- Click the `...` button
- Go to `C:\inetpub\wwwroot\snipe-it\public`
- Select `.htaccess` file
- Click `Open` then `Import`
- In the action pane click `Apply`
## Fix Permissions
Add permissions for the IIS user for the `uploads` folder:
- Go to `C:\inetpub\wwwroot\snipe-it\public`
- Right Click uploads -> Properties
- Go to Security Tab -> Edit
- Click Add and change location to local machine
- Type IUSR in object name box
- Click OK
- Give IUSR full control
- Click OK twice
Add permissions for the IIS user for the `private_uploads` folder:
- Go to `C:\inetpub\wwwroot\snipe-it\app`
- Right Click private_uploads -> Properties
- Goto Security Tab -> Edit
- Click Add and change location to local machine
- Type IUSR in object name box
- Click OK
- Give IUSR full control
- Click OK twice
Add permissions for the IIS user for the `c:\windows\temp\` folder:
- Goto `C:\windows\`
- Right Click temp -> Properties
- Goto Security Tab -> Edit
- Click Add and change location to local machine
- Type IUSR in object name box
- Click OK
- Give IUSR modify permissions
- Click OK twice
Add permissions for the IIS user for the `storage` folder:
- Go to `C:\inetpub\wwwroot\snipe-it\app`
- Right Click storage -> Properties
- Goto Security Tab -> Edit
- Click Add and change location to local machine
- Type IUSR in object name box
- Click OK
- Give IUSR full control
- Click OK twice
Much <i class="fa fa-heart heart" style="color:red"></i> to [@madd15](http://github.com/madd15) for writing up the Windows installation guide!
+9
View File
@@ -0,0 +1,9 @@
---
currentMenu: xampp
---
# Installing Snipe-IT on XAMPP
To install Snipe-IT on XAMPP, see the video below on how to set up the server and database, and then proceed to the documentation on [installing Snipe-IT for Linux/OSX](linux-osx.html).
<center><iframe src="https://www.youtube.com/embed/cSN34q47BXY?rel=0" width="480" height="360" frameborder="0" allowfullscreen="allowfullscreen"></iframe></center>
+56
View File
@@ -0,0 +1,56 @@
---
currentMenu: subdirectory
---
# Installing Snipe-IT Into a Subdirectory
If you wish to run Snipe-IT in a subdirectory (`https://yourserver.com/snipe-it`) instead of at a primary domain (`http://yourserver.com`) or a sub-domain (`https://snipe-it.yourserver.com`), you'll need to go through the standard install steps 1-5, and then make a few small changes to your server configuration and `.htaccess` file.
## Add an Alias Directive
In a standard Apache virtualhost setup, you'll need to add an `Alias` attribute to the virtualhost in your `httpd.conf`. That might look something like this, if your path to the Snipe-IT files were `/var/www/html/snipe-it/public`:
```
<VirtualHost *:80>
Alias /snipe-it "/var/www/html/snipe-it/public"
<Directory /var/www/html/snipe-it/public>
Allow From All
AllowOverride All
Options +Indexes
</Directory>
DocumentRoot /var/www/html/snipe-it/public
ServerName www.yourserver.com
# Other directives here
</VirtualHost>
```
(Make sure to restart the webserver after making configuration changes to the Apache configs.)
## Modify Your .htaccess
You'll need to add one line to your `.htaccess` file to make this work. Immediately beneath the `RewriteEngine On`, add the option `RewriteBase /snipe-it`, once again assuming that your subdirectory URL is `http://yourserver.com/snipe-it`.
```
<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
RewriteEngine On
RewriteBase /snipe-it
# Uncomment these two lines to force SSL redirect
# RewriteCond %{HTTPS} off
# RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
```
+13
View File
@@ -0,0 +1,13 @@
---
currentMenu: license
---
# License
Copyright (C) 2013-2014 Alison Gianotto - snipe@snipe.net
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
+55
View File
@@ -0,0 +1,55 @@
---
currentMenu: manual-home
---
# Snipe-IT User's Manual
(This manual is a work in progress - please check back often.)
## Basic concepts
### Checkin/Checkout
Checking in and checking out are two primary concepts behind Snipe-IT. When you checkout an asset, license or accessory, youre marking them as being in the possession of someone else. This means that they cannot subsequently be checked out to another person until they are checked back in. This prevents “double-booking” assets, where one asset has been promised to or assigned to multiple people.
When an employee leaves your company, or if an asset, license or accessory is not functioning properly, you would check it back in. Checking it back in indicates that its back in your possession, or potentially out for repair. Its up to you to decide what status to assign it, based on the condition of the asset.
-----
### Status Labels
Status labels are used to describe the state of the asset. You can add as many status labels as youd like. Each status label will have one of four characteristics that describe the state of assets with that status label:
Undeployable: these assets cannot be assigned to anyone.
Deployable: these assets can be assigned to people
Archived: these assets cannot be assigned to people, and will only show up in the Archived view
Pending these assets can not yet be assigned to anyone.
Use status labels however you see fit. You can just keep the starter labels we set up for you, or you can flesh out a detailed set of statuses that will make sure your team always knows exactly whats going on with each asset.
If you set up your status labels well, they can be enormously useful. A status label that is a pending label named “Awaiting Re-Imaging” tells your team that this item cant be deployed because its still in the re-imaging stage and isnt ready yet. Once its ready, your team can update the status to “Ready to Deploy”, and then its added to the pool of available deployable resources.
-----
## Getting Started
### Setting up Locations
If you have a fresh install of Snipe-IT, it can be confusing on where to get started. The best place to start is to set up your locations. Even if you only have one location, youll want to get that set up first, since users, assets and many other things within the Snipe-IT system rely on it.
From here you can start adding users if you want, or move on to adding asset models and assets.
### Asset Categories
Asset categories are used by both assets and accessories. Categories describe the general type of asset or accessory, such as “wireless keyboards”, “laptops”, and so on. Categories are important because they contain attributes that are inherited by both the assets and accessories that long to them, such as whether to require the user to click on a link to show that they have received the asset or accessory, and whether or not the user should be emailed a EULA.
Every asset and accessory needs to belong to a category, so youll need to set these up before adding assets.
### Asset Models
Every asset needs an asset model, so setting these up next will help you start adding assets. Asset models can be things like the make and model of a laptop or desktop machine (Apple 13″ Retina, for example). When you create new assets, youll select whichever asset model makes sense.
Asset models are important because they carry certain attributes which are inherited by the assets you, such as depreciation type, end of life, and whether or not to show MAC address fields on the asset.
+17
View File
@@ -0,0 +1,17 @@
---
currentMenu: alerts
---
# Configuring Email Alerts in Snipe-IT
To set up the cron to run every day, set up your crontab as:
```
@daily /path/to/php /path/to/your/snipe-it/artisan alerts:expiring
```
To set it to run every week, use:
```
@weekly /path/to/php /path/to/your/snipe-it/artisan alerts:expiring
```
+26
View File
@@ -0,0 +1,26 @@
---
currentMenu: backups
---
# Automated Backups
In `v2.0` and later, Snipe-IT can automatically create a zipped backup of your database dump and any files you've uploaded. You can run this command manually by entering:
```
php artisan snipeit:backup
```
To set up the cron to run every day, set up your crontab as:
```
@daily /path/to/php /path/to/your/snipe-it/artisan snipeit:backup
```
To set it to run every week, use:
```
@weekly /path/to/php /path/to/your/snipe-it/artisan snipeit:backup
```
You will need to make sure that mysqldump is installed and set in your path. If mysqldump isn't in your path, you can set it manually by copying `/app/config/packages/schickling/backup/config.example.php` to `/app/config/packages/schickling/backup/config.php` and updating the mysqldump path information.
+54
View File
@@ -0,0 +1,54 @@
---
currentMenu: custom-fields
---
# Custom Fields and Fieldsets
Custom fields and fieldsets are available in Snipe-IT versions `2.1.0-pre` and later.
Custom fields allow you to track additional information about your assets that the default asset attributes don't cover.
Think of custom fieldsets as collections of custom fields. You can have a custom fieldset with just one custom field in it, or multiple custom fields. The idea of fieldsets is to keep commonly used fields grouped together so you don't have to add fields one-by-one to asset models.
Custom fieldsets are assigned at the asset model level. So, for example, if you track mobile phones as Assets, you could create custom fields for "IMEI", "SIM", "Phone Number", etc.
![Create mobile phones fieldset](/img/sim.png)
You would then add all of those mobile phone related fields to a new "Mobile Phones" custom fieldset, and assign it to one of your mobile phone asset models.
![Create mobile phones fieldset](/img/mobile-phones.png)
When you're adding a field to a fieldset, you can select whether that field should be required, what order it should appear in, and then select the fieldset to add from the select box.
![Create mobile phones fieldset](/img/add-to-fieldset.png)
Then, for any mobile phone assets you create that belong to that asset model, the custom fields attributes will automatically appear.
To break it down step by step:
- Create the new custom fields you want in your custom fieldset.
- Create the new custom fieldset, and add the custom fields you just created.
- Go to Admin > Asset Models and edit an asset model, selecting the custom fieldset you just created.
You can create the fields first, or the fieldset first, but be sure to add the new fields to your fieldset, and then associate that fieldset to an asset model to see those new fields on your asset forms.
Once your asset models have custom fieldsets associated with them, your new values will appear on the asset view and edit pages, and in the main asset listing table. You will be able to search/sort on these fields (as well as show/hide them in the table view) the same as you can the other built-in fields.
### Custom Field Validation
We have provided support for basic input validation on the custom fields you create. When creating the fields, you'll have the option of selecting the `Format` the text input for your new fields should be in when your admins add or edit assets. You have several pre-defined options:
| Format | Description |
| ------------- | ------------- |
|`ANY`|No input validation. Any text is acceptable.|
|`ALPHA`|Any alpha numeric text.|
|`NUMERIC`|Any numeric text.|
|`MAC`|Text formatted in MAC address format.|
|`IP`|Text formatted as an IPv4 address. (IPv6 is coming soon.)|
|`CUSTOM`|Custom regular expression.|
If you select `CUSTOM`, be sure to enter a valid regular expression in the `Custom Format` box below that select box.
### Notes:
There is currently no ability to import custom fields while importing assets. That's coming soon.
+74
View File
@@ -0,0 +1,74 @@
---
currentMenu: importing-assets
---
# Importing Users and Assets
<div id="generated-toc" class="generate_from_h2"></div>
There is an asset import tool in later versions of Snipe-IT ( > `1.2.8`). It is available through the command-line only, as very large file uploading and processing will cause memory exhaustion issues on many servers<sup>*</sup>.
<sup>*</sup>This web-based importer should be limited to imports of 1000 records at a time or less. We're working on making it able to handle more records at a time.
Make sure you have your organization's domain name filled out in the `domain` value in `app/config/production/app.php`, so that it knows what domain to use when generating email addresses if none are provided in your CSV.
## Usage:
```
php artisan asset-import:csv path/to/your/file.csv --email_format=firstname.lastname --username_format=firstname.lastname
```
| Option | Values | Required |
| ------------- | ------------- |
|`email_format`|`firstname`, `firstname.lastname`, or `filastname` (for first initial, last name)| Yes |
|`username_format`|`firstname`, `firstname.lastname`, `filastname` (for first initial, last name) or `email`| Yes |
## CSV Format
The importer will be looking for a CSV in the format of:
```
Name (Firstname Lastname), Email, Username, Asset Name, Asset Category, Asset Model, Manufacturer, Asset Model Number, Asset Serial, Asset Tag, Location Name, Asset Notes, Purchase Date, Purchase Cost
```
The importer will ignore the first line of your CSV, so if you don't have a header row, you should add one. **There should not be any blank lines at the end of the CSV.**
[__Download a sample CSV with dummy data__](http://docs.snipeitapp.com/sample-assets.csv)
| Field | Example Data | Required | Notes |
| ------------- | ------------- |
|Name|`Firstname Lastname` | No| No commas. First name first, last name last |
|Email| `you@example.com`| No|If empty, will be generated using the `email_format` and `domain` you provide in your `app/config/production/app.php`|
|Username| `yourname.lastname`| No|If empty, will be generated using the `username_format` you provide in the import command|
|Asset Name |`Karen 2015`| No | |
|Asset Category |`Laptop`| Yes | Created if it doesn't exist |
|Asset Model |`MBP Retina 13-inch`| Yes |Created if it doesn't exist |
|Manufacturer Name| `Apple`|Yes | Created if it doesn't exist |
|Asset Model No.| `MacbookPro12,1`| No | |
|Asset Serial | `C20095805496869045H6`| No | |
|Asset Tag | `KJH90890`| Yes | |
|Location Name | `San Diego`| Yes | Created if it doesn't exist |
|Asset Notes | `Karens old machine`| No | |
|Purchase Date | `2015-01-12 07:30:30`| No | Can take any date format that can be translated by `strtotime()`|
|Purchase Cost | `2999.99`| No | Cost of asset|
## What It Does
When you execute this command with a valid path to your CSV, the importer will:
- Split the user's name, creating `firstname` and `lastname`.
- If not user is provided, it assumes the asset is Ready to Deploy.
- If a user's name is provided, it assumes that asset is assigned to them
- If a user's name is provided but no email is provided, it will generate an email address using your domain and the pattern you specified in `email_format`
- Generate a password for the new user if a user's name is provided
- Create the user if they don't exist (based on their email address)
- Determine if the asset model exists based on Asset Model Name and Model Number combination
- Create the asset models, locations, category, etc if they don't currently exist, skip them if they do.
- If no user is provided, the asset gets created as ready to deploy instead of checked out to a user
When using this, __BACK UP YOUR DATABASE FIRST__. This is experimental, and it might cause unexpected results with your data. There's some data cleansing and checking that needs to be built in before it's bulletproof.
## Limitations & Notes
The importer isn't very smart. It currently does not do any validation other than checking to see if the record already exists in the database. It doesn't know that `Dell Inspiron` is the same asset as `Dell Insprion`. The quality of your data will make a big difference in the results you get, so if there's a lot of inconsistency, you're going to end up with with duplicates because the app has no way of knowing what you **meant** from what you wrote.
+69
View File
@@ -0,0 +1,69 @@
---
currentMenu: importing-licenses
---
# Importing Users and Licenses
<div id="generated-toc" class="generate_from_h2"></div>
There is a license import tool in later versions of Snipe-IT ( > `1.2.10`). It is available through the command-line only, as very large file uploading and processing will cause memory exhaustion issues on many servers. We'll be working on a way to make this web-based and chunk data in the future.
## Usage:
```
php artisan license-import:csv path/to/your/file.csv --domain=yourdomain.com --email_format=firstname.lastname
```
| Option | Values | Required |
| ------------- | ------------- |
|`domain`| a domain name string formatted as yourdomain.com| Yes|
|`email_format`|`firstname`, `firstname.lastname`, or `filastname` (for first initial, last name)| Yes |
## CSV Format
The importer will be looking for a CSV in the format of:
```
User Name, User Email, Username, Software Name, Serial, Licensed to Name, Licensed to Email, Seats, Reassignable, Supplier, Maintained, Notes, Purchase Date
```
The importer will ignore the first line of your CSV, so if you don't have a header row, you should add one.
[__Download a sample CSV with dummy data__](http://docs.snipeitapp.com/sample-licenses.csv)
| Field | Example Data | Required | Notes |
| ------------- | ------------- |
|User Name|`Firstname Lastname` | No| No commas. First name first, last name last |
|User Email| `you@example.com`| No|If empty, will be generated using the `email_format` and `domain` you provide in the import command|
|Username| `agianotto`| No|This will be required in 2.0|
|Software Name| `Adobe Photoshop 5`|Yes|Name of the software|
|Serial|`8495867487HJGJ`|Yes|Serial number for the software|
|Licensed To Name|`Grokability, Inc`|No|Name the license was registered to, if applicable|
|Licensed To Email|`snipe@grokability.com`|No|Email the license was registered to, if applicable|
|Seats|`5`|Yes|Number of seats the license has, in numeric format|
|Reassignable|`Yes`|No|Whether the license can be reassigned|
|Supplier|`Acme, Inc`|No|Software supplier's name|
|Maintained|`Yes`|No|Whether the license is maintained by the supplier|
|Asset Notes | `Expensed to client XYZ`| No | |
|Purchase Date | `2015-01-12 07:30:30`| No | Can take any date format that can be translated by `strtotime()`|
## What It Does
When you execute this command with a valid path to your CSV, the importer will:
- Split the user's name, creating `firstname` and `lastname`.
- If not user is provided, it assumes the asset is Ready to Deploy.
- If a user's name is provided, it assumes that asset is assigned to them
- If a user's name is provided but no email is provided, it will generate an email address using your domain and the pattern you specified in `email_format`
- Generate a password for the new user if a user's name is provided
- Create the user if they don't exist (based on their email address)
- Determine if the supplier exists, create it if it doesn't
- Create the appropriate number of license seat records
When using this, __BACK UP YOUR DATABASE FIRST__. This is experimental, and it might cause unexpected results with your data. There's some data cleansing and checking that needs to be built in before it's bulletproof.
## Limitations & Notes
The importer isn't very smart. It currently does not do any validation other than checking to see if the record already exists in the database. It doesn't know that `Aobe Acrobat` is the same asset as `Adobe Acrobat`. The quality of your data will make a big difference in the results you get, so if there's a lot of inconsistency, you're going to end up with with duplicates because the app has no way of knowing what you **meant** from what you wrote.
+15
View File
@@ -0,0 +1,15 @@
---
currentMenu: labels
---
# Generating Asset Labels
Generating labels for your assets is very simple in Snipe-IT. Simply go to any of the asset listing views (Ready to Deploy, Deployed, etc) and use the checkboxes in the leftmost column to select the assets you'd like to generate labels for. Once you've finished your selection, scroll down to the bottom of the asset listing table, and select "Generate Labels" from the dropdown list.
![Generate labels](/img/labels.png)
This will generate labels that should fit Avery 5027, 5026<sup>*</sup> and 8425 in portrait mode, or a similarly-sized two-across, eighteen-label (in portrait mode) sheet. There is enough padding around the labels to provide some flexibility with your choice of label sheets.
**NOTE: You must have barcodes enabled in Admin > Settings for labels to be generated.**
<sup>*</sup> Avery 5026 has a color band on the left that may make the QR code difficult to read
File diff suppressed because one or more lines are too long
+90
View File
@@ -0,0 +1,90 @@
---
currentMenu: user-management
---
# User Management
<div id="generated-toc" class="generate_from_h2"></div>
Snipe-IT comes with ability to manage users within the system.
## User Throttling / Unsuspending Users
If a user locks themselves out by attempting and failing to login too many times (default is 5 failed attempts), they will be locked out of the system for 15 minutes. If you need to unlock them before the 15 minutes is up, you can manually unsuspend them by going to the People section, searching for their name, and then clicking the unsuspend icon.
![Unsuspend](/img/unsuspend-user.png)
-----
##Permissions
| Ability | Super User | Admin | Reporter | User |
| ------------- | -----------|-------|----------|------|
|Create Companies|Yes |Yes |No |No |
|Delete Companies|Yes |Yes |No |No |
|Create Asset Models|Yes |Yes |No |No |
|Delete Asset Models|Yes |Yes |No |No |
|Create Asset Categories|Yes |Yes |No |No |
|Delete Asset Categories|Yes |Yes |No |No |
|Create Manufacturer|Yes |Yes |No |No |
|Delete Manufacturer|Yes |Yes |No |No |
|Create Suppliers|Yes |Yes |No |No |
|Delete Suppliers|Yes |Yes |No |No |
|Create Status Labels|Yes |Yes |No |No |
|Delete Status Labels|Yes |Yes |No |No |
|Create Asset Depreciation|Yes|Yes |No |No |
|Delete Asset Depreciation|Yes|Yes |No |No |
|Create Locations|Yes |Yes |No |No |
|Delete Locations|Yes |Yes |No |No |
|Create Groups |Yes |Yes |No |No |
|Delete Groups |Yes |Yes |No |No |
|Take Backup |Yes |No |No |No |
|Delete Backup |Yes |No |No |No |
|Edit System Settings|Yes |Yes |No |No |
|Create Users |Yes |Yes |No |No |
|Remove Users |Yes |No |No |No |
|Create Assets |Yes |Yes |No |No |
|Edit Super Users|Yes |Yes |No |No |
|Unlock Users |Yes |Yes |No |No |
|Edit Users Permissions|Yes |Yes |No |No |
|View Items Assigned to User|Yes|Yes |No |No |
|Request Assets |No |No |No |Yes |
|Generate Reports| Yes |Yes |Yes |No |
-----
## Optional: LDAP Configuration
**Note: You must have the `php-ldap` extension installed for LDAP integration to work.**
To set up your Snipe-IT installation to be able to use LDAP for user login and import, go to `Admin > Settings` and scroll down to the LDAP settings sections.
If you don't have an LDAP server (or don't wish to import your users, or allow them to login using their LDAP credentials), you can skip this step.
The LDAP functionality will import any users in your LDAP/Active Directory, but will leave existing users untouched.
| Option | Example | Notes | Required |
| ------------- | ------------- |
|LDAP Server|`ldap://ldap.example.com`|The URL of the LDAP server.| Yes|
|LDAP Bind Username|`cn=read-only-admin,dc=example,dc=com`|Username to use to connect authenticate to LDAP.| Yes |
|LDAP Bind Password|`password`|Password to use when authenticating to LDAP.| Yes|
|Base Bind DN|`dc=example,dc=com`|The base where the search for users will be executed.|Yes|
|LDAP Filter|`&(cn=*)`|The search filter for the LDAP query.| Yes|
|Username Field|`uid`|The name of the field in your LDAP that you want to use for Snipe-IT username. |Yes|
|Last Name|`sn`|The name of the field in your LDAP to use for last name. This is often `sn` (for surname)|Yes|
|LDAP First Name|`cn`|The name of the field in your LDAP to use for first name.|Yes|
|LDAP Authentication query|`uid="`|The LDAP query we should use to search your LDAP users. (This is usually `samaccountname=` in Active Directory, `uid="` in non-AD LDAP.)|Yes|
|LDAP Version|`3`|Version of LDAP. This is usually going to be `3`|Yes|
|LDAP Active Flag|`active`|Only necessary if you use a field in LDAP to indicate if the user is active. Can otherwise be left blank.|No|
|LDAP Employee Number| |Only necessary if you use a field in LDAP to store an employee number. Can otherwise be left blank.|No|
|LDAP Email|`mail`|LDAP field that should map to an email address for the user|Yes|
**Note: In most cases, all attribute values you enter should be all lowercase.**
Once your settings are entered, make sure you check the `LDAP Integration` checkbox to enable LDAP authentication.
### Example Settings
We use a public LDAP server by <a href="http://www.forumsys.com/tutorials/integration-how-to/ldap/online-ldap-test-server/">Forumsys</a> to test LDAP functionality. To test using this server, use the LDAP Server `ldap://ldap.forumsys.com`.
+28
View File
@@ -0,0 +1,28 @@
---
currentMenu: requirements
---
# System Requirements
The requirements for Snipe-IT are fairly standard for a modern web server, and most servers will have most or all of these components already installed. If for some reason you don't have them installed, they are relatively easy to add.
## General System Requirements
- PHP 5.4 or later: [<i class="fa fa-linux"></i>](http://php.net/manual/en/install.unix.debian.php) [<i class="fa fa-windows"></i>](http://www.microsoft.com/web/gallery/install.aspx?appid=PHP54)
- PHP Extensions: MCrypt, Fileinfo, php-pdo, php-mysql, php-mbstring, php-curl
- MySQL or MariaDB
- SSH access to the server (if using Linux)
- GD Library (>=2.0) or Imagick PHP extension (>=6.3.8)
- php-ldap extension (only if using LDAP)
## <i class="fa fa-linux"></i> Requirements Specific to Linux/OSX
- Mod Rewrite
## <i class="fa fa-windows"></i> Requirements Specific to Windows Server
- IIS
- IIS URL Rewrite
- MariaDB 10.0.14 for Windows [64-bit](https://downloads.mariadb.org/interstitial/mariadb-10.0.14/winx64-packages/mariadb-10.0.14-winx64.msi/from/http%3A//mirror.aarnet.edu.au/pub/MariaDB) | [32-bit](https://downloads.mariadb.org/interstitial/mariadb-10.0.14/win32-packages/mariadb-10.0.14-win32.msi/from/http%3A//mirror.aarnet.edu.au/pub/MariaDB)
- [PHP Manager for IIS](http://phpmanager.codeplex.com/) (makes managing PHP on IIS much easier)
- [Composer install with the shell menus](https://getcomposer.org/Composer-Setup.exe)
- [Notepad++](http://www.notepad-plus-plus.org/download/v6.6.6.html) for editing files
+8
View File
@@ -0,0 +1,8 @@
---
currentMenu: search
---
# Search Results
<div id="tipue_search_content"><div class="tipue_search_spinner"><div class="tipue_search_rect1"></div><div class="tipue_search_rect2"></div><div class="rect3"></div></div></div>
+17
View File
@@ -0,0 +1,17 @@
---
currentMenu: security
---
# Some Notes on Security
Snipe-IT was built with security in mind. We utilize bcrypt to handle passwords, which is an adaptive hash function based on the Blowfish symmetric block cipher cryptographic algorithm. Additionally, the software is designed in such a way to prevent brute forcing the password, with IP addresses and usernames locked out for 10 minutes after a specified number of login attempts.
## Additional Security
Although this is web-based software and must run on a web server, you may want to consider whether you actually need it accessible to the outside world. Running it on an internal network with ports closed to the outside world, or on AWS using a security group that prevents access from outside a selected static IP range (like your company network IP), may be something to consider.
While most use cases won't be storing Personally Identifiable Information (PII), someone with the right motivation could gain useful knowledge about the number of employees, types of assets, etc you maintain. While this information in and of itself isn't harmful, it could be helpful to Bad Guys in a targeted attack, so you should consider whether you want to limit access to it via IP or network rules.
Also, running Snipe-IT over SSL is not required, but a good idea. (Running everything ever over SSL is a good idea at this point.)
There are some optional configuration options that you can enable if you run Snipe-IT over HTTPS, such as <a href="http://docs.snipeitapp.com/installation/configuration.html#optional-set-cookies-to-https-only">enabling HTTPS-only cookies</a>, and setting your <a href="http://docs.snipeitapp.com/installation/configuration.html#optional-set-your-htaccess-to-redirect-to-ssl">`.htaccess` to redirect to the HTTPS version</a>.
+12
View File
@@ -0,0 +1,12 @@
---
currentMenu: translations
---
# Translations!
If you're not a coder but want to give back to the project and you're fluent in other languages, consider helping out with the translations. We use the [CrowdIn](https://crowdin.com) localization platform to manage translations, and it makes it super-simple for you to add translations to the project without messing with code. Check out [the Snipe-IT CrowdIn translation project here](https://crowdin.com/project/snipe-it/).
We currently have English, Spanish, German, Korean and Brazilian Portuguese completed, and are looking for more!
If you'd like to translate Snipe-IT into a language that we don't currently offer, simply let us know via the CrowdIn platform or by [creating an issue on Github](https://github.com/snipe/snipe-it/issues) and we'll get that set up for you.
**Please do not submit pull requests with language files directly to the repository. The CrowdIn platform allows us to make sure all of language files are in sync between versions and releases, so we only accept translations through the CrowdIn platform.**
+32
View File
@@ -0,0 +1,32 @@
---
currentMenu: upgrading
---
# Upgrading
Updating Snipe-IT should be pretty straightforward. Simply pull down the newest release, copy the files over, and run whatever commands the release notes specify. Your configuration files wont be overwritten, since you had to copy them over from the example configs, and your version isnt in version control.
You may want to backup the `app/config/app.php` file however, as that one file will be overwritten. If you forget to back it up, it's not usually a big deal, just go back in after upgrading and set your timezone back to the one you had before.
__Always backup your database and configuration files before upgrading.__ We try very hard to make sure that all database changes are non-destructive, but you should always backup beforehand anyway. You will never regret backing up your database. You may regret not doing so, so its just better to get into the habit.
If you dont plan on contributing code to Snipe-IT, you should always grab the latest stable release from the releases page, and avoid using the `develop` or `master` branches.
Whenever you pull down a new version from master or develop, or when you grab the latest official release, make sure to run the following commands via command line:
```
php composer.phar install --no-dev --prefer-source
php composer.phar dump-autoload
php artisan migrate
```
(Developers should remove the `--no-dev` flag, so they have unit test frameworks and debugging tools.)
Forgetting to run these commands can mean your DB might end up out of sync with the new files you just pulled, or you may have some funky cached autoloader values.
Its a good idea to get into the habit of running these every time you pull anything new down. If there are no database changes to migrate, it won't hurt anything to run migrations anyway, youll just see "Nothing to migrate".
In some cases, it can help to delete the contents (just the contents, not the directories themselves) of `app/storage/cache` and `app/storage/views`.
If you have any issues upgrading, check the [common issues](common-issues.html) page for a fix. If you dont see your issue listed there, open an issue on Github and well try to get you sorted out. Be sure to provide the information outlined in the [Getting Help](getting-help.html) section of this site so that we have the info we need to assist you.
IMPORTANT: If youre upgrading from `v.0.3.0-alpha` or earlier, make sure to update your hostname information in `bootstrap/start.php`, per the new requirements in Laravel 4.1.