Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install Composer in Linux system

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

How to install Composer in Linux system? I believe that many inexperienced people are at a loss about this, so this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.

1. Download the installation script-composer-setup.php-to the current directory

Php-r "copy ('https://install.phpcomposer.com/installer',' composer-setup.php');"

two。 Perform the installation process

Php composer-setup.php

3. Delete installation script

Php-r "unlink ('composer-setup.php');"

4. Global installation

Sudo mv composer.phar / usr/local/bin/composer (ubuuntu:/usr/bin/composer)

Note: before installation, make sure that php is installed correctly (check: php-v to check the version number) and keep the composer version updated command: composer selfupdate

Supplement

The method of global installation of composer under Linux

/ download composer

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

/ / move the composer.phar file to the bin directory to use the composer command globally

Mv composer.phar / usr/local/bin/composer

/ / switch domestic sources

Composer config-g repo.packagist composer https://packagist.phpcomposer.com

After reading the above, have you mastered how to install Composer in the Linux system? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report