How to install Snipe-IT on Ubuntu -2018

how-to-install-snipeit-on-Xammp-2018

1-Update your system

sudo apt-get update -y && sudo apt-get upgrade -y

2-Installing Apache2

sudo apt-get install apache2

3-Installing MySQL

sudo apt-get install mysql-server

Now we are also going to secure our installation:

sudo mysql_secure_installation

Enter the root password you entered before.

Now you get asked a couple of questions, answer as below:

Enter current password for root (enter for none): Enter your root password

Would you like to setup VALIDATE PASSWORD plugin? N

Change the password for root? [Y/n] N

Remove anonymous users? [Y/n] {ENTER}

Disallow root login remotely? [Y/n] {ENTER}

Remove test database and access to it? [Y/n] {ENTER}

Reload privilege tables now? [Y/n] {ENTER}

That’s it. Let’s continue with PHP.

5-Installing PHP

sudo apt-get install php libapache2-mod-php php-mysql php-curl php-gd php-intl php-pear php-imagick php-imap php-mcrypt php-memcache php-pspell php-recode php-sqlite3 php-tidy php-xmlrpc php-xsl php-mbstring php-gettext

Let’s restart apache2:

sudo /etc/init.d/apache2 restart  

Then we are going to login with root by typing:

sudo -i 


Next, we are going to download composer: (if curl not install please install it- apt install curl

curl -sS https://getcomposer.org/installer | php   


Then we are going to move composer to another folder:

mv composer.phar /usr/local/bin/composer

cd /var/www/


Alright, time to download snipe-it:(if git not install please install first –apt install git)

git clone https://github.com/snipe/snipe-it snipeit

cd snipeit/

Finally we replace .env.example with .env:

cp .env.example .env

6-Configuring the MySQL Database

mysql -u root -p


Now you need to run a couple of commands, make sure to use the EXACT commands like in the box below, replace “your username” and “yourpw” with your own username and password:

    mysql> create database snipeit;
    mysql> CREATE USER 'yourusername'@'localhost' IDENTIFIED BY 'yourpw';
    mysql> GRANT ALL PRIVILEGES ON snipeit.* TO 'yourusername'@'localhost';
    mysql> flush privileges;
    mysql> exit

7-Editing the .env file

nano .env
ithelpsupport.com
You need to adjust the values according to your server and the database we created earlier. Remember to enter your username and password that you set in step 3.
Don’t worry about the APP_KEY either, we are going to generate that later

8-Adjusting permissions

chown -R www-data:www-data storage public/uploads

chmod -R 775 storage

chmod -R 755 public/uploads

9-Installing PHP dependencies

apt-get install -y git unzip php php-mcrypt php-curl php-mysql php-gd php-ldap php-zip php-mbstring php-xml

apt-get install php-bcmath

10-Installing Composer & generating our App Key

composer install --no-dev --prefer-source

php artisan key:generate

11-Editing configuration files and wrapping up

sudo nano /etc/apache2/sites-available/snipeit.example.com.conf

And paste the text into the box below:

<VirtualHost *:80>
ServerAdmin webmaster@localhost
<Directory /var/www/snipeit/public>
        Require all granted
        AllowOverride All
   </Directory>
    DocumentRoot /var/www/snipeit/public
    ServerName YOURSERVERIP
   #Redirect permanent / https://snipeit.your-server-fqdn.com/
        ErrorLog /var/log/apache2/snipeIT.error.log
        CustomLog /var/log/apache2/access.log combined
</VirtualHost>

Make sure to replace YOURSERVERIP with, well, your server IP.

Press CTRL+O to save and CTRL+X to exit.

sudo a2ensite snipeit.example.com.conf
sudo a2enmod rewrite
sudo systemctl restart apache2


sudo a2dissite 000-default.conf

sudo service apache2 restart

Change directory

cd /etc/apache2/sites-available


sudo cp 000-default.conf 000-default.confTEMP
sudo rm 000-default.conf

Already and finally wrapping it up with:

sudo phpenmod mcrypt
sudo phpenmod mbstring
sudo a2enmod rewrite
sudo service apache2 restart

12-Setup with the Web Browser

Ignore the File Owner warning, this seems to be a bug and will probably be fixed in an update. Click on Next: Create Database Tables.

You will likely get an error:

Don’t panic, just refresh the page by hitting F5

Click on Next: Create User

Finalize everything to your liking, click F5 if you get the error again.

 

And congratulations

5 Comments on “How to install Snipe-IT on Ubuntu -2018”

  1. Hi! I know this is kinda off topic nevertheless I’d figured I’d ask.
    Would you be interested in exchanging links or maybe guest authoring a blog post or vice-versa?
    My site addresses a lot of the same topics as yours and I believe we could greatly benefit
    from each other. If you might be interested feel free to
    shoot me an e-mail. I look forward to hearing from you!
    Awesome blog by the way!

  2. I see you don’t monetize your blog, don’t waste your traffic, you can earn additional bucks every month because you’ve
    got hi quality content. If you want to know how to make extra $$$, search for:
    Ercannou’s essential adsense alternative

  3. Do you mind if I quote a couple of your posts as long as I provide credit and sources back to your website?
    My website is in the very same area of interest as yours and my users would definitely benefit from a lot
    of the information you present here. Please let me know if this
    ok with you. Thanks!

  4. Rüyada uzun yılan görmek; çok eski bir problemin muhabbeti geçecek demektir.

    Yalnız bu muhabbeti siz yapmıyorsunuz yanlış anlaşılmasın. Eskiden sizzinle
    düşmanlığı olan yada sizi kıskanan bir kişi, sizi veya aranızdaki anlaşmazlığı hatırlayacak.
    Ancak merak edece bir durum yok, çünkü problem çoktan kapanıp gitmiş,
    fazla üzerinde durmadan hemen unutacak. Size zarar vermek gibi bir niyeti yok bu kişinin. Eğer
    rüyada ince uzun yılan görmek nedir diye düşünüyorsanız, önceden aranızdaküçük
    bir anlaşmazlık yaşanıp sonradan barıştığınız biri,
    bu olayı hatırlayıp size haksızlık ettiğini fark edip utanacak diye tabir edilir.
    Onu halihazırda affetmişsiniz, ama bu kişi olayı hatırlayıpbiraz pişmanlık duyuyor
    size karşı.

  5. Rüyada uzun yılan görmek; eski bir problemin muhabbeti geçecek demektir.
    Ancak bu muhabbeti siz yapmıyorsunuz yanlış anlaşılmasın. Önceden sizinle düşmanlığı olan yada sizi kıskanan bir
    kişi, sizi veya aranızdaki husumeti hatırlayacak. Fakat merak edilecek
    bir durum yok, çünkü konu çoktan kapanıp gitmiş, fazla üzerinde durmadan hemen unutacak.
    Sizi üzmek gibi bir niyeti kesinlikle yok bu kişinin. Eğer rüyada ince uzun yılan görmek nedir diye merak
    ediyorsanız, önceden aranızda küçük bir anlaşmazlık yaşanıp sonradan barıştığınız bir kişi, bu olayı hatırlayıp size haksızlık ettiğini fark
    edip pişman olacak diye yorumlanır. Bu kişiyi zaten affetmişsiniz, ama bu kişi olayı hatırlayıp biraz pişmanlık duyuyor size karşı.

Leave a Reply

Your email address will not be published. Required fields are marked *