<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SnipeIT Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/snipeit/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Mon, 03 May 2021 16:04:21 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>How to install Snipe-IT on Ubuntu 20.04?</title>
		<link>https://www.osradar.com/install-snipe-it-ubuntu/</link>
					<comments>https://www.osradar.com/install-snipe-it-ubuntu/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Tue, 04 May 2021 23:00:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[SnipeIT]]></category>
		<category><![CDATA[ubuntu]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=29851</guid>

					<description><![CDATA[<p>Hello, friends. In this post, you will learn how to install Snipe-IT on Ubuntu 20.04. This tool will help you with IT-related operations being open source and easy to install. So, This is a FOSS project for asset management in IT Operations. Knowing who has which laptop, when it was purchased in order to depreciate [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-snipe-it-ubuntu/">How to install Snipe-IT on Ubuntu 20.04?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Hello, friends. In this post, you will learn how to install Snipe-IT on Ubuntu 20.04. This tool will help you with IT-related operations being open source and easy to install.</p>



<p>So, <strong><a href="https://snipeitapp.com" target="_blank" rel="noreferrer noopener">This</a> is a FOSS project for asset management in IT Operations</strong>. Knowing who has which laptop, when it was purchased in order to depreciate it correctly, handling software licenses, etc.</p>



<p><a href="https://www.osradar.com/install-laravel-ubuntu-2004/" target="_blank" rel="noreferrer noopener">It is created in Laravel</a> so we are in the presence of a web application created in PHP. This allows you to deploy it on your home server or wherever you want as long as you have the right server.</p>



<p>The application has an Admin Dashboard to have <strong>access to recent activity and an overall view of what assets, accessories, consumables, and components you have.</strong></p>



<p>So, the Items that have been checked in, checked out, recently updated or deleted, show up in a recent activity snapshot.</p>



<h2 id="install-snipe-it-on-ubuntu"><a href="#install-snipe-it-on-ubuntu" name="install-snipe-it-on-ubuntu"></a>Install Snipe-IT on Ubuntu</h2>



<p>As this is a web application, we require certain applications on our server. So to meet this requirement, it is necessary to install the LAMP stack. In it, we will have Apache, PHP, and a database manager called MariaDB. That is, we will have a web server available to install Snipe-IT.</p>



<p>So, read our post <a href="https://www.osradar.com/install-lamp-ubuntu-20-04/" target="_blank" rel="noreferrer noopener">How to install LAMP on Ubuntu 20.04</a> Additionally, install these precise PHP modules for Snipe-IT</p>



<pre class="wp-block-preformatted">sudo apt install php-{opcache,pdo,bcmath,bz2,calendar,ctype,exif,ffi,fileinfo,ftp,gd,iconv,intl,json,mbstring,mysqli,phar,posix,readline,shmop,sockets,sysvmsg,sysvsem,sysvshm,tokenizer,zip,curl,ldap} php7.4-cli git unzip</pre>



<p>This single command will install all the necessary PHP modules as well as the <code>git</code> and <code>unzip</code> packages.</p>



<h3 id="install-composer"><a href="#install-composer" name="install-composer"></a>Install Composer</h3>



<p>Composer is an application to manage PHP dependencies. With Composer we can quickly fulfill the necessary Snipe-IT dependencies on library level without any effort.</p>



<p>So, download and run the Composer installer script</p>



<pre class="wp-block-preformatted">curl -sS https://getcomposer.org/installer | php</pre>



<p>This will generate an executable that we need to move to <code>/usr/local/bin/</code> so we can use it as a system command in any location.</p>



<pre class="wp-block-preformatted">sudo mv composer.phar /usr/local/bin/composer</pre>



<p>With this, we will have the latest stable version of Composer installed on Ubuntu 20.04.</p>



<h3 id="creating-the-database-and-user-for-snipe-it"><a href="#creating-the-database-and-user-for-snipe-it" name="creating-the-database-and-user-for-snipe-it"></a>Creating the Database and User for Snipe-IT</h3>



<p>Like all web applications, Snipe-IT requires a database driver to store the information it generates. As a general rule, it is convenient to create a user different from root.</p>



<p>So, access the MariaDB shell</p>



<pre class="wp-block-preformatted">sudo mysql -u root -p</pre>



<p>And proceed to create the database, the user as well as the corresponding permissions:</p>



<pre class="wp-block-preformatted">CREATE DATABASE snipedb;
CREATE USER 'snipeuser'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON snipedb.* TO 'snipeuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;</pre>



<p>You can replace the values with the ones you need, especially the password value</p>



<h3 id="download-and-install-snipe-it"><a name="download-and-install-snipe-it" href="#download-and-install-snipe-it"></a>Download and install Snipe-IT on Ubuntu</h3>



<p>Now we proceed to download Snipe-IT by cloning its Git repository.</p>



<pre class="wp-block-preformatted">cd /var/www/
sudo git clone https://github.com/snipe/snipe-it snipe-it
Cloning into 'snipe-it'...
remote: Enumerating objects: 102845, done.
remote: Counting objects: 100% (1534/1534), done.
remote: Compressing objects: 100% (985/985), done.
remote: Total 102845 (delta 684), reused 1159 (delta 533), pack-reused 101311
Receiving objects: 100% (102845/102845), 110.88 MiB | 18.48 MiB/s, done.
Resolving deltas: 100% (65841/65841), done.</pre>



<p>This will create a folder called <code>snipe-it</code> which you will need to access.</p>



<pre class="wp-block-preformatted">cd /var/www/snipe-it</pre>



<p>There is a <code>.env.example</code> file that we will have to convert into the application configuration file. To do this, simply rename it.</p>



<pre class="wp-block-preformatted">sudo cp /var/www/snipe-it/.env.example /var/www/snipe-it/.env</pre>



<p>Now you have to edit it, to balance some necessary settings.</p>



<pre class="wp-block-preformatted">sudo nano /var/www/snipe-it/.env</pre>



<p>Among the configurations we will have to set the following ones:</p>



<pre class="wp-block-preformatted">APP_URL=[domain]
APP_TIMEZONE='[timezone]'</pre>



<p>And also the database configuration.</p>



<pre class="wp-block-preformatted">DB_DATABASE=snipedb
DB_USERNAME=snipeuser
DB_PASSWORD=password</pre>



<p>Remember that you have to replace the values with the ones you defined.</p>



<p>When you are ready, save your changes and close the text editor.</p>



<p>Then, make the Snipe-IT folder belong to Apache and assign the correct permissions to it.</p>



<pre class="wp-block-preformatted">sudo chown -R www-data:www-data /var/www/snipe-it
sudo chmod -R 755 /var/www/snipe-it</pre>



<p>Now update Composer.</p>



<pre class="wp-block-preformatted">sudo composer update --no-plugins --no-scripts</pre>



<p>And install all application dependencies.</p>



<pre class="wp-block-preformatted">sudo composer install --no-dev --prefer-source --no-plugins --no-scripts</pre>



<p>As this is an application created with Laravel, it is necessary to generate a key.</p>



<pre class="wp-block-preformatted">sudo php artisan key:generate
**************************************
*     Application In Production!     *
**************************************

 Do you really wish to run this command? (yes/no) [no]:
 > yes

Application key set successfully.</pre>



<p>Now the Snipe-IT packages are installed.</p>



<h3 id="creating-a-virtualhost-for-snipe-it"><a href="#creating-a-virtualhost-for-snipe-it" name="creating-a-virtualhost-for-snipe-it"></a>Creating a VirtualHost for Snipe-IT</h3>



<p>The next step is to create a VirtualHost for best access to Snipe-IT. This will also allow Apache to manage the application with policies that suit your needs.</p>



<p>So, create the file</p>



<pre class="wp-block-preformatted">sudo nano /etc/apache2/sites-available/snipeit.conf</pre>



<p>And add the following content:</p>



<pre class="wp-block-preformatted">&lt;VirtualHost *:80>
    ServerName snipe.osradar.test
    DocumentRoot /var/www/snipe-it/public
    &lt;Directory /var/www/snipe-it/public>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    &lt;/Directory>
&lt;/VirtualHost></pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="978" height="269" src="https://www.osradar.com/wp-content/uploads/2021/05/1-1.png" alt="1.- VirtualHost for Snipe-IT" class="wp-image-29852" srcset="https://www.osradar.com/wp-content/uploads/2021/05/1-1.png 978w, https://www.osradar.com/wp-content/uploads/2021/05/1-1-300x83.png 300w, https://www.osradar.com/wp-content/uploads/2021/05/1-1-768x211.png 768w, https://www.osradar.com/wp-content/uploads/2021/05/1-1-696x191.png 696w" sizes="(max-width: 978px) 100vw, 978px" /><figcaption>1.- VirtualHost for Snipe-IT</figcaption></figure>



<p>Replace <code>ServerName</code> with the name of the domain you have.</p>



<p>Save the changes and close the editor. To apply these changes, enable the <code>rewrite</code> module and restart Apache.</p>



<pre class="wp-block-preformatted">sudo a2ensite snipeit.conf
sudo a2enmod rewrite</pre>



<h3 id="optional:-obtain-a-let's-encrypt-and-enable-https-certificate"><a href="#optional:-obtain-a-let's-encrypt-and-enable-https-certificate" name="optional:-obtain-a-let's-encrypt-and-enable-https-certificate"></a>Optional: Obtain a Let’s Encrypt and Enable HTTPS certificate</h3>



<p>If Snipe-IT will be available from the internet, then the idea would be to secure access via HTTPS.</p>



<p>So, install Certbot and its Apache plugin.</p>



<pre class="wp-block-preformatted">sudo apt-get install certbot python3-certbot-apache</pre>



<p>Now get the certificate by running</p>



<pre class="wp-block-preformatted">sudo certbot --apache</pre>



<p>During the process, you will have to answer some questions and indicate the domain. All very simple.</p>



<p>At the end of the process, restart Apache to apply the changes.</p>



<pre class="wp-block-preformatted">sudo systemctl restart apache2</pre>



<h3 id="complete-the-installation"><a name="complete-the-installation" href="#complete-the-installation"></a>Complete the installation of Snipe-IT on Ubuntu</h3>



<p>Now you can open your web browser and go to <code>https://your-domain</code> and you will see the following screen</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="506" src="https://www.osradar.com/wp-content/uploads/2021/05/2-1-1024x506.png" alt="2.- Installing Snipe-IT on Ubuntu 20.04" class="wp-image-29854" srcset="https://www.osradar.com/wp-content/uploads/2021/05/2-1-1024x506.png 1024w, https://www.osradar.com/wp-content/uploads/2021/05/2-1-300x148.png 300w, https://www.osradar.com/wp-content/uploads/2021/05/2-1-768x379.png 768w, https://www.osradar.com/wp-content/uploads/2021/05/2-1-696x344.png 696w, https://www.osradar.com/wp-content/uploads/2021/05/2-1-1068x528.png 1068w, https://www.osradar.com/wp-content/uploads/2021/05/2-1.png 1354w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>2.- Installing Snipe-IT on Ubuntu 20.04</figcaption></figure>



<p>The server is checked to see if it meets the requirements.</p>



<p>Then, some data will be loaded into the database as well as the table structure.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="502" src="https://www.osradar.com/wp-content/uploads/2021/05/3-1024x502.png" alt="3.- creating the database tables" class="wp-image-29855" srcset="https://www.osradar.com/wp-content/uploads/2021/05/3-1024x502.png 1024w, https://www.osradar.com/wp-content/uploads/2021/05/3-300x147.png 300w, https://www.osradar.com/wp-content/uploads/2021/05/3-768x376.png 768w, https://www.osradar.com/wp-content/uploads/2021/05/3-696x341.png 696w, https://www.osradar.com/wp-content/uploads/2021/05/3-1068x523.png 1068w, https://www.osradar.com/wp-content/uploads/2021/05/3.png 1366w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>3.- creating the database tables</figcaption></figure>



<p>The next step is to create the admin user and configure the program with the default currency and other settings.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="506" src="https://www.osradar.com/wp-content/uploads/2021/05/4-1024x506.png" alt="4.- Creating the default user" class="wp-image-29856" srcset="https://www.osradar.com/wp-content/uploads/2021/05/4-1024x506.png 1024w, https://www.osradar.com/wp-content/uploads/2021/05/4-300x148.png 300w, https://www.osradar.com/wp-content/uploads/2021/05/4-768x379.png 768w, https://www.osradar.com/wp-content/uploads/2021/05/4-696x344.png 696w, https://www.osradar.com/wp-content/uploads/2021/05/4-1068x528.png 1068w, https://www.osradar.com/wp-content/uploads/2021/05/4.png 1354w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>4.- Creating the default user</figcaption></figure>



<p>At the end of the installation, you will go to the Dashboard.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="506" src="https://www.osradar.com/wp-content/uploads/2021/05/5-1024x506.png" alt="5.- Snipe-IT on Ubuntu " class="wp-image-29857" srcset="https://www.osradar.com/wp-content/uploads/2021/05/5-1024x506.png 1024w, https://www.osradar.com/wp-content/uploads/2021/05/5-300x148.png 300w, https://www.osradar.com/wp-content/uploads/2021/05/5-768x379.png 768w, https://www.osradar.com/wp-content/uploads/2021/05/5-696x344.png 696w, https://www.osradar.com/wp-content/uploads/2021/05/5-1068x528.png 1068w, https://www.osradar.com/wp-content/uploads/2021/05/5.png 1354w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>5.- Snipe-IT on Ubuntu </figcaption></figure>



<p>So, enjoy it.</p>



<h2 id="conclusion"><a href="#conclusion" name="conclusion"></a>Conclusion</h2>



<p>Snipe-IT is one of the best in its field. Now you know how to install it step by step and it’s up to you to put this post into practice.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-snipe-it-ubuntu/">How to install Snipe-IT on Ubuntu 20.04?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/install-snipe-it-ubuntu/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
