Otu esi etinye PHP 8.0 na openSUSE 15 Leap

PHP 8.0 bụ mmelite dị ịrịba ama nke asụsụ PHP ewepụtara na Nọvemba 26, 2020, nnukwu mmụba na ntọhapụ PHP 7.4 dị. PHP ọhụrụ ahụ nwere ọtụtụ atụmatụ na nkwalite ọhụrụ, gụnyere arụmụka akpọrọ aha, ụdị otu, njiri mara, nkwalite ihe nrụpụta, okwu egwuregwu, ndị na-ahụ maka nchekwa efu, JIT na nkwalite n'ụdị sistemu, njikwa njehie, na nkwụsi ike.

N'ime nkuzi a, ị ga-amụta otu esi etinye PHP 8.0 na openSUSE 15 Leap.

Prerequisites

  • OS akwadoro: mepereSUSE Leap - 15.x 
  • Akaụntụ onye ọrụ: Akaụntụ onye ọrụ nwere sudo ma ọ bụ ohere mgbọrọgwụ.

Melite Sistemụ Ọrụ

Melite gi openSUSE Sistemụ arụmọrụ iji hụ na ngwugwu niile dị adị adịla ugbu a:

sudo zypper refresh -y

Nkuzi a ga-eji ya sudo iwu na na-eche na ị nwere ọnọdụ sudo.

Iji nyochaa ọkwa sudo na akaụntụ gị:

sudo whoami

Ihe atụ na-egosi ọkwa sudo:

[joshua@opensuse ~]$ sudo whoami
root

Ka ịtọlite ​​akaụntụ sudo dị adị ma ọ bụ ọhụrụ, gaa na nkuzi anyị na na-agbakwunye onye ọrụ na Sudoers na openSUSE.

Iji mgbọrọgwụ akaụntụ, jiri iwu na-esonụ na paswọọdụ mgbọrọgwụ banye.

su

Advertisement


Bubata & Wụnye mgbakwunye PHP

Ọrụ mbụ bụ ịwụnye ihe ihe nkesa: php: ndọtị n'ọnụ ụzọ openSUSE gị. Agbanyeghị, dabere na ụdị openSUSE ị na-agba ugbu a, nke a nwere ike ịdị iche. N'okpuru bụ ọmụmaatụ abụọ nke mpụta ọhụrụ na nke gara aga nke openSUSE Leap.

Bubata ihe nkesa: php: ndọtị maka openSUSE Leap 15.3:

sudo zypper addrepo https://download.opensuse.org/repositories/home:/Padom/15.3/home:Padom.repo

Bubata ihe nkesa: php: ndọtị maka openSUSE Leap 15.2:

sudo zypper addrepo https://download.opensuse.org/repositories/server:php:extensions/openSUSE_Leap_15.2/server:php:extensions.repo

Bubata ihe nkesa: php: ndọtị maka openSUSE Leap 15.1:

sudo zypper addrepo https://download.opensuse.org/repositories/server:php:extensions/openSUSE_Leap_15.1/server:php:extensions.repo

Ihe atụ nke mbubata 15.3:

Otu esi etinye PHP 8.0 na openSUSE 15 Leap

Maka mwepụta ndị ọhụrụ, soro usoro a. Ozugbo emechara, megharịa ebe nchekwa ahụ.

sudo zypper refresh

A ga-akpali gị gbasara igodo GPG na ịjụ, tụkwasị obi nwa oge, ma ọ bụ mgbe niile.

Ihe Nlereanya:

Otu esi etinye PHP 8.0 na openSUSE 15 Leap

ụdị "a", wee pịa “Banye bọtịnụ” ka gaba n'ihu na mbubata igodo GPG.

Tinye PHP 8.0

Ugbu a ị bubatara ma tinye ebe nchekwa nchekwa PHP maka usoro openSUSE gị, tinye PHP 8.0 na iwu na-esonụ.

sudo zypper install php8

Ihe atụ mmepụta:

