Встановлення Oracle Linux 8.10
Качаємо iso файл для встановлення ОС – https://yum.oracle.com/oracle-linux-isos.html, вибираємо FullISO Release 8.10 – link. Я використовую VMware Workstation 16 Player. Підключаємо і встановлюємо.
Документація – link. Мінімальні вимоги до апаратних ресурсів: 2 ядра, 3 Гб опративної пам’яті, 20Гб диска. Після встановлення оновлюємо усі пакети.
# sudo dnf update -y
або
[root@localhost ~]# sudo yum update -y
Last metadata expiration check: 2:11:21 ago on Fri 07 Mar 2025 02:25:06 PM EET.
Dependencies resolved.
Nothing to do.
Complete!
Налаштування локалі:
root@localhost ~]# cat /etc/locale.conf
LANG=”en_US.UTF-8″
Подивитися версію ОС
root@localhost ~]# cat /etc/oracle-release
Oracle Linux Server release 8.10
Установка PHP.
Перевірка які репозиторії стоять:
[mick@localhost ~]$ rpm -qa|grep release
oraclelinux-release-el8-1.0-38.el8.x86_64
oraclelinux-release-8.10-1.0.7.el8.x86_64
redhat-release-8.10-0.2.0.1.el8.x86_64
Перевіряємо які можливі версії PHP можливі для інсталяції:
[mick@localhost ~]$ dnf module list php
Oracle Linux 8 BaseOS Latest (x86_64) 26 MB/s | 91 MB 00:03
Oracle Linux 8 Application Stream (x86_64) 29 MB/s | 68 MB 00:02
Latest Unbreakable Enterprise Kernel Release 7 for Oracle L 30 MB/s | 57 MB 00:01
^TLast metadata expiration check: 0:00:10 ago on Wed 19 Mar 2025 05:04:02 PM EET.
Oracle Linux 8 Application Stream (x86_64)
Name Stream Profiles Summary
php 7.2 [d] common [d], devel, minimal PHP scripting language
php 7.3 common [d], devel, minimal PHP scripting language
php 7.4 common [d], devel, minimal PHP scripting language
php 8.0 common [d], devel, minimal PHP scripting language
php 8.2 common [d], devel, minimal PHP scripting language
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
7.2[d] – означає, що за замовченням буде встановлена версія 7.2. Якщо нам треба встановити іншу версію, нам треба скинути це значення за замовченням і встановити іншу версію. Якщо php ніяка не встановлена, то скидувати не треба, але якщо скинули – нічого страшного.
mick@localhost ~]$ sudo dnf module reset php
[sudo] password for mick:
Last metadata expiration check: 3:11:27 ago on Tue 25 Mar 2025 03:37:12 PM EET.
Dependencies resolved.
Nothing to do.
Complete!
Активуємо версію за замовчуванням php:8.2.
[mick@localhost ~]$ sudo dnf module enable php:8.2
[sudo] password for mick:
Last metadata expiration check: 3:48:22 ago on Tue 25 Mar 2025 03:37:12 PM EET.
Dependencies resolved.
============================================================================================
Package Architecture Version Repository Size
============================================================================================
Enabling module streams:
httpd 2.4
nginx 1.14
php 8.2
Transaction Summary
============================================================================================
Is this ok [y/N]: y
Complete!
[mick@localhost ~]$
Перевіряємо зміни і бачимо навпроти версії 8.2 значок [e]- активовано.
[mick@localhost ~]$ dnf module list php
Last metadata expiration check: 0:40:31 ago on Tue 25 Mar 2025 06:47:40 PM EET.
Oracle Linux 8 Application Stream (x86_64)
Name Stream Profiles Summary
php 7.2 [d] common [d], devel, minimal PHP scripting language
php 7.3 common [d], devel, minimal PHP scripting language
php 7.4 common [d], devel, minimal PHP scripting language
php 8.0 common [d], devel, minimal PHP scripting language
php 8.2 [e] common [d], devel, minimal PHP scripting language
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
Інсталюємо PHP і бачимо, що будуть встановлені 18 пакетів
[mick@localhost ~]$ sudo dnf install php
Last metadata expiration check: 3:54:46 ago on Tue 25 Mar 2025 03:37:12 PM EET.
Dependencies resolved.
=======================================================================================================================
Package Arch Version Repository Size
=======================================================================================================================
Installing:
php x86_64 8.2.25-1.module+el8.10.0+90469+8883f508 ol8_appstream 1.8 M
Installing dependencies:
apr x86_64 1.6.3-12.el8 ol8_appstream 129 k
apr-util x86_64 1.6.1-9.el8 ol8_appstream 106 k
httpd x86_64 2.4.37-65.0.1.module+el8.10.0+90523+b5e5f9e4.3 ol8_appstream 1.4 M
httpd-filesystem noarch 2.4.37-65.0.1.module+el8.10.0+90523+b5e5f9e4.3 ol8_appstream 44 k
httpd-tools x86_64 2.4.37-65.0.1.module+el8.10.0+90523+b5e5f9e4.3 ol8_appstream 112 k
mod_http2 x86_64 1.15.7-10.module+el8.10.0+90523+b5e5f9e4.3 ol8_appstream 155 k
nginx-filesystem noarch 1:1.14.1-9.0.1.module+el8.0.0+5347+9282027e ol8_appstream 25 k
oracle-logos-httpd noarch 84.5-1.0.2.el8 ol8_baseos_latest 28 k
php-common x86_64 8.2.25-1.module+el8.10.0+90469+8883f508 ol8_appstream 746 k
Installing weak dependencies:
apr-util-bdb x86_64 1.6.1-9.el8 ol8_appstream 25 k
apr-util-openssl x86_64 1.6.1-9.el8 ol8_appstream 27 k
php-cli x86_64 8.2.25-1.module+el8.10.0+90469+8883f508 ol8_appstream 3.6 M
php-fpm x86_64 8.2.25-1.module+el8.10.0+90469+8883f508 ol8_appstream 1.9 M
php-mbstring x86_64 8.2.25-1.module+el8.10.0+90469+8883f508 ol8_appstream 528 k
php-opcache x86_64 8.2.25-1.module+el8.10.0+90469+8883f508 ol8_appstream 415 k
php-pdo x86_64 8.2.25-1.module+el8.10.0+90469+8883f508 ol8_appstream 133 k
php-xml x86_64 8.2.25-1.module+el8.10.0+90469+8883f508 ol8_appstream 189 k
Transaction Summary
=======================================================================================================================
Install 18 Packages
Total download size: 11 M
Installed size: 40 M
Is this ok [y/N]:
Downloading Packages:
(1/18): oracle-logos-httpd-84.5-1.0.2.el8.noarch.rpm 134 kB/s | 28 kB 00:00
(2/18): apr-util-bdb-1.6.1-9.el8.x86_64.rpm 348 kB/s | 25 kB 00:00
(3/18): apr-util-1.6.1-9.el8.x86_64.rpm 368 kB/s | 106 kB 00:00
(4/18): apr-1.6.3-12.el8.x86_64.rpm 446 kB/s | 129 kB 00:00
(5/18): apr-util-openssl-1.6.1-9.el8.x86_64.rpm 457 kB/s | 27 kB 00:00
(6/18): httpd-filesystem-2.4.37-65.0.1.module+el8.10.0+90523+b5e5f9e4.3.noarch.rpm 799 kB/s | 44 kB 00:00
(7/18): mod_http2-1.15.7-10.module+el8.10.0+90523+b5e5f9e4.3.x86_64.rpm 1.7 MB/s | 155 kB 00:00
(8/18): httpd-tools-2.4.37-65.0.1.module+el8.10.0+90523+b5e5f9e4.3.x86_64.rpm 1.0 MB/s | 112 kB 00:00
(9/18): nginx-filesystem-1.14.1-9.0.1.module+el8.0.0+5347+9282027e.noarch.rpm 444 kB/s | 25 kB 00:00
(10/18): httpd-2.4.37-65.0.1.module+el8.10.0+90523+b5e5f9e4.3.x86_64.rpm 6.5 MB/s | 1.4 MB 00:00
(11/18): php-common-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64.rpm 10 MB/s | 746 kB 00:00
(12/18): php-fpm-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64.rpm 15 MB/s | 1.9 MB 00:00
(13/18): php-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64.rpm 5.8 MB/s | 1.8 MB 00:00
(14/18): php-mbstring-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64.rpm 7.0 MB/s | 528 kB 00:00
(15/18): php-pdo-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64.rpm 2.2 MB/s | 133 kB 00:00
(16/18): php-cli-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64.rpm 10 MB/s | 3.6 MB 00:00
(17/18): php-opcache-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64.rpm 4.4 MB/s | 415 kB 00:00
(18/18): php-xml-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64.rpm 3.5 MB/s | 189 kB 00:00
———————————————————————————————————————–
Total 12 MB/s | 11 MB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : php-common-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64 1/18
Running scriptlet: httpd-filesystem-2.4.37-65.0.1.module+el8.10.0+90523+b5e5f9e4.3.noarch 2/18
Installing : httpd-filesystem-2.4.37-65.0.1.module+el8.10.0+90523+b5e5f9e4.3.noarch 2/18
Installing : apr-1.6.3-12.el8.x86_64 3/18
Running scriptlet: apr-1.6.3-12.el8.x86_64 3/18
Installing : apr-util-bdb-1.6.1-9.el8.x86_64 4/18
Installing : apr-util-openssl-1.6.1-9.el8.x86_64 5/18
Installing : apr-util-1.6.1-9.el8.x86_64 6/18
Running scriptlet: apr-util-1.6.1-9.el8.x86_64 6/18
Installing : httpd-tools-2.4.37-65.0.1.module+el8.10.0+90523+b5e5f9e4.3.x86_64 7/18
Installing : php-cli-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64 8/18
Installing : php-mbstring-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64 9/18
Installing : php-opcache-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64 10/18
Installing : php-pdo-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64 11/18
Installing : php-xml-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64 12/18
Running scriptlet: nginx-filesystem-1:1.14.1-9.0.1.module+el8.0.0+5347+9282027e.noarch 13/18
Installing : nginx-filesystem-1:1.14.1-9.0.1.module+el8.0.0+5347+9282027e.noarch 13/18
Installing : php-fpm-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64 14/18
Running scriptlet: php-fpm-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64 14/18
Installing : oracle-logos-httpd-84.5-1.0.2.el8.noarch 15/18
Installing : mod_http2-1.15.7-10.module+el8.10.0+90523+b5e5f9e4.3.x86_64 16/18
Installing : httpd-2.4.37-65.0.1.module+el8.10.0+90523+b5e5f9e4.3.x86_64 17/18
Running scriptlet: httpd-2.4.37-65.0.1.module+el8.10.0+90523+b5e5f9e4.3.x86_64 17/18
Installing : php-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64 18/18
Running scriptlet: httpd-2.4.37-65.0.1.module+el8.10.0+90523+b5e5f9e4.3.x86_64 18/18
Running scriptlet: php-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64 18/18
Running scriptlet: php-fpm-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64 18/18
Verifying : oracle-logos-httpd-84.5-1.0.2.el8.noarch 1/18
Verifying : apr-1.6.3-12.el8.x86_64 2/18
Verifying : apr-util-1.6.1-9.el8.x86_64 3/18
Verifying : apr-util-bdb-1.6.1-9.el8.x86_64 4/18
Verifying : apr-util-openssl-1.6.1-9.el8.x86_64 5/18
Verifying : httpd-2.4.37-65.0.1.module+el8.10.0+90523+b5e5f9e4.3.x86_64 6/18
Verifying : httpd-filesystem-2.4.37-65.0.1.module+el8.10.0+90523+b5e5f9e4.3.noarch 7/18
Verifying : httpd-tools-2.4.37-65.0.1.module+el8.10.0+90523+b5e5f9e4.3.x86_64 8/18
Verifying : mod_http2-1.15.7-10.module+el8.10.0+90523+b5e5f9e4.3.x86_64 9/18
Verifying : nginx-filesystem-1:1.14.1-9.0.1.module+el8.0.0+5347+9282027e.noarch 10/18
Verifying : php-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64 11/18
Verifying : php-cli-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64 12/18
Verifying : php-common-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64 13/18
Verifying : php-fpm-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64 14/18
Verifying : php-mbstring-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64 15/18
Verifying : php-opcache-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64 16/18
Verifying : php-pdo-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64 17/18
Verifying : php-xml-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64 18/18
Installed:
apr-1.6.3-12.el8.x86_64
apr-util-1.6.1-9.el8.x86_64
apr-util-bdb-1.6.1-9.el8.x86_64
apr-util-openssl-1.6.1-9.el8.x86_64
httpd-2.4.37-65.0.1.module+el8.10.0+90523+b5e5f9e4.3.x86_64
httpd-filesystem-2.4.37-65.0.1.module+el8.10.0+90523+b5e5f9e4.3.noarch
httpd-tools-2.4.37-65.0.1.module+el8.10.0+90523+b5e5f9e4.3.x86_64
mod_http2-1.15.7-10.module+el8.10.0+90523+b5e5f9e4.3.x86_64
nginx-filesystem-1:1.14.1-9.0.1.module+el8.0.0+5347+9282027e.noarch
oracle-logos-httpd-84.5-1.0.2.el8.noarch
php-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64
php-cli-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64
php-common-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64
php-fpm-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64
php-mbstring-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64
php-opcache-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64
php-pdo-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64
php-xml-8.2.25-1.module+el8.10.0+90469+8883f508.x86_64
Complete!
Перевіряємо встановлену весрсію
mick@localhost ~]$ php -v
PHP 8.2.25 (cli) (built: Oct 22 2024 15:12:03) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.2.25, Copyright (c) Zend Technologies
with Zend OPcache v8.2.25, Copyright (c), by Zend Technologies
Дивимося які пакети інстальовано і берігаємо їх у файл packages.txt.
mick@localhost ~]$ sudo dnf list installed | grep php | tee packages.txt
[sudo] password for mick:
php.x86_64 8.2.25-1.module+el8.10.0+90469+8883f508 @ol8_appstream
php-cli.x86_64 8.2.25-1.module+el8.10.0+90469+8883f508 @ol8_appstream
php-common.x86_64 8.2.25-1.module+el8.10.0+90469+8883f508 @ol8_appstream
php-fpm.x86_64 8.2.25-1.module+el8.10.0+90469+8883f508 @ol8_appstream
php-mbstring.x86_64 8.2.25-1.module+el8.10.0+90469+8883f508 @ol8_appstream
php-opcache.x86_64 8.2.25-1.module+el8.10.0+90469+8883f508 @ol8_appstream
php-pdo.x86_64 8.2.25-1.module+el8.10.0+90469+8883f508 @ol8_appstream
php-xml.x86_64 8.2.25-1.module+el8.10.0+90469+8883f508 @ol8_appstream
Встановлення PHP OCI8 на Oracle Linux 8
Для