Next, to install PHP 7.2 on Ubuntu 18.04, just run the following command:
apt-get install php
This command will install PHP 7.2, as well as some other dependencies.
To verify if PHP is installed, run the following command:
php -v
You should get a response similar to this:
PHP 7.2.3-1ubuntu1 (cli) (built: Mar 14 2018 22:03:58) ( NTS )And that’s it. PHP 7.2 is installed on your Ubuntu 18.04 server.
Install PHP 7.2 modules
These are the most common PHP 7.2 modules often used by php applications. You may need more or less, so check the requirements of the software you’re planning to use:
apt-get install php-pear php-fpm php-dev php-zip php-curl php-xmlrpc php-gd php-mysql php-mbstring php-xml libapache2-mod-php
To check all the PHP modules available in Ubuntu, run:
apt-cache search --names-only ^php
Добавить комментарий