Otu esi etinye PHP 8.0 na openSUSE 15 Leap

ụdị "Y", wee pịa "Tinye igodo" ịga n'ihu na nwụnye.

Ugbu a ị tinyela PHP 8.0 na mgbakwunye na-elele ụdị ahụ site na iwu a:

php -v

Ihe atụ n'okpuru, cheta na nke a ga-agbanwe n'oge:

PHP 8.0.11 (cli) (built: Sep 23 2021 12:00:00) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.11, Copyright (c) Zend Technologies

Advertisement


Otu esi achọ ngwugwu PHP 8.0

Site na ndabara, mgbe ị na-etinye PHP 8.0, ọ bụ naanị ole na ole n'ime ngwugwu bụ isi ka etinyere. Agbanyeghị, dị ka PHP maara nke ọma, ị nwere ike ịwụnye ọtụtụ mgbakwunye maka ngwa dị iche iche ma ọ bụ ihe achọrọ.

Iji chọọ ngwungwu ndị ọzọ na ebe nchekwa ndọtị PHP, jiri iwu na-esonụ na ọdụ gị.

sudo zypper search php8

Ihe atụ mmepụta:

Loading repository data...
Reading installed packages...

S  | Name                     | Summary                                                   | Type
---+--------------------------+-----------------------------------------------------------+-----------
   | php8                     | Interpreter for the PHP scripting language version 8      | srcpackage
i+ | php8                     | Interpreter for the PHP scripting language version 8      | package
   | php8-APCu                | APCu - APC User Cache                                     | srcpackage
   | php8-APCu                | APCu - APC User Cache                                     | package
   | php8-bcmath              | "Binary Calculator" extension for PHP                     | package
   | php8-bcmath-debuginfo    | Debug information for package php8-bcmath                 | package
   | php8-bz2                 | bzip2 codec support for PHP                               | package
   | php8-bz2-debuginfo       | Debug information for package php8-bz2                    | package
   | php8-calendar            | PHP8 Extension Module                                     | package
   | php8-calendar-debuginfo  | Debug information for package php8-calendar               | package
i  | php8-cli                 | Interpreter for the PHP scripting language version 8      | package
   | php8-cli-debuginfo       | Debug information for package php8-cli                    | package
i  | php8-ctype               | Character class extension for PHP                         | package
   | php8-ctype-debuginfo     | Debug information for package php8-ctype                  | package
   | php8-curl                | libcurl integration for PHP                               | package
   | php8-curl-debuginfo      | Debug information for package php8-curl                   | package
   | php8-dba                 | Database abstraction layer for PHP                        | package
   | php8-dba-debuginfo       | Debug information for package php8-dba                    | package
   | php8-debuginfo           | Debug information for package php8                        | package
   | php8-debugsource         | Debug sources for package php8                            | package
   | php8-devel               | PHP8 development files for C/C++ extensions               | package
i  | php8-dom                 | Document Object Model extension for PHP                   | package
   | php8-dom-debuginfo       | Debug information for package php8-dom                    | package
   | php8-enchant             | Spell checking extension for PHP                          | package
   | php8-enchant-debuginfo   | Debug information for package php8-enchant                | package
   | php8-exif                | EXIF metadata extensions for PHP                          | package
   | php8-exif-debuginfo      | Debug information for package php8-exif                   | package
   | php8-fileinfo            | File identification extension for PHP                     | package
   | php8-fileinfo-debuginfo  | Debug information for package php8-fileinfo               | package
   | php8-ftp                 | FTP protocol support for PHP                              | package
   | php8-ftp-debuginfo       | Debug information for package php8-ftp                    | package
   | php8-gd                  | GD Graphics Library extension for PHP                     | package
   | php8-gd-debuginfo        | Debug information for package php8-gd                     | package
   | php8-gettext             | Native language support for PHP                           | package
   | php8-gettext-debuginfo   | Debug information for package php8-gettext                | package
   | php8-gmagick             | Wrapper to the GraphicsMagick library                     | srcpackage
   | php8-gmagick             | Wrapper to the GraphicsMagick library                     | package
   | php8-gmp                 | Bignum extension for PHP                                  | package
   | php8-gmp-debuginfo       | Debug information for package php8-gmp                    | package
   | php8-gnupg               | PHP wrapper around the gpgme library                      | srcpackage
   | php8-gnupg               | PHP wrapper around the gpgme library                      | package
   | php8-ice                 | PHP framework delivered as C extension                    | srcpackage
   | php8-ice                 | PHP framework delivered as C extension                    | package
