Skip to content

Commit 52d09ee

Browse files
authored
Edit 03-application-servers.md for 8 (#2951)
* strip out 9 content * update modules to latest php for 8 * enable latest php for 8 * a couple of sentence updates
1 parent b92783f commit 52d09ee

File tree

1 file changed

+18
-94
lines changed

1 file changed

+18
-94
lines changed

docs/books/web_services/03-application-servers.md

Lines changed: 18 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ In this chapter, you will learn about PHP and PHP-FPM.
2929
:checkered_flag: **PHP**, **PHP-FPM**, **Application server**
3030

3131
**Knowledge**: :star: :star: :star:
32-
**Complexity**: :star: :star: :star:
32+
**Complexity**: :star: :star: :star:
3333

3434
**Reading time**: 30 minutes
3535

@@ -59,68 +59,37 @@ Rocky Linux, like its upstream, offers many versions of the language. Some of th
5959

6060
To obtain a list of available versions, enter the following command:
6161

62-
=== "9.3 PHP module list"
63-
64-
```bash
65-
$ sudo dnf module list php
66-
67-
Rocky Linux 9 - AppStream
68-
Name Stream Profiles Summary
69-
php 8.1 [d] common [d], devel, minimal
70-
71-
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
72-
```
73-
74-
The Remi repository offers more recent releases of PHP than the Appstream repository, including versions 8.2 and 8.3.
75-
76-
To install the Remi repository, run the following command:
77-
78-
```bash
79-
sudo dnf install https://rpms.remirepo.net/enterprise/remi-release-9.rpm
80-
```
81-
82-
Enable the Remi repository by running the following command:
83-
84-
```bash
85-
sudo dnf config-manager --set-enabled remi
86-
```
87-
88-
You can now activate a newer module (PHP 8.3) by entering the following command:
89-
90-
```bash
91-
sudo dnf module enable php:remi-8.3
92-
```
93-
94-
=== "8.9 PHP module list"
62+
### PHP module list
9563

9664
```bash
9765
$ sudo dnf module list php
9866
9967
Rocky Linux 8 - AppStream
100-
Name Stream Profiles Summary
101-
php 7.2 [d] common [d], devel, minimal PHP scripting language
102-
php 7.3 common [d], devel, minimal PHP scripting language
103-
php 7.4 common [d], devel, minimal PHP scripting language
104-
php 8.0 common [d], devel, minimal PHP scripting language
68+
Name Stream Profiles Summary
69+
php 7.2 [d] common [d], devel, minimal PHP scripting language
70+
php 7.3 common [d], devel, minimal PHP scripting language
71+
php 7.4 common [d], devel, minimal PHP scripting language
72+
php 8.0 common [d], devel, minimal PHP scripting language
73+
php 8.2 common [d], devel, minimal PHP scripting language
10574
10675
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
10776
```
10877

10978
Rocky provides different PHP modules from its AppStream repository.
11079

111-
You will note that Rocky 8.9's default version is 7.2, which has already reached its end of life at the time of this writing.
80+
You will note that the Rocky 8 default version is 7.2, which is already end of life at the time of this writing.
11281

11382
You can activate a newer module by entering the following command:
11483

11584
```bash
116-
sudo dnf module enable php:8.0
85+
sudo dnf module enable php:8.2
11786
==============================================================================================
11887
Package Architecture Version Repository Size
11988
==============================================================================================
12089
Enabling module streams:
12190
httpd 2.4
12291
nginx 1.14
123-
php 8.0
92+
php 8.2
12493
12594
Transaction Summary
12695
==============================================================================================
@@ -144,63 +113,18 @@ The installation of PHP is relatively trivial. It consists of installing the mai
144113

145114
The example below installs PHP with the modules usually installed with it.
146115

147-
=== "9.3 install PHP"
148-
149-
```bash
150-
sudo dnf install php php-cli php-gd php-curl php-zip php-mbstring
151-
```
152-
153-
During installation, you will be prompted to import GPG keys for the epel9 (Extra Packages for Enterprise Linux 9) and Remi repositories. Enter y to import the keys:
154-
155-
```bash
156-
Extra Packages for Enterprise Linux 9 - x86_64
157-
Importing GPG key 0x3228467C:
158-
Userid : "Fedora (epel9) <epel@fedoraproject.org>"
159-
Fingerprint: FF8A D134 4597 106E CE81 3B91 8A38 72BF 3228 467C
160-
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-9
161-
Is this ok [y/N]: y
162-
Key imported successfully
163-
Remi's RPM repository for Enterprise Linux 9 - x86_64
164-
Importing GPG key 0x478F8947:
165-
Userid : "Remi's RPM repository (https://rpms.remirepo.net/) <remi@remirepo.net>"
166-
Fingerprint: B1AB F71E 14C9 D748 97E1 98A8 B195 27F1 478F 8947
167-
From : /etc/pki/rpm-gpg/RPM-GPG-KEY-remi.el9
168-
Is this ok [y/N]: y
169-
Key imported successfully
170-
Running transaction check
171-
Transaction check succeeded.
172-
Running transaction test
173-
Transaction test succeeded.
174-
175-
Complete!
176-
```
177-
178-
=== "8.9 install PHP"
179-
180116
```bash
181117
sudo dnf install php php-cli php-gd php-curl php-zip php-mbstring
182118
```
183119

184120
You can check that the installed version corresponds to the expected one:
185121

186-
=== "9.3 check PHP version"
187-
188-
```bash
189-
$ php -v
190-
PHP 8.3.2 (cli) (built: Jan 16 2024 13:46:41) (NTS gcc x86_64)
191-
Copyright (c) The PHP Group
192-
Zend Engine v4.3.2, Copyright (c) Zend Technologies
193-
with Zend OPcache v8.3.2, Copyright (c), by Zend Technologies
194-
```
195-
196-
=== "8.9 check PHP version"
197-
198122
```bash
199-
$ php -v
200-
PHP 7.4.19 (cli) (built: May 4 2021 11:06:37) ( NTS )
201-
Copyright (c) The PHP Group
202-
Zend Engine v3.4.0, Copyright (c) Zend Technologies
203-
with Zend OPcache v7.4.19, Copyright (c), by Zend Technologies
123+
php -v
124+
PHP 8.2.28 (cli) (built: Mar 11 2025 17:58:12) (NTS gcc x86_64)
125+
Copyright (c) The PHP Group
126+
Zend Engine v4.2.28, Copyright (c) Zend Technologies
127+
with Zend OPcache v8.2.28, Copyright (c), by Zend Technologies
204128
```
205129

206130
### Apache Integration
@@ -344,7 +268,7 @@ pm.max_children = 10
344268

345269
This configuration starts with 10 processes.
346270

347-
In dynamic mode, PHP-FPM starts at *most* the number of processes specified by the` pm.max_children` value. It first starts some processes corresponding to `pm.start_servers`, keeping at least the value of `pm.min_spare_servers` of inactive processes and, at most, `pm.max_spare_servers` of inactive processes.
271+
In dynamic mode, PHP-FPM starts at *most* the number of processes specified by the`pm.max_children` value. It first starts some processes corresponding to `pm.start_servers`, keeping at least the value of `pm.min_spare_servers` of inactive processes and, at most, `pm.max_spare_servers` of inactive processes.
348272

349273
Example:
350274

@@ -368,7 +292,7 @@ A third mode of operation is the `ondemand` mode. This mode only starts a proces
368292

369293
#### Process status
370294

371-
Like Apache and its `mod_status` module, PHP-FPM offers a page indicating the process's status.
295+
Just as with Apache and its `mod_status` module, PHP-FPM offers a page indicating the process's status.
372296

373297
To activate the page, set its access path with the `pm.status_path` directive:
374298

0 commit comments

Comments
 (0)