ja:documentation:pandorafms:technical_annexes:18_php_8

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

次のリビジョン
前のリビジョン
ja:documentation:pandorafms:technical_annexes:18_php_8 [2023/03/01 08:09] – 作成 - 外部編集 127.0.0.1ja:documentation:pandorafms:technical_annexes:18_php_8 [2024/04/06 07:40] (現在) – [Rocky Linux 8/AlmaLinux 8/RHEL 8] junichi
行 32: 行 32:
   * データバックアップ手順を実施します。詳細は、[[:ja:documentation:07_technical_annexes:07_backup_and_restore_procedures|バックアップおよびリストア手順]] を参照してください。   * データバックアップ手順を実施します。詳細は、[[:ja:documentation:07_technical_annexes:07_backup_and_restore_procedures|バックアップおよびリストア手順]] を参照してください。
    
-===== CentOS 7 =====+===== Rocky Linux 8/AlmaLinux 8/RHEL 8 ===== 
 + 
 +==== PHP 8.0 へのアップデート ====
  
   * Configure the repositories:   * Configure the repositories:
  
-  * リポジトリ設定します。 +  * リポジトリ設定:
-<code>+
  
-yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm +<code bash> 
-yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm +dnf module reset php -y 
-yum -y install yum-utils +dnf -y module enable php:remi-8.0
-yum-config-manager --disable 'remi-php*' +
-yum-config-manager --enable remi-php80+
  
 </code> </code>
  
-  * Install PHP 8 and its dependencies:+  * Install PHP:
  
-  * PHP 8 とそ依存ファイルをインストールします。 +  * PHP のインストール
-<code> + 
-yum install -y \ +<code bash
- php php-mcrypt php-cli php-gd php-curl php-mysql +dnf install -y \ 
- php-ldap php-zip php-fileinfo php-snmp php-mbstring \ +php php-mcrypt php-cli php-gd 
- php-pecl-zip php-xmlrpc libxslt php-xml php-fpm+php-curl php-session php-mysqlnd 
 +php-ldap php-zip php-zlib php-fileinfo 
 +php-gettext php-snmp php-mbstring \ 
 +php-pecl-zip php-xmlrpc 
 +php-xml php-yaml
  
 </code> </code>
  
-<code> +  * Restart php-fpm ''systemctl restart php-fpm''
-systemctl restart httpd+  * Verify the version installed: ''php -v''.
  
-</code>+  * php-fpm の再起動: ''systemctl restart php-fpm'' 
 +  * インストールバージョンの確認: ''php -v''
  
-  * Verify the version installed with:+==== PHP 8.2 へのアップデート ====
  
-  * インストールされたバージョンを確認します。 +<code bash
-<code> +dnf module reset php -
-php --version+dnf -y module enable php:remi-8.2 
 + 
 +dnf install -y \ 
 +php php-mcrypt php-cli php-gd \ 
 +php-curl php-session php-mysqlnd \ 
 +php-ldap php-zip php-zlib php-fileinfo \ 
 +php-gettext php-snmp php-mbstring \ 
 +php-pecl-zip php-xmlrpc \ 
 +php-xml php-yaml 
 + 
 +systemctl restart php-fpm
  
 </code> </code>
  
-You will get an answer similar to the following:+===== Ubuntu server 22.04 =====
  
-次のような応答が得られます。 +<code bash
-<code> +dpkg -l | grep php | tee packages.txt 
-PHP 8.0.19 (cli) (built: May 10 2022 08:07:35) ( NTS gcc x86_64 ) +# Remove old PHP 
-Copyright (c) The PHP Group +# When upgrading from older PHP version: 
-Zend Engine v4.0.19, Copyright (c) Zend Technologies+a2disconf php8.1-fpm 2> /dev/null 
 +a2disconf php8.0-fpm 2> /dev/null 
 +dpkg -l | grep php | awk '{print $2}' | xargs apt -y purge 
 + 
 + 
 +## Define new php 
 +export DEBIAN_FRONTEND=noninteractive 
 +export NEEDRESTART_SUSPEND=1 
 +export PHPVER="8.2" 
 +add-apt-repository ppa:ondrej/php  
 +apt update 
 +apt install -y php$PHPVER php$PHPVER-fpm php$PHPVER-common \ 
 +                    php$PHPVER-cli libapache2-mod-fcgid apache2 \ 
 +                    php$PHPVER-bz2 php$PHPVER-mbstring php$PHPVER-intl  php$PHPVER-mcrypt \ 
 +                    php$PHPVER-gd  php$PHPVER-curl  php$PHPVER-mysql php$PHPVER-ldap \ 
 +                    php$PHPVER-fileinfo php$PHPVER-gettext php$PHPVER-snmp php$PHPVER-mbstring \ 
 +                    php$PHPVER-zip php$PHPVER-xmlrpc php$PHPVER-xml php$PHPVER-yaml 
 + 
 +a2enmod proxy_fcgi setenvif 
 +a2enconf php$PHPVER-fpm 
 + 
 +## Prepare php config 
 +rm -f /etc/php.ini 
 +ln -s /etc/php/$PHPVER/fpm/php.ini /etc/ 
 +sed --follow-symlinks -i -e "s/^max_input_time.*/max_input_time = -1/g" /etc/php.ini 
 +sed --follow-symlinks -i -e "s/^max_execution_time.*/max_execution_time = 0/g" /etc/php.ini 
 +sed --follow-symlinks -i -e "s/^upload_max_filesize.*/upload_max_filesize = 800M/g" /etc/php.ini 
 +sed --follow-symlinks -i -e "s/^memory_limit.*/memory_limit = 800M/g" /etc/php.ini 
 +sed --follow-symlinks -i -e "s/.*post_max_size =.*/post_max_size = 800M/" /etc/php.ini 
 +sed --follow-symlinks -i -e "s/^disable_functions/;disable_functions/" /etc/php.ini 
 + 
 +systemctl enable php$PHPVER-fpm --now 
 +systemctl restart php$PHPVER-fpm 
 +systemctl restart apache2
  
 </code> </code>
  