i  | php8-iconv               | Character set conversion functions for PHP                | package
   | php8-iconv-debuginfo     | Debug information for package php8-iconv                  | package
   | php8-imagick             | Wrapper to the ImageMagick library                        | srcpackage
   | php8-imagick             | Wrapper to the ImageMagick library                        | package
   | php8-intl                | ICU integration for PHP                                   | package
   | php8-intl-debuginfo      | Debug information for package php8-intl                   | package
   | php8-ldap                | LDAP protocol support for PHP                             | package
   | php8-ldap-debuginfo      | Debug information for package php8-ldap                   | package
   | php8-lzf                 | LZF compression                                           | srcpackage
   | php8-lzf                 | LZF compression                                           | package
   | php8-maxminddb           | PHP extension providing access to maxminddb databases     | srcpackage
   | php8-maxminddb           | PHP extension providing access to maxminddb databases     | package
   | php8-mbstring            | Multibyte string functions for PHP                        | package
   | php8-mbstring-debuginfo  | Debug information for package php8-mbstring               | package
   | php8-memcache            | PHP Memcache client Extension                             | srcpackage
   | php8-memcache            | PHP Memcache client Extension                             | package
   | php8-memcached           | PHP MemcacheD client Extension                            | srcpackage
   | php8-memcached           | PHP MemcacheD client Extension                            | package
   | php8-mysql               | MySQL database client for PHP                             | package
   | php8-mysql-debuginfo     | Debug information for package php8-mysql                  | package
   | php8-odbc                | ODBC extension for PHP                                    | package
   | php8-odbc-debuginfo      | Debug information for package php8-odbc                   | package
   | php8-opcache             | Opcode cache extension for PHP                            | package
   | php8-opcache-debuginfo   | Debug information for package php8-opcache                | package
i  | php8-openssl             | OpenSSL integration for PHP                               | package
   | php8-openssl-debuginfo   | Debug information for package php8-openssl                | package
   | php8-pcntl               | Process Control extension for PHP                         | package
   | php8-pcntl-debuginfo     | Debug information for package php8-pcntl                  | package
i  | php8-pdo                 | PHP Data Objects extension for PHP                        | package
   | php8-pdo-debuginfo       | Debug information for package php8-pdo                    | package
   | php8-pear                | PHP Extension and Application Repository                  | package
   | php8-pear                | PHP Extension and Application Repository                  | srcpackage
   | php8-pecl                | PHP Extension Community Library                           | package
   | php8-pgsql               | PostgreSQL database client for PHP                        | package
   | php8-pgsql-debuginfo     | Debug information for package php8-pgsql                  | package
   | php8-phar                | PHP Archive extension for PHP                             | package
   | php8-phar-debuginfo      | Debug information for package php8-phar                   | package
   | php8-posix               | POSIX functions for PHP                                   | package
   | php8-posix-debuginfo     | Debug information for package php8-posix                  | package
   | php8-psr                 | PSR Extension Module                                      | srcpackage
   | php8-psr                 | PSR Extension Module                                      | package
   | php8-readline            | PHP8 readline extension                                   | package
   | php8-readline-debuginfo  | Debug information for package php8-readline               | package
   | php8-redis               | API for communicating with Redis servers                  | srcpackage
   | php8-redis               | API for communicating with Redis servers                  | package
   | php8-shmop               | Alternate, low-level shared memory implementation for PHP | package
   | php8-shmop-debuginfo     | Debug information for package php8-shmop                  | package
   | php8-smbclient           | A PHP wrapper for libsmbclient                            | srcpackage
   | php8-smbclient           | A PHP wrapper for libsmbclient                            | package
   | php8-snmp                | SNMP extension for PHP                                    | package
   | php8-snmp-debuginfo      | Debug information for package php8-snmp                   | package
   | php8-soap                | SOAP/WSDL extension module for PHP                        | package
   | php8-soap-debuginfo      | Debug information for package php8-soap                   | package
   | php8-sockets             | Berkeley sockets API for PHP                              | package
   | php8-sockets-debuginfo   | Debug information for package php8-sockets                | package
   | php8-sodium              | Cryptographic Extension Based on Libsodium                | package
   | php8-sodium-debuginfo    | Debug information for package php8-sodium                 | package
