php7.1と php7.2とphp7.4 MySQL拡張phpを同時インストール *************************************************************************************************** [root@falcon21 ~]# yum remove php-* [root@falcon21 ~]# dnf module reset php php7.1と php7.2とphp7.4 MySQL拡張phpを同時インストール [root@falcon21 ~]# for v in 71 72 74 ; do yum -y install php$v php$v-php-{gd,xml,mbstring,mysqlnd}; done ----------------------------------- MySQL拡張phpを同時追加インストール [root@falcon21 ~]# for v in 71 72 74 ; do yum -y install php$v-php-{mysql,mysqli,zlib,ssh2,ftp,simplexml}; done [root@falcon21 ~]# for v in 71 72 74 ; do yum -y install php$v-php-{mcrypt,sockets,xmlreader,pcre,imagick,zip}; done [root@falcon21 ~]# for v in 71 72 74 ; do yum -y install php$v-php-{filter,dom,curl,exif,fileinfo,hash,iconv,openssl}; done [root@falcon21 ~]# for v in 71 72 74 ; do yum -y install php$v-php-{filter,dom,curl,exif,fileinfo,hash,sodium,bcmath}; done ---------------------------------------------- phpバージョンの確認 [root@falcon21 ~]# for v in 71 72 74 ; do php$v -v ; echo \ ; done PHP 7.1.33 (cli) (built: Feb 3 2021 09:20:40) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies PHP 7.2.34 (cli) (built: Feb 3 2021 08:32:06) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies PHP 7.4.15 (cli) (built: Feb 2 2021 14:19:57) ( NTS ) Copyright (c) The PHP Group Zend Engine v3.4.0, Copyright (c) Zend Technologies ------------------------------- php.ini 配置確認 [root@falcon21 ~]# php -v -bash: /usr/bin/php: そのようなファイルやディレクトリはありません [root@falcon21 ~]# for v in 71 72 74 ; do php$v --ini | grep Loaded | awk '{print $1}' ; done Loaded Loaded Loaded ---------------------------------- 複数php-fpmインストール [root@falcon21 ~]# for v in 71 72 74 ; do yum -y install php$v-php-fpm ; done -------------------------------- php-fpm 設定 プロセスマネージャーの変更 [root@falcon21 ~]# for v in 71 72 74 ; do sed -i '/pm = /s/dynamic/ondemand/' /etc/opt/remi/php$v/php-fpm.d /www.conf ; done ---------------------------------- プロセス確認 [root@falcon21 ~]# for v in 71 72 74 ; do grep 'pm = ondemand' /etc/opt/remi/php$v/php-fpm.d/www.conf ; done pm = ondemand pm = ondemand ----------------------------------- php-fpm listenポート指定 [root@falcon21 ~]# for v in 71 72 74 ; do sed -i "s/9000/90$v/" /etc/opt/remi/php$v/php-fpm.d/www.conf ; done ----------php71のリッスンポートをデフォルト9000にする------ php72のリッスンポートを 9072 にする php74のリッスンポートを 9074 にする ------------------------------- 確認 [root@falcon21 ~]# for v in 71 72 74 ; do grep 'listen = 127' /etc/opt/remi/php$v/php-fpm.d/www.conf ; done ****************************************************** Apache php71-php.confの設定(バーチャルホスト)設定 [root@falcon21 ~]# vi /etc/httpd/conf.d/php71-php.conf 4 #<Files ".user.ini"> 5 <Files ".php7.1.ini"> Apache php72-php.confの設定(バーチャルホスト)設定 [root@falcon21 ~]# vi /etc/httpd/conf.d/php72-php.conf 4 #<Files ".user.ini"> 5 <Files ".php7.2.ini"> Apache php74-php.confの設定(バーチャルホスト)設定 [root@falcon21 ~]# vi /etc/httpd/conf.d/php74-php.conf 4 #<Files ".user.ini"> 5 <Files ".php7.4.ini"> ------------------------------------------------- php-fpm の起動 [root@falcon21 ~]# for v in 71 72 74 ; do systemctl start php$v-php-fpm ; systemctl enable php$v-php-fpm ; done 起動詳細確認 [root@falcon21 ~]# for v in 71 72 74 ; do systemctl status php$v-php-fpm ; systemctl status php$v-php-fpm ; done ● php71-php-fpm.service - The PHP FastCGI Process Manager Loaded: loaded (/usr/lib/systemd/system/php71-php-fpm.service; enabled; vendor preset: disabled) Active: active (running) since Mon 2021-02-15 03:27:49 JST; 3min 4s ago Main PID: 30953 (php-fpm) Status: "Processes active: 0, idle: 5, Requests: 0, slow: 0, Traffic: 0req/sec" Tasks: 6 (limit: 48693) Memory: 37.7M CGroup: /system.slice/php71-php-fpm.service ├─30953 php-fpm: master process (/etc/opt/remi/php71/php-fpm.conf) ├─30954 php-fpm: pool www ├─30955 php-fpm: pool www ├─30956 php-fpm: pool www ├─30957 php-fpm: pool www └─30958 php-fpm: pool www 2月 15 03:27:49 falcon21.space systemd[1]: Starting The PHP FastCGI Process Manager... 2月 15 03:27:49 falcon21.space systemd[1]: Started The PHP FastCGI Process Manager. ● php71-php-fpm.service - The PHP FastCGI Process Manager Loaded: loaded (/usr/lib/systemd/system/php71-php-fpm.service; enabled; vendor preset: disabled) Active: active (running) since Mon 2021-02-15 03:27:49 JST; 3min 4s ago Main PID: 30953 (php-fpm) Status: "Processes active: 0, idle: 5, Requests: 0, slow: 0, Traffic: 0req/sec" Tasks: 6 (limit: 48693) Memory: 37.7M CGroup: /system.slice/php71-php-fpm.service ├─30953 php-fpm: master process (/etc/opt/remi/php71/php-fpm.conf) ├─30954 php-fpm: pool www ├─30955 php-fpm: pool www ├─30956 php-fpm: pool www ├─30957 php-fpm: pool www └─30958 php-fpm: pool www 2月 15 03:27:49 falcon21.space systemd[1]: Starting The PHP FastCGI Process Manager... 2月 15 03:27:49 falcon21.space systemd[1]: Started The PHP FastCGI Process Manager. ● php72-php-fpm.service - The PHP FastCGI Process Manager Loaded: loaded (/usr/lib/systemd/system/php72-php-fpm.service; enabled; vendor preset: disabled) Active: active (running) since Mon 2021-02-15 02:53:42 JST; 37min ago Main PID: 30120 (php-fpm) Status: "Processes active: 0, idle: 0, Requests: 10, slow: 0, Traffic: 0req/sec" Tasks: 1 (limit: 48693) Memory: 17.1M CGroup: /system.slice/php72-php-fpm.service └─30120 php-fpm: master process (/etc/opt/remi/php72/php-fpm.conf) 2月 15 02:53:42 falcon21.space systemd[1]: php72-php-fpm.service: Succeeded. 2月 15 02:53:42 falcon21.space systemd[1]: Stopped The PHP FastCGI Process Manager. 2月 15 02:53:42 falcon21.space systemd[1]: Starting The PHP FastCGI Process Manager... 2月 15 02:53:42 falcon21.space systemd[1]: Started The PHP FastCGI Process Manager. ● php72-php-fpm.service - The PHP FastCGI Process Manager Loaded: loaded (/usr/lib/systemd/system/php72-php-fpm.service; enabled; vendor preset: disabled) Active: active (running) since Mon 2021-02-15 02:53:42 JST; 37min ago Main PID: 30120 (php-fpm) Status: "Processes active: 0, idle: 0, Requests: 10, slow: 0, Traffic: 0req/sec" Tasks: 1 (limit: 48693) Memory: 17.1M CGroup: /system.slice/php72-php-fpm.service └─30120 php-fpm: master process (/etc/opt/remi/php72/php-fpm.conf) 2月 15 02:53:42 falcon21.space systemd[1]: php72-php-fpm.service: Succeeded. 2月 15 02:53:42 falcon21.space systemd[1]: Stopped The PHP FastCGI Process Manager. 2月 15 02:53:42 falcon21.space systemd[1]: Starting The PHP FastCGI Process Manager... 2月 15 02:53:42 falcon21.space systemd[1]: Started The PHP FastCGI Process Manager. ● php74-php-fpm.service - The PHP FastCGI Process Manager Loaded: loaded (/usr/lib/systemd/system/php74-php-fpm.service; enabled; vendor preset: disabled) Active: active (running) since Mon 2021-02-15 02:53:49 JST; 37min ago Main PID: 30131 (php-fpm) Status: "Processes active: 0, idle: 0, Requests: 0, slow: 0, Traffic: 0req/sec" Tasks: 1 (limit: 48693) Memory: 8.2M CGroup: /system.slice/php74-php-fpm.service └─30131 php-fpm: master process (/etc/opt/remi/php74/php-fpm.conf) 2月 15 02:53:49 falcon21.space systemd[1]: php74-php-fpm.service: Succeeded. 2月 15 02:53:49 falcon21.space systemd[1]: Stopped The PHP FastCGI Process Manager. 2月 15 02:53:49 falcon21.space systemd[1]: Starting The PHP FastCGI Process Manager... 2月 15 02:53:49 falcon21.space systemd[1]: Started The PHP FastCGI Process Manager. ● php74-php-fpm.service - The PHP FastCGI Process Manager Loaded: loaded (/usr/lib/systemd/system/php74-php-fpm.service; enabled; vendor preset: disabled) Active: active (running) since Mon 2021-02-15 02:53:49 JST; 37min ago Main PID: 30131 (php-fpm) Status: "Processes active: 0, idle: 0, Requests: 0, slow: 0, Traffic: 0req/sec" Tasks: 1 (limit: 48693) Memory: 8.2M CGroup: /system.slice/php74-php-fpm.service └─30131 php-fpm: master process (/etc/opt/remi/php74/php-fpm.conf) 2月 15 02:53:49 falcon21.space systemd[1]: php74-php-fpm.service: Succeeded. 2月 15 02:53:49 falcon21.space systemd[1]: Stopped The PHP FastCGI Process Manager. 2月 15 02:53:49 falcon21.space systemd[1]: Starting The PHP FastCGI Process Manager... 2月 15 02:53:49 falcon21.space systemd[1]: Started The PHP FastCGI Process Manager. *********************************************** Apache vhost.conf編集 [root@falcon21 ~]# vi /etc/httpd/conf.d/vhost.conf <VirtualHost *:80> DocumentRoot "/var/www/html" ServerName php71 <FilesMatch \.php71> SetHandler "proxy:fcgi://127.0.0.1:9000" </FilesMatch> <Directory "/var/www/html"> AllowOverride All Options +ExecCGI AddHandler cgi-script .pl .cgi Require method GET POST OPTIONS AllowOverride FileInfo AuthConfig Limit Indexes Require method GET POST OPTIONS </Directory> </VirtualHost> <VirtualHost *:80> DocumentRoot "/home/blender/html" ServerName php72 <FilesMatch \.php72> SetHandler "proxy:fcgi://127.0.0.1:9072" </FilesMatch> <Directory "/home/blender/html"> AllowOverride All Options +ExecCGI AddHandler cgi-script .pl .cgi Require method GET POST OPTIONS AllowOverride FileInfo AuthConfig Limit Indexes Require method GET POST OPTIONS </Directory> </VirtualHost> <VirtualHost *:80> DocumentRoot "/home/anpachi/html" ServerName php74 <FilesMatch \.php74> SetHandler "proxy:fcgi://127.0.0.1:9074" </FilesMatch> <Directory "/home/anpachi/html"> AllowOverride All Options +ExecCGI AddHandler cgi-script .pl .cgi Require method GET POST OPTIONS AllowOverride FileInfo AuthConfig Limit Indexes Require method GET POST OPTIONS </Directory> </VirtualHost> ******************************************************** php,ini 設定 php71用にデフォルトphp.ini設定 [root@falcon21 ~]# vi /etc/php.ini 170 ;user_ini.filename = ".user.ini" 171 user_ini.filename = ".php71.ini" 177 user_ini.cache_ttl = 300 185 engine = On 198 short_open_tag = Off 202 precision = 14 202 precision = 14 226 output_buffering = 4096 270 zlib.output_compression = Off 288 implicit_flush = Off 296 unserialize_callback_func = 304 serialize_precision = -1 316 disable_functions = 321 disable_classes = 353 zend.enable_gc = On 376 expose_php = On 385 max_execution_time = 30 395 max_input_time = 60 406 memory_limit = 128M 462 error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT 479 display_errors = On 490 display_startup_errors = On 500 log_errors = On 505 log_errors_max_len = 1024 510 ignore_repeated_errors = Off 516 ignore_repeated_source = Off 522 report_memleaks = On 552 html_errors = On 623 variables_order = "GPCS" 636 request_order = "GP" 651 register_argc_argv = Off 659 auto_globals_jit = On 674 post_max_size = 1500M /// 678 auto_prepend_file = 682 auto_append_file = 689 default_mimetype = "text/html" 693 default_charset = "UTF-8" 730 doc_root = 735 user_dir = 751 enable_dl = Off 818 file_uploads = On 827 upload_max_filesize = 1500M //// 830 max_file_uploads = 20 838 allow_url_fopen = On 842 allow_url_include = Off 899 cli_server.color = On 968 pcre.jit=0 980 pdo_mysql.cache_size = 2000 985 pdo_mysql.default_socket= 999 sendmail_path = /usr/sbin/postfix -t -i 1007 mail.add_x_header = On 1014 mail.log = /var/log/maillog // 1032 odbc.allow_persistent = On 1036 odbc.check_persistent = On 1040 odbc.max_persistent = -1 1044 odbc.max_links = -1 1049 odbc.defaultlrl = 4096 1055 odbc.defaultbinmode = 1 1061 ibase.allow_persistent = 1 1064 ibase.max_persistent = -1 1067 ibase.max_links = -1 1082 ibase.timestampformat = "%Y-%m-%d %H:%M:%S" 1085 ibase.dateformat = "%Y-%m-%d" 1088 ibase.timeformat = "%H:%M:%S" 1094 mysqli.max_persistent = -1 1102 mysqli.allow_persistent = On 1106 mysqli.max_links = -1 1110 mysqli.cache_size = 2500 // 1117 mysqli.default_port = 3306 1122 mysqli.default_socket = 1126 mysqli.default_host = 1130 mysqli.default_user = 1138 mysqli.default_pw = 1141 mysqli.reconnect = Off 1147 mysqlnd.collect_statistics = On 1152 mysqlnd.collect_memory_statistics = On 1188 pgsql.allow_persistent = On 1193 pgsql.auto_reset_persistent = Off 1197 pgsql.max_persistent = -1 1201 pgsql.max_links = -1 1206 pgsql.ignore_notice = 0 1216 bcmath.scale = 1 1225 session.save_handler = files 1266 session.use_strict_mode = 0 1270 session.use_cookies = 1 1280 session.use_only_cookies = 1 1284 session.name = PHPSESSID 1288 session.auto_start = 0 1292 session.cookie_lifetime = 0 1296 session.cookie_path = / 1300 session.cookie_domain = 1304 session.cookie_httponly = 1308 session.serialize_handler = php 1320 session.gc_probability = 1 1334 session.gc_divisor = 1000 1339 session.gc_maxlifetime = 1440 1353 session.referer_check = 1358 session.cache_limiter = nocache 1362 session.cache_expire = 180 1374 session.use_trans_sid = 0 1383 session.sid_length = 26 1395 session.trans_sid_tags = "a=href,area=href,frame=src,form=" 1420 session.sid_bits_per_character = 5 1481 zend.assertions = -1 1485 assert.active = On 1489 assert.exception = On 1493 assert.warning = On 1501 assert.callback = 1 1506 assert.quiet_eval = 1 1512 mbstring.language = Japanese // 1520 mbstring.internal_encoding = UTF-8 // 1529 mbstring.http_input = UTF-8 // 1540 mbstring.http_output = pass 1549 mbstring.encoding_translation = On 1554 mbstring.detect_order = auto 1559 mbstring.substitute_character = none 1621 tidy.clean_output = Off 1626 soap.wsdl_cache_enabled=1 1634 soap.wsdl_cache_dir="/tmp" 1639 soap.wsdl_cache_ttl=86400 1642 soap.wsdl_cache_limit = 5 1650 ldap.max_links = -1 ------------------------------------- /etc/php71.ini 設定 [root@falcon21 ~]# cp /etc/php.ini /etc/php71.ini /etc/opt/remi/php71/php.ini 設定 [root@falcon21 ~]# cp /etc/php.ini /etc/opt/remi/php71/php.ini /etc/opt/remi/php72/php.ini 設定 [root@falcon21 ~]# cp /etc/php.ini /etc/opt/remi/php72/php.ini [root@falcon21 ~]# vi /etc/opt/remi/php72/php.ini 170 ;user_ini.filename = ".user.ini" 171 user_ini.filename = ".php72.ini" /etc/opt/remi/php74/php.ini 設定 [root@falcon21 ~]# cp /etc/php.ini /etc/opt/remi/php74/php.ini [root@falcon21 ~]# vi /etc/opt/remi/php74/php.ini 170 ;user_ini.filename = ".user.ini" 171 user_ini.filename = ".php74.ini" ********************************************************************** [root@falcon21 ~]# ll /etc/opt/remi/ 合計 0 drwxr-xr-x 3 root root 19 2月 15 02:06 php70 drwxr-xr-x 12 root root 195 2月 15 08:18 php71 drwxr-xr-x 12 root root 170 1月 14 11:39 php72 drwxr-xr-x 12 root root 206 12月 19 16:54 php74 [root@falcon21 ~]# ll /etc/opt/remi/php71 合計 76 drwxr-xr-x 4 root root 38 2月 15 02:11 X11 drwxr-xr-x 2 root root 6 2月 20 2019 opt -rw-r--r-- 1 root root 4103 2月 3 18:24 php-fpm.conf drwxr-xr-x 2 root root 22 2月 15 03:06 php-fpm.d drwxr-xr-x 2 root root 4096 2月 15 02:53 php.d -rw-r--r-- 1 root root 62394 2月 3 18:24 php.ini drwxr-xr-x 2 root root 6 2月 20 2019 pki drwxr-xr-x 5 root root 52 2月 15 02:11 pm drwxr-xr-x 2 root root 6 2月 20 2019 skel drwxr-xr-x 2 root root 6 2月 20 2019 sysconfig drwxr-xr-x 3 root root 23 2月 15 02:11 xdg drwxr-xr-x 2 root root 6 2月 20 2019 xinetd.d [root@falcon21 ~]# vi /etc/opt/remi/php71/php-fpm.conf [root@falcon21 ~]# vi /etc/opt/remi/php72/php-fpm.conf [root@falcon21 ~]# vi /etc/opt/remi/php74/php-fpm.conf ------------------------------------ www.conf 編集 [root@falcon21 ~]# ll /etc/php-fpm.d/ -rw-r--r-- 1 root root 19541 2月 15 08:07 www.conf [root@falcon21 ~]# vi /etc/php-fpm.d/www.conf 24 user = apache 26 group = apache 38 ;listen = /run/php-fpm/www.sock 39 listen = /var/opt/remi/php71/run/php-fpm/www.sock 43 listen.backlog = 511 51 listen.mode = 0660 56 listen.acl_users = apache 57 listen.acl_groups = apache 65 listen.allowed_clients = 127.0.0.1 79 ; process.dumpable = yes 80 process.dumpable = no 106 pm = ondemand 117 pm.max_children = 50 122 pm.start_servers = 5 127 pm.min_spare_servers = 5 132 pm.max_spare_servers = 5 137 pm.process_idle_timeout = 10s; 143 pm.max_requests = 500 259 ping.response = pong 322 access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%" 328 slowlog = /var/opt/remi/php71/log/php-fpm/www-slow.log 334 request_slowlog_timeout = 0 338 ;request_slowlog_trace_depth = 20 //エラーのため、コメント化 345 request_terminate_timeout = 0 349 rlimit_files = 1024 354 rlimit_core = 0 370 ;chdir = /var/www 371 chdir = /var/www/html //重要 372 chdir = /home/blender/html 379 ;catch_workers_output = yes 380 catch_workers_output = no 389 ;clear_env = no 390 clear_env = yes 398 ;security.limit_extensions = .php .php3 .php4 .php5 .php7 399 security.limit_extensions = .php .php7 404 env[HOSTNAME] = $HOSTNAME 405 env[PATH] = /usr/local/bin:/usr/bin:/bin 406 env[TMP] = /tmp 407 env[TMPDIR] = /tmp 408 env[TEMP] = /tmp 429 php_admin_value[sendmail_path] = /usr/sbin/postfix -t -i -f www@my.domain.com 430 php_flag[display_errors] = off 431 php_admin_value[error_log] = /var/log/php-fpm/www-error.log 432 php_admin_flag[log_errors] = on 433 php_admin_value[memory_limit] = 128M 443 php_value[session.save_handler] = files 444 ;php_value[session.save_path] = /var/lib/php/session 445 ;php_value[soap.wsdl_cache_dir] = /var/lib/php/wsdlcache 446 ;php_value[opcache.file_cache] = /var/lib/php/opcache 447 php_value[session.save_path] = /var/opt/remi/php71/lib/php/session 448 php_value[soap.wsdl_cache_dir] = /var/opt/remi/php71/lib/php/wsdlcache 449 php_value[opcache.file_cache] = /var/opt/remi/php71/lib/php/opcache 450 ----------------------- [root@falcon21 ~]# ll /etc/opt/remi/php71/ 合計 76 drwxr-xr-x 4 root root 38 2月 15 02:11 X11 drwxr-xr-x 2 root root 6 2月 20 2019 opt -rw-r--r-- 1 root root 4103 2月 3 18:24 php-fpm.conf drwxr-xr-x 2 root root 22 2月 15 03:06 php-fpm.d drwxr-xr-x 2 root root 4096 2月 15 02:53 php.d -rw-r--r-- 1 root root 62394 2月 3 18:24 php.ini drwxr-xr-x 2 root root 6 2月 20 2019 pki drwxr-xr-x 5 root root 52 2月 15 02:11 pm drwxr-xr-x 2 root root 6 2月 20 2019 skel drwxr-xr-x 2 root root 6 2月 20 2019 sysconfig drwxr-xr-x 3 root root 23 2月 15 02:11 xdg drwxr-xr-x 2 root root 6 2月 20 2019 xinetd.d [root@falcon21 ~]# ll /etc/opt/remi/php71/php-fpm.d -rw-r--r-- 1 root root 19503 2月 15 03:06 www.conf ---------------- /php*/php-fpm.d/www.conf 編集 /etc/opt/remi/php71/php-fpm.d/www.conf 編集 [root@falcon21 ~]# ll /etc/opt/remi/ 合計 0 drwxr-xr-x 3 root root 19 2月 15 02:06 php70 drwxr-xr-x 12 root root 195 2月 15 08:18 php71 drwxr-xr-x 12 root root 170 1月 14 11:39 php72 drwxr-xr-x 12 root root 206 12月 19 16:54 php74 [root@falcon21 ~]# ll /etc/opt/remi/php71 合計 76 drwxr-xr-x 4 root root 38 2月 15 02:11 X11 drwxr-xr-x 2 root root 6 2月 20 2019 opt -rw-r--r-- 1 root root 4103 2月 3 18:24 php-fpm.conf drwxr-xr-x 2 root root 22 2月 15 03:06 php-fpm.d drwxr-xr-x 2 root root 4096 2月 15 02:53 php.d -rw-r--r-- 1 root root 62394 2月 3 18:24 php.ini drwxr-xr-x 2 root root 6 2月 20 2019 pki drwxr-xr-x 5 root root 52 2月 15 02:11 pm drwxr-xr-x 2 root root 6 2月 20 2019 skel drwxr-xr-x 2 root root 6 2月 20 2019 sysconfig drwxr-xr-x 3 root root 23 2月 15 02:11 xdg drwxr-xr-x 2 root root 6 2月 20 2019 xinetd.d [root@falcon21 ~]# ll /etc/opt/remi/php71/php-fpm.d 合計 20 -rw-r--r-- 1 root root 19943 2月 15 09:43 www.conf /etc/opt/remi/php71/php-fpm.d/www.conf 編集 [root@falcon21 ~]# cp /etc/php-fpm.d/www.conf /etc/opt/remi/php71/php-fpm.d/www.conf cp: '/etc/opt/remi/php71/php-fpm.d/www.conf' を上書きしますか? y /etc/opt/remi/php72/php-fpm.d/www.conf 編集 [root@falcon21 ~]# cp /etc/php-fpm.d/www.conf /etc/opt/remi/php72/php-fpm.d/www.conf cp: '/etc/opt/remi/php72/php-fpm.d/www.conf' を上書きしますか? [root@falcon21 ~]# vi /etc/opt/remi/php72/php-fpm.d/www.conf 38 listen = /var/opt/remi/php72/run/php-fpm/www.sock 325 slowlog = /var/opt/remi/php72/log/php-fpm/www-slow.log 363 ;chdir = /var/www/html 364 chdir = /home/blender/html 421 php_admin_value[sendmail_path] = /usr/sbin/postfix -t -i -f www@falcon21.space 436 php_value[session.save_path] = /var/opt/remi/php72/lib/php/session 437 php_value[soap.wsdl_cache_dir] = /var/opt/remi/php72/lib/php/wsdlcache 438 php_value[opcache.file_cache] = /var/opt/remi/php72/lib/php/opcache 423 php_admin_value[error_log] = /var/opt/remi/php72/log/php-fpm/www-error.log -------------------- /etc/opt/remi/php74/php-fpm.d/www.conf 編集 [root@falcon21 ~]# cp /etc/php-fpm.d/www.conf /etc/opt/remi/php74/php-fpm.d/www.conf cp: '/etc/opt/remi/php74/php-fpm.d/www.conf' を上書きしますか? y [root@falcon21 ~]# vi /etc/opt/remi/php74/php-fpm.d/www.conf 328 slowlog = /var/opt/remi/php74/log/php-fpm/www-slow.log 39 listen = /var/opt/remi/php74/run/php-fpm/www.sock 370 ;chdir = /var/www 371 ;chdir = /var/www/html 372 ;chdir = /home/blender/html 447 php_value[session.save_path] = /var/opt/remi/php74/lib/php/session 448 php_value[soap.wsdl_cache_dir] = /var/opt/remi/php74/lib/php/wsdlcache 449 php_value[opcache.file_cache] = /var/opt/remi/php74/lib/php/opcache --------------------------- php-fpm.conf 編集 [root@falcon21 ~]# ll /etc/opt/remi/php71 合計 76 drwxr-xr-x 4 root root 38 2月 15 02:11 X11 drwxr-xr-x 2 root root 6 2月 20 2019 opt -rw-r--r-- 1 root root 4103 2月 3 18:24 php-fpm.conf drwxr-xr-x 2 root root 22 2月 15 03:06 php-fpm.d drwxr-xr-x 2 root root 4096 2月 15 02:53 php.d -rw-r--r-- 1 root root 62394 2月 3 18:24 php.ini drwxr-xr-x 2 root root 6 2月 20 2019 pki drwxr-xr-x 5 root root 52 2月 15 02:11 pm drwxr-xr-x 2 root root 6 2月 20 2019 skel drwxr-xr-x 2 root root 6 2月 20 2019 sysconfig drwxr-xr-x 3 root root 23 2月 15 02:11 xdg drwxr-xr-x 2 root root 6 2月 20 2019 xinetd.d /etc/php-fpm.conf デフォルトで、php71を使う設定 [root@falcon21 ~]# vi /etc/php-fpm.conf 11 include=/etc/opt/remi/php71/php-fpm.d/*.conf 20 pid = /var/opt/remi/php71/run/php-fpm/php-fpm.pid 26 error_log = /var/opt/remi/php71/log/php-fpm/error.log 35 syslog.facility = daemon 41 syslog.ident = php-fpm 46 log_level = notice 55 ;log_limit = 1024 //エラーのためコメント化 64 ;log_buffering = yes //エラーのためコメント化 70 emergency_restart_threshold = 0 78 emergency_restart_interval = 0 84 process_control_timeout = 0 91 process.max = 0 103 daemonize = yes 107 rlimit_files = 1024 112 rlimit_core = 0 119 events.mechanism = epoll 127 systemd_interval = 10 ----------------- /etc/opt/remi/php71/php-fpm.conf 編集 [root@falcon21 ~]# cp /etc/php-fpm.conf /etc/opt/remi/php71/php-fpm.conf cp: '/etc/opt/remi/php71/php-fpm.conf' を上書きしますか? y /etc/opt/remi/php72/php-fpm.conf 編集 [root@falcon21 ~]# cp /etc/php-fpm.conf /etc/opt/remi/php72/php-fpm.conf cp: '/etc/opt/remi/php72/php-fpm.conf' を上書きしますか? y [root@falcon21 ~]# vi /etc/opt/remi/php72/php-fpm.conf 11 ;include=/etc/php-fpm.d/*.conf 12 include= /etc/opt/remi/php72/php-fpm.d/*.conf 21 ;pid = /run/php-fpm/php-fpm.pid 22 pid = /var/opt/remi/php72/php-fpm.pid 28 ;error_log = /var/log/php-fpm/error.log 29 error_log = /var/opt/remi/php72/log/php-fpm/error.log /etc/opt/remi/php74/php-fpm.conf 編集 [root@falcon21 ~]# cp /etc/php-fpm.conf /etc/opt/remi/php74/php-fpm.conf cp: '/etc/opt/remi/php74/php-fpm.conf' を上書きしますか? y] [root@falcon21 ~]# vi /etc/opt/remi/php74/php-fpm.conf 11 ;include=/etc/php-fpm.d/*.conf 12 include=/etc/opt/remi/php74/php-fpm.d/*.conf 21 ;pid = /run/php-fpm/php-fpm.pid 22 pid = /var/opt/remi/php74/php-fpm.pid 28 ;error_log = /var/log/php-fpm/error.log 29 error_log = /var/opt/remi/php74/log/php-fpm/error.log ********************************************** /etc/php-fpm.ini デフォルトで、php71を使う設定 [root@falcon21 ~]# vi /etc/php-fpm.ini 11 ;include=/etc/php-fpm.d/*.conf 12 include=/etc/opt/remi/php74/php-fpm.d/*.conf 21 pid = /var/opt/remi/php71/run/php-fpm/php-fpm.pid 27 ;error_log = /var/log/php-fpm/error.log 28 error_log = /var/opt/remi/php71/log/php-fpm/error.log 35 syslog.facility = daemon 41 syslog.ident = php-fpm 46 log_level = notice 52 emergency_restart_threshold = 0 60 emergency_restart_interval = 0 66 process_control_timeout = 0 74 process.max = 0 86 daemonize = yes 90 rlimit_files = 1024 95 rlimit_core = 0 102 events.mechanism = epoll 110 systemd_interval = 10 ************************************: php.ini設定を反映 [root@falcon21 ~]# systemctl restart httpd [root@falcon21 ~]# for v in 71 72 74 ; do systemctl restart php$v-php-fpm ; done php71-php-fpm でエラー ・・・クリアーできない。 ------------------------------ |
投票数:0
平均点:0.00