Php install pecl centos

Установка модулей PHP (CentOS)

Ниже мы рассмотрим установку модулей PHP на сервер с операционной системой CentOS.

Создание phpinfo-скрипта

В процессе установки модулей нам потребуется получать информацию о параметрах PHP на сервере, поэтому в первую очередь разместим скрипт phpinfo.php в директории сайта.

Для этого подключитесь к серверу по SSH и выполните следующие шаги:

1. Перейдите в директорию сайта:

Например, если на сервере установлен LAMP (автоматически при создании сервера):

Если на сервере установлена панель VestaCP:

cd /home/имя_пользователя/web/имя_домена/public_html

2. Создайте файл phpinfo.php :

3. Добавьте в него следующее содержимое:

phpinfo();
phpinfo(INFO_MODULES);
?>

4. Сохраните изменения (нажмите Ctrl+X для выхода из nano, далее Y для сохранения изменений и Enter).

После перейдите по адресу http://вашдомен/phpinfo.php , и в браузере будет отображена информация о настройках PHP.

Установка модулей на примере imagick

Рассмотрим установку модулей php на примере модуля imagick .

Если вы не уверены в точном названии пакета, можно воспользоваться командой ниже, указав часть названия пакета.

После определения точного имени модуля, можно перейти к установке.

2. Обновите информацию из репозиториев:

yum install ImageMagick ImageMagick-devel