i  | php8-sqlite              | SQLite database client for PHP                            | package
   | php8-sqlite-debuginfo    | Debug information for package php8-sqlite                 | package
   | php8-sysvmsg             | SysV Message Queue support for PHP                        | package
   | php8-sysvmsg-debuginfo   | Debug information for package php8-sysvmsg                | package
   | php8-sysvsem             | SysV Semaphore support for PHP                            | package
   | php8-sysvsem-debuginfo   | Debug information for package php8-sysvsem                | package
   | php8-sysvshm             | SysV Shared Memory support for PHP                        | package
   | php8-sysvshm-debuginfo   | Debug information for package php8-sysvshm                | package
   | php8-tidy                | PHP8 binding for the Tidy HTML cleaner                    | package
   | php8-tidy-debuginfo      | Debug information for package php8-tidy                   | package
i  | php8-tokenizer           | Extension module to access Zend Engine's PHP tokenizer    | package
   | php8-tokenizer-debuginfo | Debug information for package php8-tokenizer              | package
   | php8-uploadprogress      | An php extension to track progress of a file upload       | srcpackage
   | php8-uploadprogress      | An php extension to track progress of a file upload       | package
   | php8-uuid                | PHP UUID support functions                                | srcpackage
   | php8-uuid                | PHP UUID support functions                                | package
   | php8-xdebug              | Extended PHP debugger                                     | srcpackage
   | php8-xdebug              | Extended PHP debugger                                     | package
i  | php8-xmlreader           | Streaming XML reader extension for PHP                    | package
   | php8-xmlreader-debuginfo | Debug information for package php8-xmlreader              | package
i  | php8-xmlwriter           | Streaming-based XML writer extension for PHP              | package
   | php8-xmlwriter-debuginfo | Debug information for package php8-xmlwriter              | package
   | php8-xsl                 | PHP8 Extension Module                                     | package
   | php8-xsl-debuginfo       | Debug information for package php8-xsl                    | package
   | php8-zip                 | ZIP archive support for PHP                               | package
   | php8-zip-debuginfo       | Debug information for package php8-zip                    | package
   | php8-zlib                | Zlib compression support for PHP                          | package
   | php8-zlib-debuginfo      | Debug information for package php8-zlib                   | package

Iji wụnye PHP 8.0 Redis ndọtị site na listi ahụ, ị ​​​​ga-eme iwu a:

sudo zypper install php8-redis

Ihe atụ mmepụta:

Otu esi etinye PHP 8.0 na openSUSE 15 Leap

ụdị "Y", wee pịa "Tinye igodo" ịga n'ihu na nwụnye.

Enwere ike iji otu ụkpụrụ ahụ maka PHP 7.4. Naanị dochie 8 na 7.

sudo zypper search php7

Site na ndabara, ngwugwu niile arụnyere na php7 ga-abụ PHP 7.4.

Otu esi etinye PHP-FPM 8

Site na ndabara, modul Nginx FPM adịghị abịa na mpaghara PHP site na openSUSE. Iji wụnye nke a, ị ga-achọ ịwụnye otu n'ime ebe nchekwa obodo. Otu n'ime ndị a tụrụ aro bụ Ebe nchekwa Padom nke edepụtara dị ka ihe ọzọ na nchọ ngwugwu openSUSE.

