Snipe-IT 3.6.4 on CentOS 6

Requirements here.

PHP 5.5 installation:
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
yum install http://rpms.remirepo.net/enterprise/remi-release-6.rpm
yum install php55.x86_64 php55-php php55-php-pdo php55-php-gd php55-php-mysql php55-php-mcrypt php55-php-common php55-php-mbstring php55-php-pecl-imagick mysql-server.x86_64 php55-php-pecl-zip php55-php-ldap
yum install mod_ssl

Creating a Database and User:
mysql_secure_installation
mysql -u root -p
create database snipeit;
show databases;
create user snipe_user;
grant all on snipeit.* to 'snipe_user'@'localhost' identified by 'YOUR_DB_PASSWORD_HERE';

wget https://github.com/snipe/snipe-it/archive/v3.6.4.tar.gz
tar zxvf snipe-it-3.6.4.tar.gz
mkdir /var/www/snipeit && cp -r snipe-it-3.6.4/* /var/www/snipeit/
cd /var/www/snipeit/
cp .env.example .env

.env file has to be filled out with your data:

vi .env
# --------------------------------------------
# REQUIRED: BASIC APP SETTINGS
# --------------------------------------------
APP_ENV=production
APP_DEBUG=false
APP_KEY=ChangeMe
APP_URL=null
APP_TIMEZONE='UTC'
APP_LOCALE=en

# --------------------------------------------
# REQUIRED: DATABASE SETTINGS
# --------------------------------------------
DB_CONNECTION=mysql
DB_HOST=localhost
DB_DATABASE=null
DB_USERNAME=null
DB_PASSWORD=null
DB_PREFIX=null
DB_DUMP_PATH='/usr/bin'

# --------------------------------------------
# OPTIONAL: SSL DATABASE SETTINGS
# --------------------------------------------
DB_SSL=false
DB_SSL_KEY_PATH=null
DB_SSL_CERT_PATH=null
DB_SSL_CA_PATH=null
DB_SSL_CIPHER=null

# --------------------------------------------
# REQUIRED: OUTGOING MAIL SERVER SETTINGS
# --------------------------------------------
MAIL_DRIVER=smtp
MAIL_HOST=email-smtp.us-west-2.amazonaws.com
MAIL_PORT=587
MAIL_USERNAME=YOURUSERNAME
MAIL_PASSWORD=YOURPASSWORD
MAIL_ENCRYPTION=null
MAIL_FROM_ADDR=you@example.com
MAIL_FROM_NAME='Snipe-IT'
MAIL_REPLYTO_ADDR=you@example.com
MAIL_REPLYTO_NAME='Snipe-IT'

# --------------------------------------------
# REQUIRED: IMAGE LIBRARY
# This should be gd or imagick
# --------------------------------------------
IMAGE_LIB=gd

# --------------------------------------------
# OPTIONAL: SESSION SETTINGS
# --------------------------------------------
SESSION_LIFETIME=12000
EXPIRE_ON_CLOSE=false
ENCRYPT=false
COOKIE_NAME=snipeit_session
COOKIE_DOMAIN=null
SECURE_COOKIES=false

# --------------------------------------------
# OPTIONAL: CACHE SETTINGS
# --------------------------------------------
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

# --------------------------------------------
# OPTIONAL: AWS S3 SETTINGS
# --------------------------------------------
AWS_SECRET=null
AWS_KEY=null
AWS_REGION=null
AWS_BUCKET=null

# --------------------------------------------
# OPTIONAL: LOGIN THROTTLING
# --------------------------------------------
LOGIN_MAX_ATTEMPTS=5
LOGIN_LOCKOUT_DURATION=60

# --------------------------------------------
# OPTIONAL: MISC
# --------------------------------------------
APP_LOG=single
APP_LOCKED=false
FILESYSTEM_DISK=local
APP_TRUSTED_PROXIES=192.168.1.1,10.0.0.1
ALLOW_IFRAMING=false

Detailed information about all options could be found here.

Composer installation:
su - snipeit
cd /var/www/snipeit/
curl -sS https://getcomposer.org/installer | php
php composer.phar install --no-dev --prefer-source

Generate Your App Key:
This should automatically set the APP_KEY value in your .env file for you.
php artisan key:generate

To start installation process just go to your Snipe IT url

Web Server and SSL config:
openssl req -new -x509 -days 1825 -keyout servername.domain.com.key -out servername.domaincom.crt -nodes -subj '/O=Organization/OU=Organization Department/CN=servername.domain.com
cp servername.domain.com.key /etc/pki/tls/private/
chmod 400 /etc/pki/tls/private/servername.domain.com.key
cp servername.domain.com.crt /etc/pki/tls/certs/

vi /var/www/snipeit/public/.htaccess
#Uncomment these lines
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

vi /etc/httpd/conf.d/snipeit.conf:
DocumentRoot /var/www/snipeit/public
ServerName servername.domain.com
SSLEngine On
SSLCertificateFile /etc/pki/tls/certs/servername.domaincom.crt
SSLCertificateKeyFile /etc/pki/tls/private/servername.domain.com.key
Allow From All
AllowOverride All
Options +Indexes

chown -R snipeit:snipeit /var/www/snipeit/
chown -R apache:apache /var/www/snipeit/storage
chown -R apache:apache /var/www/snipeit/public/uploads
chmod -R 755 /var/www/snipeit/storage
chmod -R 755 /var/www/snipeit/public/uploads/

LDAP Settings:
LDAP Integration - LDAP enabled
Active Directory - This is an Active Directory server
LDAP Password Sync - Yes
Active Directory domain - domain.com
LDAP Server ldap://servername.domain.com
LDAP Bind Username - readonlyuser@domain.com
Base Bind DN - OU=Users,OU=SomeOU,DC=domain,DC=com
#Request only enabled users
LDAP Filter - &(sAMAccountType=805306368)(!(userAccountControl:1.2.840.113556.1.4.803:=2))
Username Field - samaccountname
Last Name - sn
LDAP First Name - givenname
LDAP Authentication query - samaccountname=
LDAP Version - 3
LDAP Email - mail

Links: https://snipe-it.readme.io/docs
https://snipe-it.readme.io/v3.6.2/docs/ldap-sync-login

Leave a comment

You must be logged in to post a comment.