-===== RHEL 7 =====+===== CentOS 7 =====
  
-<WRAP center round tip 75%>+<WRAP center round info 90%>
  
-To upgrade to PHP 8 in RHEL 7 [[https://pandorafms.com/en/technical-support/|contact Pandora FMS support department]].+The end-of-life of the CentOS 7 operating system is June 2024.
  
 </WRAP> </WRAP>
  
-<WRAP center round tip 75%>+<WRAP center round info 90%>
  
-RHEL 7 で PHP 8 にアップグレードるには、[[https://pandorafms.com/ja/contact/|Pandora FMS サポート]] へ連絡ください+CentOS の EoL は 2024年6月です。
  
 </WRAP> </WRAP>
  
-===== Rocky Linux 8/AlmaLinux 8/RHEL 8 =====+==== CentOS 7 での PHP 8.0 へのアップデート ====
  
   * Configure the repositories:   * Configure the repositories:
  
   * リポジトリを設定します。   * リポジトリを設定します。
-<code bash+  
-dnf module reset php -y +<code> 
-dnf module enable php:remi-8.0+ 
 +yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm 
 +yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm 
 +yum -y install yum-utils 
 +yum-config-manager --disable 'remi-php*' 
 +yum-config-manager --enable remi-php80
  
 </code> </code>
  
-  * Install PHP:+  * Install PHP 8 and its dependencies:
  
-  * PHP をインストールします。 +  * PHP 8 とその依存ファイルをインストールします。
-<code bash> +
-dnf install -y php php-fpm+
  
 +<code>
 +yum install -y \
 + php-mcrypt php-cli php-gd php-curl php-session \
 + php-mysqlnd php-ldap php-zip php-zlib php-fileinfo \
 + php-gettext php-snmp php-mbstring php-pecl-zip \
 + php-xmlrpc php-xml php-yaml mod_php
 </code> </code>
  
-  * Install dependencies:+  * Restart the web server''systemctl restart httpd'' 
 +  * Verify the version installed with: ''php -v''  .
  
-  * 依存ファイルをインストールします。 +  * ウェブサーバの再起動: ''systemctl restart httpd'' 
-<code bash+  * インストールバージョンの確認: ''php -v'' 
-dnf install -y + 
- php-cli php-fpm php-curl php-mysqlnd php-gd php-opcache php-zip \ +==== CentOS 7 での PHP 8.2 へのアップデート ==== 
- php-intl php-common php-bcmath php-imap php-imagick php-xmlrpc \ + 
- php-json php-readline php-memcached php-redis php-mbstring php-apcu \ +  * Configure the repositories: 
- php-xml php-dom php-redis php-memcached php-memcache+ 
 +  * リポジトリを設定します。 
 + 
 +<code> 
 + 
 +yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm 
 +yum -y install https://rpms.remirepo.net/enterprise/remi-release-7.rpm 
 +yum -y install yum-utils 
 +yum-config-manager --disable 'remi-php*' 
 +yum-config-manager --enable remi-php82
  
 </code> </code>
  
-  * Restart php-fpm+  * Install PHP 8 and its dependencies:
  
-  * php-ftm 再起動します。+  * PHP 8 とその依存ファイルインストールします。
  
-<code bash+<code> 
-systemctl restart php-fpm+yum install -y \ 
 + php-mcrypt php-cli php-gd php-curl php-session \ 
 + php-mysqlnd php-ldap php-zip php-zlib php-fileinfo \ 
 + php-gettext php-snmp php-mbstring php-pecl-zip \ 
 + php-xmlrpc php-xml php-yaml mod_php
 </code> </code>
  
 +  * Restart the web server: ''systemctl restart httpd''  .
 +  * Verify the version installed with: ''php -v''  .
  
-  * Verify the version installed:+  * ウェブサーバの再起動''systemctl restart httpd'' 
 +  * インストールバージョンの確認: ''php -v''
  
-  * インストールしたバージョンを確認します。 +===== RHEL 7 =====
-<code bash> +
-php --version+
  
-</code>+<WRAP center round tip 75%>
  
-You will get an answer similar to the following:+To upgrade to PHP 8 in RHEL 7 [[https://pandorafms.com/en/technical-support/|contact Pandora FMS support department]].
  
-次のような応答が得られます。+</WRAP> 
 + 
 +<WRAP center round tip 75%> 
 + 
 +RHEL 7 で PHP 8 にアップグレードるには、[[https://pandorafms.com/ja/contact/|Pandora FMS サポート]] へ連絡ください 
 + 
 +</WRAP>
  
-<code> 
-PHP 8.0.19 (cli) (built: May 10 2022 08:07:35) ( NTS gcc x86_64 ) 
-Copyright (c) The PHP Group 
-Zend Engine v4.0.19, Copyright (c) Zend Technologies 
  
-</code> 
  
 [[ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]] [[ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]]
  
  
  • ja/documentation/pandorafms/technical_annexes/18_php_8.1677658152.txt.gz
  • 最終更新: 2023/03/01 08:09
  • by 127.0.0.1