<?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>composer Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/composer/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Sun, 03 Oct 2021 23:14:12 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.13</generator>
	<item>
		<title>Install PHP Composer on Debian 11</title>
		<link>https://www.osradar.com/install-php-composer-debian/</link>
					<comments>https://www.osradar.com/install-php-composer-debian/#respond</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Fri, 01 Oct 2021 23:57:00 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bullseye]]></category>
		<category><![CDATA[Buster]]></category>
		<category><![CDATA[composer]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=32488</guid>

					<description><![CDATA[<p>Hello friends. For many PHP Composer developers is an essential tool in their daily work. So if you are a PHP developer or you are just starting with this, you should know how to install PHP Composer on Debian 11. The process is really simple but it’s never too much to have it at hand. [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-php-composer-debian/">Install PHP Composer on Debian 11</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="has-line-data">Hello friends. For many PHP Composer developers is an essential tool in their daily work. So if you are a PHP developer or you are just starting with this, you should know how to install PHP Composer on Debian 11. The process is really simple but it’s never too much to have it at hand.</p>



<h2 class="code-line"><a id="What_is_Composer_2"></a>What is Composer?</h2>



<p class="has-line-data"><strong><a href="https://getcomposer.org/" target="_blank" rel="noreferrer noopener">Composer </a>is a project dependency manager for PHP programming.</strong> That means that it allows us to manage, i.e. specify, download, and keep up to date, the software packages or dependencies on which our PHP project is based.</p>



<p class="has-line-data">The reason for using it is that when you develop a PHP application it requires functionality that is not in the default PHP libraries. That is, you have to add others for your project to work or to be able to be carried out.</p>



<p class="has-line-data">So, when you start the project you have to go to the page of each of the software components that you want to use, download them, copy them to the folder of your project. This is a bit torturous because at some point these libraries will be updated and then you have to start this process all over again.</p>



<p class="has-line-data">Composer was born to avoid this. Because just by defining the right dependencies, <strong>Composer will download them and add them to your project in a matter of seconds</strong>. And if they are updated, it only takes a minimal effort or command to update them. All without wasting time and in an orderly fashion.</p>



<p class="has-line-data">So, let’s get started.</p>



<h2 class="code-line"><a id="Install_PHP_Composer_on_Debian_11_14"></a>Install PHP Composer on Debian 11</h2>



<p class="has-line-data">As we can guess, one of the main requirements is to have PHP installed on the system. This shouldn’t be a problem because PHP is present in the Debian 11 repositories and is quite lightweight.</p>



<p class="has-line-data">So, open a terminal and as usual update the distribution.</p>



<pre class="wp-block-preformatted">sudo apt update
sudo apt upgrade</pre>



<p class="has-line-data">Then, you can install PHP in case you don’t have it.</p>



<pre class="wp-block-preformatted">sudo apt install php</pre>



<p class="has-line-data">Note: If you don’t have <code>sudo</code> available then you have to run these commands as root. Also, you can enable it by reading our post about it.</p>



<p class="has-line-data">Now to install Composer on the system, you have to run this single command</p>



<pre class="wp-block-preformatted">php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"</pre>



<p class="has-line-data">This command downloads and “compiles” the Composer installer for us.</p>



<p class="has-line-data">Then install it in a directory that is in our PATH so that we can use it throughout the system. Also, you have to give it run permissions.</p>



<pre class="wp-block-preformatted">sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
sudo chmod +x /usr/local/bin/composer</pre>



<p class="has-line-data">Then, verify the installed version by running</p>



<pre class="wp-block-preformatted">composer --version
composer version 2.1.8 2021-09-15 13:55:14</pre>



<h3 class="code-line"><a id="Using_PHP_Composer_on_Debian_11_45"></a>Using PHP Composer on Debian 11</h3>



<p class="has-line-data">Before using Composer it is always advisable to upgrade to the latest version. This process can be done by running</p>



<pre class="wp-block-preformatted">composer self-update</pre>



<p class="has-line-data">If you already have the latest stable version, you will get an output screen like this</p>



<pre class="wp-block-preformatted">You are already using the latest available Composer version 2.1.8 (stable channel)</pre>



<p class="has-line-data">Composer works with a file called <code>composer.json</code> which is where the project dependencies are stored. To add one you can visit <a href="https://packagist.org/" target="_blank" rel="noreferrer noopener">packagist </a>to find one you need.</p>



<p class="has-line-data">For example, I will add <code>sebastian/comparator</code> with the command</p>



<pre class="wp-block-preformatted">composer require sebastian/comparator</pre>



<p class="has-line-data">Just like that, Composer recognizes the dependency, downloads it along with its dependencies, and installs them for our project that we just need to use. And so on with each of the dependencies you need.</p>



<p class="has-line-data">To update the versions of the dependencies of your project run</p>



<pre class="wp-block-preformatted">composer update</pre>



<p class="has-line-data">Or you can update a single one</p>



<pre class="wp-block-preformatted">composer update sebastian/comparator</pre>



<p class="has-line-data">Also, you can update several at once.</p>



<p class="has-line-data">To remove a dependency, just run</p>



<pre class="wp-block-preformatted">composer remove sebastian/comparator</pre>



<p class="has-line-data">So you can use Composer on Debian 11 in a basic but useful way.</p>



<h2 class="code-line"><a id="Conclusion_79"></a>Conclusion</h2>



<p class="has-line-data">In this post, we have covered the installation of PHP Composer on Debian 11 and a small introduction to its particular usage. This tool has become indispensable for many developers so it is not surprising that it is popular.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/install-php-composer-debian/">Install PHP Composer on Debian 11</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-php-composer-debian/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How To Install PHP Composer on CentOS 8</title>
		<link>https://www.osradar.com/how-to-install-php-composer-on-centos-8/</link>
					<comments>https://www.osradar.com/how-to-install-php-composer-on-centos-8/#respond</comments>
		
		<dc:creator><![CDATA[sabi]]></dc:creator>
		<pubDate>Tue, 31 Dec 2019 09:08:00 +0000</pubDate>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[composer]]></category>
		<category><![CDATA[composer installation on centos 8]]></category>
		<category><![CDATA[how to install php composer on centos 8]]></category>
		<category><![CDATA[linux composer install guide]]></category>
		<category><![CDATA[php installation]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=16938</guid>

					<description><![CDATA[<p>Introduction: Composer is a php application package manager created to provide a standard format for managing dependencies of PHP Software and required libraries. It is very helpful when you want to manage and integrate external packages into your PHP projects. Install Composer on CentOS 8 After basic intro, we are going to start the actual [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-php-composer-on-centos-8/">How To Install PHP Composer on CentOS 8</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<h2><strong>Introduction:</strong></h2>



<p>Composer is a php application package manager created to provide a standard format for managing dependencies of PHP Software and required libraries. It is very helpful when you want to manage and integrate external packages into your PHP projects.</p>



<h3><strong>Install Composer on CentOS 8</strong></h3>



<p>After basic intro, we are going to start the actual installation of Composer on CentOS Operating System. Just follow the below steps to make installation easy.</p>



<h3><strong>Step 1: Installing PHP</strong></h3>



<p>Run the below command to install php in your local system if it is already not installed.</p>



<pre class="wp-block-verse">sudo dnf install @php</pre>



<p>Confirm installation by typing command</p>



<pre class="wp-block-verse">sabi@localhost ~]$ php -version<br>PHP 7.2.11 (cli) (built: Oct  9 2018 15:09:36) ( NTS )<br>Copyright (c) 1997-2018 The PHP Group<br>Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies</pre>



<p>If you don&#8217;t know how to install PHP follow the below link</p>



<p><a href="https://www.osradar.com/install-php-7-3-centos-8/">How To Install php on CentOS 8</a></p>



<h3><strong>Step 2: Downloading Composer Installer</strong></h3>



<p>You can easily download the php composer installer package by running</p>



<pre class="wp-block-verse">sudo dnf -y install wget<br>wget https://getcomposer.org/installer -O composer-installer.php</pre>



<h3><strong>Step 3: Installing PHP Composer on CentOS 8</strong></h3>



<p>After downloading the installer, install the composer on your Linux machine by running below command</p>



<pre class="wp-block-verse">sudo php composer-installer.php --filename=composer --install-dir=/usr/local/bin </pre>



<p>You&#8217;ll see the output similar to the below:</p>



<pre class="wp-block-verse">All settings correct for using Composer<br>Downloading…<br>Composer (version 1.9.1) successfully installed to: /usr/local/bin/composer<br>Use it: php /usr/local/bin/composer</pre>



<p>You can verify your installation by checking version of composer</p>



<pre class="wp-block-verse">composer --version</pre>



<p>Run the <strong>composer </strong>command to check the usage page</p>



<pre class="wp-block-verse">$ composer<br> Composer version 1.9.1 2019-12-21 17:19:34<br> Usage:<br>   command [options] [arguments]<br> Options:<br>   -h, --help                     Display this help message<br>   -q, --quiet                    Do not output any message<br>   -V, --version                  Display this application version<br>       --ansi                     Force ANSI output<br>       --no-ansi                  Disable ANSI output<br>   -n, --no-interaction           Do not ask any interactive question<br>       --profile                  Display timing and memory usage information<br>       --no-plugins               Whether to disable plugins.<br>   -d, --working-dir=WORKING-DIR  If specified, use the given directory as working directory.<br>       --no-cache                 Prevent use of the cache<br>   -v|vv|vvv, --verbose           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug<br> Available commands:<br>   about                Shows the short information about Composer.<br>   archive              Creates an archive of this composer package.<br>   browse               Opens the package's repository URL or homepage in your browser.<br>   check-platform-reqs  Check that platform requirements are satisfied.<br>   clear-cache          Clears composer's internal package cache.<br>   clearcache           Clears composer's internal package cache.<br>   config               Sets config options.<br>   create-project       Creates new project from a package into given directory.<br>   depends              Shows which packages cause the given package to be installed.<br>   diagnose             Diagnoses the system to identify common errors.<br>   dump-autoload        Dumps the autoloader.<br>   dumpautoload         Dumps the autoloader.<br>   exec                 Executes a vendored binary/script.<br>   global               Allows running commands in the global composer dir ($COMPOSER_HOME).<br>   help                 Displays help for a command<br>   home                 Opens the package's repository URL or homepage in your browser.<br>   i                    Installs the project dependencies from the composer.lock file if present, or falls back on the composer.json.<br>   info                 Shows information about packages.<br>   init                 Creates a basic composer.json file in current directory.<br>   install              Installs the project dependencies from the composer.lock file if present, or falls back on the composer.json.<br>   licenses             Shows information about licenses of dependencies.<br>   list                 Lists commands<br>   outdated             Shows a list of installed packages that have updates available, including their latest version.<br>   prohibits            Shows which packages prevent the given package from being installed.<br>   remove               Removes a package from the require or require-dev.<br>   require              Adds required packages to your composer.json and installs them.<br>   run                  Runs the scripts defined in composer.json.<br>   run-script           Runs the scripts defined in composer.json.<br>   search               Searches for packages.<br>   self-update          Updates composer.phar to the latest version.<br>   selfupdate           Updates composer.phar to the latest version.<br>   show                 Shows information about packages.<br>   status               Shows a list of locally modified packages, for packages installed from source.<br>   suggests             Shows package suggestions.<br>   u                    Upgrades your dependencies to the latest version according to composer.json, and updates the composer.lock file.<br>   update               Upgrades your dependencies to the latest version according to composer.json, and updates the composer.lock file.<br>   upgrade              Upgrades your dependencies to the latest version according to composer.json, and updates the composer.lock file.<br>   validate             Validates a composer.json and composer.lock.<br>   why                  Shows which packages cause the given package to be installed.<br>   why-not              Shows which packages prevent the given package from being installed.</pre>



<p>You have finished Installing Composer on CentOS 8</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-php-composer-on-centos-8/">How To Install PHP Composer on CentOS 8</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/how-to-install-php-composer-on-centos-8/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to install Composer on Windows 10</title>
		<link>https://www.osradar.com/how-to-install-composer-on-windows-10/</link>
					<comments>https://www.osradar.com/how-to-install-composer-on-windows-10/#respond</comments>
		
		<dc:creator><![CDATA[roger]]></dc:creator>
		<pubDate>Sun, 15 Dec 2019 01:14:35 +0000</pubDate>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[Desktop]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Servers]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[apache web server]]></category>
		<category><![CDATA[composer]]></category>
		<category><![CDATA[composer windows 10]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=16649</guid>

					<description><![CDATA[<p>Composer is an application-level package manager for the PHP programming language. Its main function is to manage or administer all those libraries that a project needs. This way you don&#8217;t have to download it one by one from the provider&#8217;s website. Additionally, it provides a standard format for managing PHP software dependencies and required libraries. [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-composer-on-windows-10/">How to install Composer on Windows 10</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p>Composer is an application-level package manager for the PHP programming language. Its main function is to manage or administer all those libraries that a project needs. This way you don&#8217;t have to download it one by one from the provider&#8217;s website. Additionally, it provides a standard format for managing PHP software dependencies and required libraries. In other words, it allows you to download packages from a repository to add them to your project, as well as dependencies that have such packages. Consequently, being a very useful tool, let&#8217;s see how to install Composer in Windows 10.</p>



<h2>Prerequisite</h2>



<p>It is essential to have a web server installed. In this case, we will work with <a rel="noreferrer noopener" aria-label="Apache (opens in a new tab)" href="https://www.osradar.com/how-to-install-apache-on-windows-10/" target="_blank">Apache</a>. You must also have <a rel="noreferrer noopener" aria-label="PHP (opens in a new tab)" href="https://www.osradar.com/how-to-install-php-in-windows-10/" target="_blank">PHP</a> installed. In the links I just provided you explain in detail how to install each one.</p>



<h2>Downloading Composer</h2>



<p>To download Composer just go to its official website, and <a rel="noreferrer noopener" aria-label="download (opens in a new tab)" href="https://getcomposer.org/download/" target="_blank">download</a> the latest version. To download Composer just go to its official website, and download the latest version of Composer Setup. </p>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="728" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/12/comp-2.jpg" alt="Download the latest version of Composer Setup." class="wp-image-16653" srcset="https://www.osradar.com/wp-content/uploads/2019/12/comp-2.jpg 1024w, https://www.osradar.com/wp-content/uploads/2019/12/comp-2-300x213.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/12/comp-2-768x546.jpg 768w, https://www.osradar.com/wp-content/uploads/2019/12/comp-2-100x70.jpg 100w, https://www.osradar.com/wp-content/uploads/2019/12/comp-2-696x495.jpg 696w, https://www.osradar.com/wp-content/uploads/2019/12/comp-2-591x420.jpg 591w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Download the latest version of Composer Setup.</figcaption></figure>



<p>This file installs the application and then adds the corresponding environment variable. Once downloaded, just run it. Forthwith, the wizard will present two types of normal installation or developer mode. The installation is the most common and includes an uninstaller. The developer version provides absolute control over the wizard and does not include an uninstaller. For purposes of this post, use the normal version: </p>



<figure class="wp-block-image size-large"><img loading="lazy" width="644" height="470" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/12/comp2.jpg" alt="Use the normal version of Setup" class="wp-image-16654" srcset="https://www.osradar.com/wp-content/uploads/2019/12/comp2.jpg 644w, https://www.osradar.com/wp-content/uploads/2019/12/comp2-300x219.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/12/comp2-324x235.jpg 324w, https://www.osradar.com/wp-content/uploads/2019/12/comp2-575x420.jpg 575w" sizes="(max-width: 644px) 100vw, 644px" /><figcaption>Use the normal version of Setup</figcaption></figure>



<p>The wizard then indicates the path of the php installed in the system.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="644" height="475" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/12/comp3.jpg" alt="Choose the php command line" class="wp-image-16657" srcset="https://www.osradar.com/wp-content/uploads/2019/12/comp3.jpg 644w, https://www.osradar.com/wp-content/uploads/2019/12/comp3-300x221.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/12/comp3-80x60.jpg 80w, https://www.osradar.com/wp-content/uploads/2019/12/comp3-569x420.jpg 569w" sizes="(max-width: 644px) 100vw, 644px" /><figcaption>Choose the php command line</figcaption></figure>



<p>The wizard then verifies the operation of the php command line.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="644" height="475" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/12/comp4.jpg" alt="Checking PHP" class="wp-image-16659" srcset="https://www.osradar.com/wp-content/uploads/2019/12/comp4.jpg 644w, https://www.osradar.com/wp-content/uploads/2019/12/comp4-300x221.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/12/comp4-80x60.jpg 80w, https://www.osradar.com/wp-content/uploads/2019/12/comp4-569x420.jpg 569w" sizes="(max-width: 644px) 100vw, 644px" /><figcaption>Checking PHP</figcaption></figure>



<p>The composer installation wizard is very intuitive.  As a matter of fact, for php to work properly, a php.ini file is required. So, if this file is not present, the installation will show an error. But don&#8217;t worry, the wizard will detect the failure and offer to create the file php.ini.  </p>



<figure class="wp-block-image size-large"><img loading="lazy" width="644" height="475" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/12/comp5.jpg" alt="Creating the php.ini file" class="wp-image-16661" srcset="https://www.osradar.com/wp-content/uploads/2019/12/comp5.jpg 644w, https://www.osradar.com/wp-content/uploads/2019/12/comp5-300x221.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/12/comp5-80x60.jpg 80w, https://www.osradar.com/wp-content/uploads/2019/12/comp5-569x420.jpg 569w" sizes="(max-width: 644px) 100vw, 644px" /><figcaption>Creating the php.ini file</figcaption></figure>



<p>Then edit the network configuration. Specifically, the information about a proxy server. If you don&#8217;t use it, then don&#8217;t tick the box and continue the installation.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="644" height="475" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/12/comp6.jpg" alt="Specify the type of connection" class="wp-image-16663" srcset="https://www.osradar.com/wp-content/uploads/2019/12/comp6.jpg 644w, https://www.osradar.com/wp-content/uploads/2019/12/comp6-300x221.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/12/comp6-80x60.jpg 80w, https://www.osradar.com/wp-content/uploads/2019/12/comp6-569x420.jpg 569w" sizes="(max-width: 644px) 100vw, 644px" /><figcaption>Specify the type of connection</figcaption></figure>



<p>Once the previous settings have been made, the wizard will start the installation of Composer in the system.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="644" height="475" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/12/comp7.jpg" alt="Preconfigurations complete" class="wp-image-16665" srcset="https://www.osradar.com/wp-content/uploads/2019/12/comp7.jpg 644w, https://www.osradar.com/wp-content/uploads/2019/12/comp7-300x221.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/12/comp7-80x60.jpg 80w, https://www.osradar.com/wp-content/uploads/2019/12/comp7-569x420.jpg 569w" sizes="(max-width: 644px) 100vw, 644px" /><figcaption>Preconfigurations complete</figcaption></figure>



<p>After installing Composer, the wizard warns that it is necessary to open a new window to run the program. </p>



<figure class="wp-block-image size-large"><img loading="lazy" width="644" height="475" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/12/comp8.jpg" alt="Information before the first use of Composer." class="wp-image-16666" srcset="https://www.osradar.com/wp-content/uploads/2019/12/comp8.jpg 644w, https://www.osradar.com/wp-content/uploads/2019/12/comp8-300x221.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/12/comp8-80x60.jpg 80w, https://www.osradar.com/wp-content/uploads/2019/12/comp8-569x420.jpg 569w" sizes="(max-width: 644px) 100vw, 644px" /><figcaption>Information before the first use of Composer.</figcaption></figure>



<p>Finally, the assistant has finished his work and Composer was successfully installed in the system.</p>



<figure class="wp-block-image size-large"><img loading="lazy" width="644" height="475" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/12/comp9.jpg" alt="Composer installation completed" class="wp-image-16668" srcset="https://www.osradar.com/wp-content/uploads/2019/12/comp9.jpg 644w, https://www.osradar.com/wp-content/uploads/2019/12/comp9-300x221.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/12/comp9-80x60.jpg 80w, https://www.osradar.com/wp-content/uploads/2019/12/comp9-569x420.jpg 569w" sizes="(max-width: 644px) 100vw, 644px" /><figcaption>Composer installation completed</figcaption></figure>



<h2>Testing Composer</h2>



<p>As mentioned above, the Composer installer adds the variable environment automatically. So to test the installation of the program, please open a Command Prompt and execute the following command:</p>



<pre class="wp-block-preformatted">composer --version</pre>



<figure class="wp-block-image size-large"><img loading="lazy" width="1024" height="728" src="//1723336065.rsc.cdn77.org/wp-content/uploads/2019/12/comp10.jpg" alt="Checking Composer version" class="wp-image-16670" srcset="https://www.osradar.com/wp-content/uploads/2019/12/comp10.jpg 1024w, https://www.osradar.com/wp-content/uploads/2019/12/comp10-300x213.jpg 300w, https://www.osradar.com/wp-content/uploads/2019/12/comp10-768x546.jpg 768w, https://www.osradar.com/wp-content/uploads/2019/12/comp10-100x70.jpg 100w, https://www.osradar.com/wp-content/uploads/2019/12/comp10-696x495.jpg 696w, https://www.osradar.com/wp-content/uploads/2019/12/comp10-591x420.jpg 591w" sizes="(max-width: 1024px) 100vw, 1024px" /><figcaption>Checking Composer version</figcaption></figure>



<p>As can be seen, we have seen how to install Composer on Windows 10. This tool facilitates the development process using the php language. I hope you enjoyed this tutorial. Please share on your social networks.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-composer-on-windows-10/">How to install Composer on Windows 10</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/how-to-install-composer-on-windows-10/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to install Composer on Linux?</title>
		<link>https://www.osradar.com/how-to-install-composer-on-linux/</link>
					<comments>https://www.osradar.com/how-to-install-composer-on-linux/#comments</comments>
		
		<dc:creator><![CDATA[angeloma]]></dc:creator>
		<pubDate>Mon, 17 Jun 2019 23:06:48 +0000</pubDate>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[composer]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorial]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=12413</guid>

					<description><![CDATA[<p>In this post, I will tell you about a very useful tool for web developers. Especially those who use PHP as the main language for their applications. This is Composer which is a very light dependency manager and easy to use. So, in this post, you will learn how to install Composer on Linux. What [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-composer-on-linux/">How to install Composer on Linux?</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In this post, I will tell you about a very useful tool for web developers. Especially those who use PHP as the main language for their applications. This is Composer which is a very light dependency manager and easy to use. So, in this post, you will learn how to install Composer on Linux.</p>
<h2>What is Composer?</h2>
<p><a href="https://getcomposer.org">Composer</a> is a tool for dependency management in <a href="https://www.osradar.com/tag/php/">PHP</a>. So, it allows you to declare the libraries your project depends on and it will manage (install/update) them for you. This way we will not have to worry about installing those libraries.</p>
<p>To do this, Composer is strongly inspired by <a href="https://www.osradar.com/how-to-install-nodejs-on-ubuntu-18-04-lts-linux-mint-19/">NPM</a> and Ruby&#8217;s bundler. In other words, it is not a package manager like APT or Yum, because it does not install specific applications globally but only libraries.</p>
<p>On the same <a href="https://getcomposer.org/">Composer website</a>, we are given the following example to show the usefulness of the tool.</p>
<p>First, suppose:</p>
<ul>
<li>You have a project that depends on a number of libraries.</li>
<li>Some of those libraries depend on other libraries.</li>
</ul>
<p>Composer:</p>
<ul>
<li>Enables you to declare the libraries you depend on.</li>
<li>Finds out which versions of which packages can and need to be installed, and installs them (meaning it downloads them into your project).</li>
</ul>
<p>So, let us start to install Composer.</p>
<h2>Install Composer on Linux</h2>
<p>The installation of Composer is quite simple. Because of the impressive tool, it is almost a gift. First, you need to install PHP.</p>
<pre>:~$ sudo apt install php libapache2-mod-php php-mbstring php-xmlrpc php-soap php-gd php-xml php-cli php-zip</pre>
<p>Next, show the PHP version.</p>
<pre>:~$ php -v
PHP 7.0.33-0+deb9u3 (cli) (built: Mar  8 2019 10:01:24) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Zend OPcache v7.0.33-0+deb9u3, Copyright (c) 1999-2017, by Zend Technologies</pre>
<p>Composer requires at least PHP 5.4. However, many Linux distributions in their repositories have recent versions. For example, Ubuntu has version 7.2 and Debian 7.0. In both cases, they are sufficient versions for installation.</p>
<p>Next, you need to install a tool to download the installer using the terminal. Of course, you can do it from the Composer website, but in the terminal, it&#8217;s faster.</p>
<pre>:~$ sudo apt install curl</pre>
<p>Then, install Composer using this command:</p>
<pre>:~$ curl -sS https://getcomposer.org/installer | php</pre>
<p>If you want to install Composer globally, to make it a system command, perform these commands:</p>
<pre>:~$ sudo mv composer.phar /usr/local/bin/composer
:~$ sudo chmod +x /usr/local/bin/composer
:~$ source ~/.bashrc</pre>
<p>And show the Composer version.</p>
<pre>:~$ composer -v</pre>
<p><figure id="attachment_12426" aria-describedby="caption-attachment-12426" style="width: 1039px" class="wp-caption alignnone"><img loading="lazy" class="size-full wp-image-12426" src="https://www.osradar.com/wp-content/uploads/2019/06/1-8.png" alt="1.- Install Composer on Linux" width="1039" height="360" srcset="https://www.osradar.com/wp-content/uploads/2019/06/1-8.png 1039w, https://www.osradar.com/wp-content/uploads/2019/06/1-8-300x104.png 300w, https://www.osradar.com/wp-content/uploads/2019/06/1-8-768x266.png 768w, https://www.osradar.com/wp-content/uploads/2019/06/1-8-1024x355.png 1024w, https://www.osradar.com/wp-content/uploads/2019/06/1-8-696x241.png 696w" sizes="(max-width: 1039px) 100vw, 1039px" /><figcaption id="caption-attachment-12426" class="wp-caption-text">1.- Install Composer on Linux</figcaption></figure></p>
<p>And that&#8217;s it.</p>
<h2>Conclusion</h2>
<p>For web developers, it is important to have tools that help create applications. In this sense, Composer is presented to us as a vital dependency manager for our projects.</p>
<p>So, please share this post with your friends.</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/how-to-install-composer-on-linux/">How to install Composer on Linux?</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/how-to-install-composer-on-linux/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
