<?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>installComposer &#8211; Best DevOps</title>
	<atom:link href="https://www.bestdevops.com/tag/installcomposer/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.bestdevops.com</link>
	<description>Lets Learn, Do it &#38; Share! Thats a Best DevOps!!!</description>
	<lastBuildDate>Fri, 06 Aug 2021 06:56:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.3</generator>
	<item>
		<title>Install composer using CLI in ubuntu (Globally)</title>
		<link>https://www.bestdevops.com/install-composer-using-cli-in-ubuntu-globally/</link>
		
		<dc:creator><![CDATA[pradeep]]></dc:creator>
		<pubDate>Fri, 06 Aug 2021 06:56:12 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[composer]]></category>
		<category><![CDATA[installComposer]]></category>
		<category><![CDATA[installPHPComposer]]></category>
		<category><![CDATA[laravel]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<guid isPermaLink="false">https://www.bestdevops.com/?p=18726</guid>

					<description><![CDATA[Steps For Installing PHP Composer on Ubuntu STEP 1: Update You distribution Enter this command to update the local repository [&#8230;]]]></description>
										<content:encoded><![CDATA[
<h1 class="wp-block-heading">Steps For Installing PHP Composer on Ubuntu</h1>



<h2 class="wp-block-heading">STEP 1: Update You distribution </h2>



<p class="wp-block-paragraph">Enter this command to update the local repository lists.</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">sudo apt-<span class="hljs-keyword">get</span> update</code></span></pre>


<figure class="wp-block-image size-full is-resized"><img fetchpriority="high" decoding="async" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-34.png" alt="" class="wp-image-18727" width="466" height="565" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-34.png 560w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-34-247x300.png 247w" sizes="(max-width: 466px) 100vw, 466px" /><figcaption>Maker sure you get this reading package lists&#8230;. Done Message at the end!</figcaption></figure>



<h2 class="wp-block-heading">STEP 2: Download the Composer Installer</h2>



<p class="wp-block-paragraph">run the below command in your root directory (We are installing composer globally)</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">php -r <span class="hljs-string">"copy('https://getcomposer.org/installer', 'composer-setup.php');"</span></code></span></pre>


<h2 class="wp-block-heading">Step 3: Verify Integrity of the Download</h2>



<p class="wp-block-paragraph">1. Visit the <a href="https://composer.github.io/pubkeys.html" target="_blank" rel="noreferrer noopener">Composer Public Keys</a> page. Copy the Installer Signature (SHA-384).<br>2. Set the code shell variable:</p>



<p class="wp-block-paragraph"><strong>COMPOSER=48e3236262b34d30969dca3c37281b3b4bbe3221bda826ac6a9a62d6444cdb0dcd0615698a5cbe587c3f0fe57a54d8f5</strong><br>3. Run the script below to compare the official hash against the one you downloaded:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">php -r <span class="hljs-string">"if (hash_file('SHA384', 'composer-setup.php') === '$COMPOSER') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"</span></code></span></pre>


<figure class="wp-block-image size-large"><img decoding="async" width="1024" height="177" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-36-1024x177.png" alt="" class="wp-image-18730" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-36-1024x177.png 1024w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-36-300x52.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-36-768x133.png 768w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-36.png 1315w" sizes="(max-width: 1024px) 100vw, 1024px" /></figure>



<figure class="wp-block-image size-large is-resized"><img decoding="async" src="https://www.bestdevops.com/wp-content/uploads/2021/08/composer-install-1-1024x433.png" alt="" class="wp-image-18728" width="914" height="386" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/composer-install-1-1024x433.png 1024w, https://www.bestdevops.com/wp-content/uploads/2021/08/composer-install-1-300x127.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/08/composer-install-1-768x325.png 768w, https://www.bestdevops.com/wp-content/uploads/2021/08/composer-install-1.png 1328w" sizes="(max-width: 914px) 100vw, 914px" /></figure>



<h2 class="wp-block-heading">Step 4: Install PHP Composer</h2>



<p class="wp-block-paragraph">1. Installing PHP Composer requires curl, unzip, and a few other utilities. Install them by entering the following:</p>


<pre class="wp-block-code"><span><code class="hljs language-javascript">sudo apt-<span class="hljs-keyword">get</span> install curl php-cli php-mbstring git unzip</code></span></pre>


<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="559" height="279" src="https://www.bestdevops.com/wp-content/uploads/2021/08/image-37.png" alt="" class="wp-image-18733" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/image-37.png 559w, https://www.bestdevops.com/wp-content/uploads/2021/08/image-37-300x150.png 300w" sizes="auto, (max-width: 559px) 100vw, 559px" /><figcaption>The process may take a while to complete for additional Downloads and make sure to permit the installation process </figcaption></figure>



<h3 class="wp-block-heading">2. To install to&nbsp;<strong>/usr/local/bin</strong>. enter:</h3>


<pre class="wp-block-code"><span><code class="hljs language-javascript">sudo php composer-setup.php --install-dir=<span class="hljs-regexp">/usr/</span>local/bin --filename=composer</code></span></pre>


<p class="wp-block-paragraph">The installer should output:</p>



<figure class="wp-block-image size-full"><img loading="lazy" decoding="async" width="822" height="113" src="https://www.bestdevops.com/wp-content/uploads/2021/08/composerfinal.png" alt="" class="wp-image-18737" srcset="https://www.bestdevops.com/wp-content/uploads/2021/08/composerfinal.png 822w, https://www.bestdevops.com/wp-content/uploads/2021/08/composerfinal-300x41.png 300w, https://www.bestdevops.com/wp-content/uploads/2021/08/composerfinal-768x106.png 768w" sizes="auto, (max-width: 822px) 100vw, 822px" /><figcaption>Check the composer version by running command composer &#8211;version or composer -v</figcaption></figure>



<p class="wp-block-paragraph">That&#8217;s it hope it helps someone there.</p>



<p class="wp-block-paragraph"></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
