Martes, Oktubre 10, 2017

Snipe IT Installation Guide

Snipe IT Installation Guide






Snipe-IT is a free and open source web application for IT assets management. It is written on the Laravel 5.2 framework and uses MySQL to store its data. Snipe-IT is a complete and comprehensive solution for assets management, software license management, and much more.
In this tutorial, you will learn to install Snipe-IT on Ubuntu 16.10.
Step 1: System update
Before installing any packages on the Ubuntu server instance, it is recommended to update the system. Log in using the sudo user and run the following commands to update the system.
sudo apt-get update
sudo apt-get -y upgrade
Step 2: Install Apache web server
sudo apt-get -y install apache2
Start Apache and enable it to automatically run at boot time.
sudo systemctl start apache2
sudo systemctl enable apache2


Step 3: Install PHP 5.6
Snipe-IT is compatible with any version of PHP greater than 5.5.9. Since PHP 5.5 has reached end of life, you can install PHP 7. Run the following command to install PHP 7 with the modules required by Snipe-IT.
sudo apt-get -y install php php-pdo php-mbstring php-tokenizer php-curl php-mysql php-ldap php-zip php-fileinfo php-gd php-dom php-mcrypt
Step 4: Install MariaDB
MariaDB is a fork of MySQL. Install it using following command.
sudo apt-get -y install mariadb-server
Start MariaDB and enable it to automatically start at boot time.
sudo systemctl start mysql
sudo systemctl enable mysql
Secure your MariaDB installation.
sudo mysql_secure_installation
You will be asked for the current MariaDB root password. As we have just installed MariaDB, its root password has not been set. Press the enter key to proceed. Set a strong root password for your MariaDB server and answer Y to all of the other questions asked. The questions asked are self explanatory.
Step 5: Create database for Snipe-IT
Log into the MariaDB shell as its root user using the following command.
mysql -u root -p
Provide the password for the MariaDB root user.
Run the following queries to create a database and a database user for Snipe-IT.
CREATE DATABASE snipeit_data;
CREATE USER 'snipeit_user'@'localhost' IDENTIFIED BY 'rc@nys';
GRANT ALL PRIVILEGES ON snipeit_data.* TO 'snipeit_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Make sure that you use a semicolon at the end of each query above. You can replace the database name "snipeit_data" and username "snipeit_user" according to your needs. Be sure to change "StrongPassword" to a very strong password.
Step 6: Install Composer
Install Composer using the following command. Composer is a dependency manager for PHP.
cd ~
curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer
Step 7: Install Snipe-IT
First, install Git.
sudo apt-get -y install git
Switch to Apache's web-root folder and clone the latest version of Snipe-IT.
cd /var/www/html
sudo git clone https://github.com/snipe/snipe-it snipe-it
Create the .env file from example file provided.
cd /var/www/html/snipe-it
sudo cp .env.example .env
Edit the .env file.
sudo nano .env
Find the following lines and edit the values according to instructions provided.
APP_URL=http://snipe.arcanys.com
APP_TIMEZONE='Asia/Manila'
DB_DATABASE=snipeit_data
DB_USERNAME=snipeit_user
DB_PASSWORD=rc@nys
Leave the default values for all of the other parameters. Save the file and exit the text editor.
Provide the appropriate ownership and file permissions.
sudo chown -R www-data:www-data storage public/uploads
sudo chmod -R 755 storage
sudo chmod -R 755 public/uploads
Install PHP dependencies using Composer.
sudo composer install --no-dev --prefer-source
Generate the "APP_Key".
sudo php artisan key:generate
Allow HTTP traffic on port 80 through the firewall.
sudo firewall-cmd --zone=public --permanent --add-service=http
sudo firewall-cmd --reload
Step 8: Create virtual host
Run the following command to create a virtual host for your Snipe-IT site.
sudo nano /etc/apache2/sites-available/snipeit.arcanys.com.conf
Add the following lines into the file, then save the file.
<VirtualHost *:80>
   ServerName snipeit.example.com
   DocumentRoot /var/www/html/snipe-it/public
   <Directory /var/www/html/snipe-it/public>
       Options Indexes FollowSymLinks MultiViews
       AllowOverride All
       Order allow,deny
       allow from all
   </Directory>
</VirtualHost>
Activate the configuration and enable mod_rewrite using the following commands.
sudo a2ensite snipeit.example.com.conf
sudo a2enmod rewrite
Restart Apache.
sudo systemctl restart apache2
Step 9: Finish installation
Your Snipe-IT installation is now complete. You can finish configuring Snipe-IT through your web browser. Navigate to the following link snipe.arcanys.com
http://snipe.arcanys.com

Reference :








Current running .env (Config file  /var/www/html/snipe-it/.env)
# --------------------------------------------
# REQUIRED: BASIC APP SETTINGS
# --------------------------------------------
APP_ENV=production
APP_DEBUG=false
APP_KEY=base64:gmgfsD69w5ZwrqV2+O4QuHrMdL5WANVtyeXarwLiX+E=
APP_URL='http://snipe.arcanys.com'
APP_TIMEZONE='Asia/Manila'
APP_LOCALE=en


# --------------------------------------------
# REQUIRED: DATABASE SETTINGS
# --------------------------------------------
DB_CONNECTION=mysql
DB_HOST=localhost
DB_DATABASE=snipeit_data
DB_USERNAME=snipeit_user
DB_PASSWORD=rc@nys
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







LDAP Settings (Admin > Settings)



Walang komento:

Mag-post ng isang Komento

Snipe IT Installation Guide

Snipe IT Installation Guide Snipe-IT is a free and open source web application for IT assets management. It is written on the Laravel 5...