How To Install php-react-socket on Debian 10

Learn how to install php-react-socket on Debian 10 with this tutorial. php-react-socket is Asynchronous client and server socket connections for ReactPHP

Introduction

In this tutorial we learn how to install php-react-socket on Debian 10.

What is php-react-socket

php-react-socket is:

This library implements asynchronous TCP/IP client and server connections for ReactPHP, both plaintext and TLS-secured.

The socket library provides re-usable interfaces for a socket-layer server and client based on the EventLoop and Stream components. Its server component allows one to build networking servers that accept incoming connections from networking clients (such as an HTTP server). Its client component allows one to build networking clients that establish outgoing connections to networking servers (such as an HTTP or database client). This library provides async, streaming means for all of this, so you can handle multiple concurrent connections without blocking.

There are three methods to install php-react-socket on Debian 10. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install php-react-socket Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install php-react-socket using apt-get by running the following command:

sudo apt-get -y install php-react-socket

Install php-react-socket Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install php-react-socket using apt by running the following command:

sudo apt -y install php-react-socket

Install php-react-socket Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install php-react-socket using aptitude by running the following command:

sudo aptitude -y install php-react-socket

How To Uninstall php-react-socket on Debian 10

To uninstall only the php-react-socket package we can use the following command:

sudo apt-get remove php-react-socket

Uninstall php-react-socket And Its Dependencies

To uninstall php-react-socket and its dependencies that are no longer needed by Debian 10, we can use the command below:

sudo apt-get -y autoremove php-react-socket

Remove php-react-socket Configurations and Data

To remove php-react-socket configuration and data from Debian 10 we can use the following command:

sudo apt-get -y purge php-react-socket

Remove php-react-socket configuration, data, and all of its dependencies

We can use the following command to remove php-react-socket configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge php-react-socket

Dependencies

php-react-socket have the following dependencies:

References

Summary

In this tutorial we learn how to install php-react-socket package on Debian 10 using different package management tools: apt, apt-get and aptitude.