4. Большинство расширений можно установить из репозитория PECL (чтобы убедиться, что этот способ подходит для нужного расширения, проверьте его наличие здесь: https://pecl.php.net/packages.php ).

yum install php-pear gcc make php-devel

6. В процессе установки будет выведен запрос:

Please provide the prefix of Imagemagick installation

В ответ на запрос системы введите all и нажмите Enter.

7. Проверьте, какая директория задана для расширений. Для этого нужно на странице http://вашдомен/phpinfo.php найти параметр extension_dir :

Перейдите в указанную директорию:

Проверьте, есть ли в ней установленная библиотека:

Можно указать часть имени пакета в названии, чтобы упростить вывод, например:

Если библиотека присутствует, она будет выведена в консоли:

8. Выполните команду ниже, чтобы создать файл конфигурации imagick.ini и добавить в него директиву extension=imagick.so :

echo "extension=imagick.so" > /etc/php.d/imagick.ini

9. Перезапустите веб-сервер Apache:

Читайте также:  Centering all content html

10. Обновите страницу http://вашдомен/phpinfo.php и найдите установленный модуль, чтобы убедиться, что все в порядке:

Подключение внешних библиотек

Если вам требуется подключить библиотеку, скачанную не из репозитория, необходимо:

1. Загрузить файл с расширением .so в директорию с остальными библиотеками (см. значение параметра extension_dir на странице http://вашдомен/phpinfo.php ; в нашем примере это директория /usr/lib64/php/modules/ ).

2. Перейти в директорию /etc/php.d :

3. Создать конфигурационный файл:

4. Указать в данном файле директиву и сохранить изменения:

extension=имя_библиотеки.so 

6. Обновить страницу http://вашдомен/phpinfo.ph p и убедиться, что библиотека установлена.

Если файл библиотеки был размещен в другой директории, то на шаге 4 необходимо в директиве extension указать соответствующий путь, например:

extension=/usr/local/lib/php/extensions/curl.so

Источник

Step-by-step – Pecl CentOS 7 Installation Guide

GNU/Linux CentOS 7 Installing Pecl – Quick-Start Guide

You are Welcome! The Tutorial shows you Step-by-Step How to Install PHP 7 PECL in GNU/Linux CentOS 7.x Desktop.

And PECL for CentOS (PHP Extension Community Library) is a Repository of Extensions for the PHP programming language.

Pecl Install CentOS 7 - Featured

1. Launching Terminal

Contents

Showing Ads here is the best solution I found for not embarassing somebody about participating in a #%$Foundation^.

«When the Last Tree has been cut down, the Last Fish caught, the Last River poisoned, only then will we realize that One Cannot Eat Money.»

«No usable Computer exists today with completely Open Software and Hardware (as much as some companies want to Market themselves as such).»

Follow Us

The GNU/Linux Free Software Phylosophy

GNU/Linux Logo

Steve Jobs’ Last Words

Steve Jobs Last Words in the Darkness

«Being a Winner in a Free Computing OS Mission means to adopt a Commercial like Strategy. Transcending Duality in Oneness and so dispensing both Free and Non Free Software. Cause evangelizing Freedom in a Non Free World is like keeping a Trojan Horse. Hallelujah!»

«Using the Money just for buying Stuff and Not Supporting the Free Gift Philosophy is a sign of a Selfish and Narrow Mind.»

What can Save the World from a Blind and Quick Self-destruction.
The Immediate and Humble Mass Conversion to the Spiritual Way!
Because Earth & Nature has been Ravaged without Pity by the Wild and Selfish mass Competition to Win and Shown that U’re someone Better because you got a Lot of fla$hY Power$$$.

«Taking care if somebody is liking, following, or buying is just a serious hidrance on the priceless Way of Creative Freedom.»

Credits

Ganesha

Everlasting Glory to God, Jesus Christ, The Holy Spirit, Ganesha, Shiva, Vishnu, Krisna, Laozi, Buddha, Bodhidharma, Ma Gcig, Hakuin, Ikkyu, Nagarjuna, Tilopa, Naropa, Milarepa, Suhrawardi, St Dismas, St Francesco, St Teresa, St John, St Filippo, Eckehart. All The Holy Divinities, Avatars, Saints, Mystics, and True Spiritual Masters. Because they are in the Eternal Light of Truth & Delight Enlightening a World of Darkness, Nescience, Blindness, Uneasiness and Falsehood!

Читайте также:  How to include HTML page with jQuery

Источник

Step-by-step – Pecl CentOS Stream 9 Installation Guide

GNU/Linux CentOS Stream 9 Installing Pecl – Quick-Start Guide

You are Welcome! The Tutorial shows you Step-by-Step How to Install PHP PECL in GNU/Linux CentOS Stream 9 Desktop.

And PECL for CentOS (PHP Extension Community Library) is a Repository of Extensions for the PHP programming language.

Finally, this Guide is valid also for all the others RedHat Linux Based Distros like:

  • RedHat Enterprise Linux
  • Oracle Enterprise Linux
  • Rocky Linux
  • AlmaLinux

Step-by-step – Pecl CentOS Stream 9 Installation Guide

1. Launching Terminal

Contents

Showing Ads here is the best solution I found for not embarassing somebody about participating in a #%$Foundation^.

«When the Last Tree has been cut down, the Last Fish caught, the Last River poisoned, only then will we realize that One Cannot Eat Money.»

«No usable Computer exists today with completely Open Software and Hardware (as much as some companies want to Market themselves as such).»

Follow Us

The GNU/Linux Free Software Phylosophy

GNU/Linux Logo

Steve Jobs’ Last Words

Steve Jobs Last Words in the Darkness

«Being a Winner in a Free Computing OS Mission means to adopt a Commercial like Strategy. Transcending Duality in Oneness and so dispensing both Free and Non Free Software. Cause evangelizing Freedom in a Non Free World is like keeping a Trojan Horse. Hallelujah!»

«Using the Money just for buying Stuff and Not Supporting the Free Gift Philosophy is a sign of a Selfish and Narrow Mind.»

What can Save the World from a Blind and Quick Self-destruction.
The Immediate and Humble Mass Conversion to the Spiritual Way!
Because Earth & Nature has been Ravaged without Pity by the Wild and Selfish mass Competition to Win and Shown that U’re someone Better because you got a Lot of fla$hY Power$$$.

«Taking care if somebody is liking, following, or buying is just a serious hidrance on the priceless Way of Creative Freedom.»

Credits

Ganesha

Everlasting Glory to God, Jesus Christ, The Holy Spirit, Ganesha, Shiva, Vishnu, Krisna, Laozi, Buddha, Bodhidharma, Ma Gcig, Hakuin, Ikkyu, Nagarjuna, Tilopa, Naropa, Milarepa, Suhrawardi, St Dismas, St Francesco, St Teresa, St John, St Filippo, Eckehart. All The Holy Divinities, Avatars, Saints, Mystics, and True Spiritual Masters. Because they are in the Eternal Light of Truth & Delight Enlightening a World of Darkness, Nescience, Blindness, Uneasiness and Falsehood!

Читайте также:  Java lang nullpointerexception group перевод

Источник

Step-by-step – Pecl CentOS 8.x/Stream-8 Installation Guide

GNU/Linux CentOS 8.x/Stream-8 Installing Pecl – Quick-Start Guide

You are Welcome! The Tutorial shows you Step-by-Step How to Install PHP PECL in GNU/Linux CentOS 8.x/Stream-8 Desktop.

And PECL for CentOS (PHP Extension Community Library) is a Repository of Extensions for the PHP programming language.

Pecl Install CentOS 8.x/Stream-8 - Featured

1. Launching Terminal

Contents

Showing Ads here is the best solution I found for not embarassing somebody about participating in a #%$Foundation^.

«When the Last Tree has been cut down, the Last Fish caught, the Last River poisoned, only then will we realize that One Cannot Eat Money.»

«No usable Computer exists today with completely Open Software and Hardware (as much as some companies want to Market themselves as such).»

Follow Us

The GNU/Linux Free Software Phylosophy

GNU/Linux Logo

Steve Jobs’ Last Words

Steve Jobs Last Words in the Darkness

«Being a Winner in a Free Computing OS Mission means to adopt a Commercial like Strategy. Transcending Duality in Oneness and so dispensing both Free and Non Free Software. Cause evangelizing Freedom in a Non Free World is like keeping a Trojan Horse. Hallelujah!»

«Using the Money just for buying Stuff and Not Supporting the Free Gift Philosophy is a sign of a Selfish and Narrow Mind.»

What can Save the World from a Blind and Quick Self-destruction.
The Immediate and Humble Mass Conversion to the Spiritual Way!
Because Earth & Nature has been Ravaged without Pity by the Wild and Selfish mass Competition to Win and Shown that U’re someone Better because you got a Lot of fla$hY Power$$$.

«Taking care if somebody is liking, following, or buying is just a serious hidrance on the priceless Way of Creative Freedom.»

Credits

Ganesha

Everlasting Glory to God, Jesus Christ, The Holy Spirit, Ganesha, Shiva, Vishnu, Krisna, Laozi, Buddha, Bodhidharma, Ma Gcig, Hakuin, Ikkyu, Nagarjuna, Tilopa, Naropa, Milarepa, Suhrawardi, St Dismas, St Francesco, St Teresa, St John, St Filippo, Eckehart. All The Holy Divinities, Avatars, Saints, Mystics, and True Spiritual Masters. Because they are in the Eternal Light of Truth & Delight Enlightening a World of Darkness, Nescience, Blindness, Uneasiness and Falsehood!

Источник

Оцените статью