Nke mbụ, ị ga-achọ ịgbakwunye ebe nchekwa dị iche iche.

megheSUSE Leap 15.3

sudo zypper addrepo https://download.opensuse.org/repositories/home:/Padom/15.3/home:Padom.repo

OpenSUSE Leap 15.2:

sudo zypper addrepo https://download.opensuse.org/repositories/home:Padom/openSUSE_Leap_15.2/home:Padom.repo

OpenSUSE Leap 15.1:

sudo zypper addrepo https://download.opensuse.org/repositories/home:Padom/openSUSE_Leap_15.1/home:Padom.repo

Weghachite ebe nchekwa ahụ, ma nabata mbubata GPG nke ebe nchekwa ahụ ị họọrọ.

sudo zypper refresh

Na-esote, wụnye Nginx PHP-FPM 8 ndọtị.

sudo zypper install php8-fpm

A ga-akpali gị gbasara igodo GPG na ịjụ, tụkwasị obi nwa oge, ma ọ bụ mgbe niile.

Ihe atụ mmepụta:

Otu esi etinye PHP 8.0 na openSUSE 15 Leap

ụdị "a", wee pịa “Banye bọtịnụ” ka gaba n'ihu na mbubata igodo GPG.

Ihe atụ mmepụta:

Otu esi etinye PHP 8.0 na openSUSE 15 Leap

ụdị "Y", wee pịa "Tinye igodo" ịga n'ihu na nwụnye.

Ozugbo etinyere ya, detuo faịlụ nhazi ndabere na aha ha.

Emeghị nke a ga-ebute PHP-FPM na-enye ọkwa njehie.

sudo cp /etc/php8/fpm/php-fpm.conf.default /etc/php8/fpm/php-fpm.conf
sudo cp /etc/php8/fpm/php-fpm.d/www.conf.default /etc/php8/fpm/php-fpm.d/www.conf

Ugbu a, site na ndabara, PHP-FPM nwere nkwarụ. Iji mee ka PHP FPM jiri iwu na-esonụ.

sudo systemctl enable php-fpm --now

Na-esote, gosi na PHP-FPM na-arụ ọrụ nke ọma.

sudo systemctl status php-fpm

Ihe atụ mmepụta:

Otu esi etinye PHP 8.0 na openSUSE 15 Leap

Dịka n'elu, PHP-FPM na-arụ ọrụ nke ọma, a ga-emelite ya site na iji ebe nchekwa obodo. N'aka nke ọzọ, ị nwere ike iwunye mgbakwunye PHP 8 gị niile site na ebe nchekwa a. A na-akwanyere ya ùgwù nke ukwuu yana, dịka agbakwunyere FPM, nwere ndọtị karịa ebe nchekwa gọọmentị.


Advertisement


Okwu na mmechi

N'ime nkuzi a, ị mụtala ka esi ebubata ebe nchekwa nchekwa PHP maka ụdị openSUSE gị wee wụnye ngwugwu ndị ọzọ wee chọọ ha. N'ozuzu, PHP 8.0 na-amalite ugbu a ịghọ ọkọlọtọ mara mma n'ebe niile.

Site na mmepe nke PHP 8.1 na-abịa, ndị mmepe na-emezi ngwa weebụ ha PHP 8 enyi na enyi, gụnyere nnukwu CMS WordPress nwere isiokwu ndị ọzọ na ngwa mgbakwunye devs iji nweta PHP 8.0 akwadoro nyere uru 8 nwere na nchekwa na ọsọ tụnyere 7. usoro.

Idenye aha
Gwa nke
4 Comments
Inline nzaghachi
Lee echiche niile

ka esi etinye fpm

PHP Repo na-enweghị fpm ma ọ bụ modul apache, ntakịrị ihe na-abaghị uru ruo ugbu a

4
0
Ga-ahụ n'anya gị echiche, biko okwu.x