**Introduction**: This guide provides step-by-step instructions on how to install Composer, a dependency management tool for PHP, on a CentOS 7 system. Composer is widely used in PHP projects to manage libraries and dep…
How to Install Composer on CentOS 7
Letzte Aktualisierung: April 2026
Lesezeit: ca. 2 Min.
Zielgruppe: Boxis-Kunden und Administratoren.
Was Sie erreichen
- Sie führen die beschriebene Konfiguration oder Aufgabe für Ihren Boxis-Dienst aus.
Voraussetzungen
- Zugriff auf die beschriebene Oberfläche, das Gerät oder den Server.
- Informationen oder Zugangsdaten von Boxis (Vertrag, Willkommens-E-Mail oder Kundenbereich).
Hinweis Boxis: Angebote und Ansichten können abweichen. Bei Unklarheiten Ticket mit Service-Referenz öffnen.
Introduction: This guide provides step-by-step instructions on how to install Composer, a dependency management tool for PHP, on a CentOS 7 system. Composer is widely used in PHP projects to manage libraries and dependencies.
Requirements:
- A CentOS 7 server
- Access to a terminal or command line
- Sudo privileges or access to the root user
Step-by-Step Guide:
-
Update System Packages:
- Open your terminal.
- Run the command
sudo yum updateto ensure all your system packages are up-to-date.
-
Install PHP:
- Composer requires PHP to be installed on your system. Install PHP by running:
sudo yum install php php-cli php-zip wget unzip - Once installed, verify the installation by checking the PHP version:
php -v
- Composer requires PHP to be installed on your system. Install PHP by running:
-
Download Composer:
- Use the following command to download the Composer installer:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
- Use the following command to download the Composer installer:
-
Verify the Installer:
- To ensure the installer is safe to use, verify it with the following command:
php -r "if (hash_file('SHA384', 'composer-setup.php') === '') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"Replace `` with the latest hash value found on the Composer Public Keys / Signatures page.
- To ensure the installer is safe to use, verify it with the following command:
-
Install Composer:
- Run the installer with:
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer - This installs Composer globally.
- Run the installer with:
-
Verify Composer Installation:
- Once the installation is complete, verify it by checking the Composer version:
composer --version
- Once the installation is complete, verify it by checking the Composer version:
-
Using Composer:
- With Composer installed, you can now use it to manage dependencies in your PHP projects. For example, to start a new project, you can use:
composer init - Follow the prompts to create a
composer.jsonfile for your project.
- With Composer installed, you can now use it to manage dependencies in your PHP projects. For example, to start a new project, you can use:
Conclusion: Composer is now installed on your CentOS 7 system. You can use Composer to manage PHP dependencies, require libraries, and manage autoloaders in your PHP projects.
Additional Resources:
- Composer's Official Documentation: https://getcomposer.org/doc/
- CentOS Official Website: https://www.centos.org/
Erwartetes Ergebnis
- Der Dienst verhält sich wie in den Schritten beschrieben.
Bei Problemen
- Schritt wiederholen, Tippfehler prüfen (Hostnamen, Passwörter, Ports).
- Fehlermeldung oder Screenshot notieren.
Ticket im Kundenbereich mit Dienstname, Uhrzeit und ggf. Traceroute bei Netzwerkthemen.
Siehe auch
- Weitere Artikel derselben Kategorie in der Boxis-Wissensdatenbank.
/knowledgebase/— Startseite der Wissensdatenbank.