php7.4配置文件,Centos8中php7.4安装,附配置文件及常用命令
1、安装dnf管理
yum install epel-release -y
yum install dnf -y
2、添加存储库
#要在CentOS 8上安装并启用EPEL存储库,请执行以下dnf命令。
dnf install https://dl.Fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm
#要确认EPEL存储库的存在,请运行以下rpm命令。
rpm -qa | grep epel
#接下来,运行以下命令以添加Remi存储库。
dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm
#再次,以验证Remi存储库的存在,运行命令。
rpm -qa | grep remi
3、获取PHP模块并安装
#成功添加EPEL和Remi存储库后,执行以下命令以获取可用PHP模块流的列表。
dnf module list php
#从上面的输出中,remi-7.4 是最新的PHP流,因此我们将启用模块流,如下所示。
dnf module enable php:remi-7.4
#启用PHP remi-7.4模块后,即可使用以下命令继续并安装PHP。 这还将安装许多其他软件包,例如Apache和Nginx模块。
dnf -y install php php-cli php-common php-mysql php-cgi php-mbstring php-gd php-process php-mcrypt php-soap libjpeg* php-pear php-xml php-devel php-memcached php-redis php-gearman php-pecl-mongodb
#dnf -y install gearmand libgearman-devel
#dnf -y install redis memcached
4、设置环境
#要检查已安装的PHP版本,请运行命令。
php -v
#设置开机启动、运行服务:
systemctl enable php-fpm
systemctl start php-fpm
#其他服务参考命令
systemctl restart php-fpm#重启
systemctl start php-fpm#启动
systemctl stop php-fpm#关闭
systemctl status php-fpm#检查状态
5、相关辅助
http管理
systemctl start httpd #启动apache服务器
systemctl stop httpd #关闭apache服务器
systemctl enable httpd#设置开机自动启动
systemctl status httpd.service#检查httpd服务状态
附配置文件
php-fpm.conf
;;;;;;;;;;;;;;;;;;;;;
; FPM Configuration ;
;;;;;;;;;;;;;;;;;;;;;
; All relative paths in this configuration file are relative to PHP's install
; prefix.
; Include one or more files. If glob(3) exists, it is used to include a bunch of
; files from a glob(3) pattern. This directive can be used everywhere in the
; file.
include=/etc/php-fpm.d/*.conf
;;;;;;;;;;;;;;;;;;
; Global Options ;
;;;;;;;;;;;;;;;;;;
[global]
; pid设置,建议开启
; Pid file
; Default Value: none
pid = /run/php-fpm/php-fpm.pid
; 错误日志
; Error log file
; If it's set to "syslog", log is sent to syslogd instead of being written
; in a local file.
; Default Value: /var/log/php-fpm.log
error_log = /var/log/php-fpm/error.log
; syslog_facility is used to specify what type of program is logging the
; message. This lets syslogd specify that messages from different facilities
; will be handled differently.
; See syslog(3) for possible values (ex daemon equiv LOG_DAEMON)
; Default Value: daemon
;syslog.facility = daemon
; syslog_ident is prepended to every message. If you have multiple FPM
; instances running on the same server, you can change the default value
; which must suit common needs.
; Default Value: php-fpm
;syslog.ident = php-fpm
; Log level
; Possible Values: alert, error, warning, notice, debug
; Default Value: notice
; 错误级别
; 可用级别为: alert(必须立即处理), error(错误情况), warning(警告情况), notice(一般重要信息), debug(调试信息). 默认: notice.
;log_level = notice
; Log limit on number of characters in the single line (log entry). If the
; line is over the limit, it is wrapped on multiple lines. The limit is for
; all logged characters including message prefix and suffix if present. However
; the new line character does not count into it as it is present only when
; logging to a file descriptor. It means the new line character is not present
; when logging to syslog.
; Default Value: 1024
;log_limit = 4096
; Log buffering specifies if the log line is buffered which means that the
; line is written in a single write operation. If the value is false, then the
; data is written directly into the file descriptor. It is an experimental
; option that can potentionaly improve logging performance and memory usage
; for some heavy logging scenarios. This option is ignored if logging to syslog
; as it has to be always buffered.
; Default value: yes
;log_buffering = no
; If this number of child processes exit with SIGSEGV or SIGBUS within the time
; interval set by emergency_restart_interval then FPM will restart. A value
; of '0' means 'Off'.
; Default Value: 0
;emergency_restart_threshold = 0
; Interval of time used by emergency_restart_interval to determine when
; a graceful restart will be initiated. This can be useful to work around
; accidental corruptions in an accelerator's shared memory.
; Available Units: s(econds), m(inutes), h(ours), or d(ays)
; Default Unit: seconds
; Default Value: 0
; 表示在emergency_restart_interval所设值内出现SIGSEGV或者SIGBUS错误的php-cgi进程数如果超过 emergency_restart_threshold个,php-fpm就会优雅重启。这两个选项一般保持默认值。
;emergency_restart_interval = 0
; Time limit for child processes to wait for a reaction on signals from master.
; Available units: s(econds), m(inutes), h(ours), or d(ays)
; Default Unit: seconds
; Default Value: 0
; 设置子进程接受主进程复用信号的超时时间. 可用单位: s(秒), m(分), h(小时), 或者 d(天) 默认单位: s(秒). 默认值: 0.
;process_control_timeout = 0
; The maximum number of processes FPM will fork. This has been designed to control
; the global number of processes when using dynamic PM within a lot of pools.
; Use it with caution.
; Note: A value of 0 indicates no limit
; Default Value: 0
;process.max = 128
; Specify the nice(2) priority to apply to the master process (only if set)
; The value can vary from -19 (highest priority) to 20 (lowest priority)
; Note: - It will only work if the FPM master process is launched as root
; - The pool process will inherit the master process priority
; unless specified otherwise
; Default Value: no set
;process.priority = -19
; 后台执行fpm
; Send FPM to background. Set to 'no' to keep FPM in foreground for debugging.
; Default Value: yes
; 默认值为yes,如果为了调试可以改为no。在FPM中,可以使用不同的设置来运行多个进程池。 这些设置可以针对每个进程池单独设置。
daemonize = yes
; Set open file descriptor rlimit for the master process.
; Default Value: system defined value
;rlimit_files = 1024
; Set max core size rlimit for the master process.
; Possible Values: 'unlimited' or an integer greater or equal to 0
; Default Value: system defined value
;rlimit_core = 0
; Specify the event mechanism FPM will use. The following is available:
; - select (any POSIX os)
; - poll (any POSIX os)
; - epoll (linux >= 2.5.44)
; Default Value: not set (auto detection)
;events.mechanism = epoll
; When FPM is built with systemd integration, specify the interval,
; in seconds, between health report notification to systemd.
; Set to 0 to disable.
; Available Units: s(econds), m(inutes), h(ours)
; Default Unit: seconds
; Default value: 10
;systemd_interval = 10
;;;;;;;;;;;;;;;;;;;;
; Pool Definitions ;
;;;;;;;;;;;;;;;;;;;;
; Multiple pools of child processes may be started with different listening
; ports and different management options. The name of the pool will be
; used in logs and stats. There is no limitation on the number of pools which
; FPM can handle. Your system will tell you anyway :)
; See /etc/php-fpm.d/*.conf
常用命令
1、查找安装包:
rpm -qa | grep 'php'
2、找到某个包位置 rpm -ql
#如查找php-fpm-7.4.7-1.el8.remi.x86_64安装位置
rpm -ql php-fpm-7.4.7-1.el8.remi.x86_64
3、查看php.ini应当存放的路径
php -i | grep ini
#直接查找
php -i | grep php.ini
4、有关错误的配置:
error_log 错误日志的生成目录(~/etc/php-fpm.conf)
error_reporting 生产环境错误级别应全开(~/lib/php.ini)
display_errors 在页面上不显示错误(~/lib/php.ini)
log_errors 开启错误日志(~/lib/php.ini)
php7.4配置文件,Centos8中php7.4安装,附配置文件及常用命令相关推荐
- debian安装 Debian的一些常用命令
本篇文章主要介绍了"debian安装 Debian的一些常用命令",主要涉及到debian安装方面的内容,对于Linux教程感兴趣的同学可以参考一下: dpkg学习:(1)dpkg ...
- k8s查看pod的yaml文件_每天5分钟|轻松掌握开发工作中必会的k8s-yaml配置说明和常用命令...
在 K8S 中,创建资源有两种方式: 方式一:使用kubectl 命令行,在输入kubectl命令的时候,填上对应的参数 优点:方便快捷,一行命令搞定 缺点:一行命令太多参数,可读性差,不利于维护 方 ...
- dpkg命令用法、Ubuntu下deb包的解压、打包、安装、卸载及常用命令参数
dpkg命令的用法 不带图简装:https://blog.csdn.net/wanghuohuo13/article/details/78916821?ops_request_misc=&re ...
- Git安装、原理、常用命令、版本控制、如何上传普通文件到仓库以及如何修改IDEA中Terminal为git窗口
好多内容比如上传到仓库中说是审核失败翻墙不让发,只能发一点了,见谅. Git Git 是一个开源的分布式版本控制系统,用于敏捷高效地处理任何或小或大的项目. Git 是 Linus Torvalds ...
- 【原创】Centos6中yum方法安装sl(linux有趣命令之一sl跑火车)
Centos6中yum方法安装sl 声明:本文操作步骤.截图等均出自本人原著,任何人不得进行转载,谢谢! 前言: "sl"为linux系统中有趣但不实用的命令之一,虽然在终端执 ...
- java inireader_java读取配置文件 Java中如何设置读取ini配置文件?
Java读取配置文件的几种方法以及路径问题看透,心静,锁份幽静,将自己填埋在那里,任窗外灯红酒绿,草长莺飞,让那颗疲惫的心,静静地栖息在流水盈盈里,抛却尘世累累. java 怎么读取web jar中的 ...
- Nginx(二):安装、配置、常用命令
1.Nginx在Linux操作系统中的安装 这里简单介绍一下nginx的安装了 1.1.前期准备 在安装nginx之前我们要提前准摆好它的编译工具以及库文件:zlib.poenssl. 还有有让Ngi ...
- [转]supervisor 安装、配置、常用命令
原文: http://www.cnblogs.com/xueweihan/p/6195824.html ------------------------------------------------ ...
- JAVAWEB开发之——Linux命令实战、虚拟机和centos的安装以及联网、常用命令、vi编辑以及软件的安装、sftp的使用
Linux简介 Linux是一种自由和开放源码的操作系统,存放着许多不同的Linux版本,但他们都使用了Linux内核.Linux可安装在各种计算机硬件中 比如.手机.平板电脑.路由器.台式计算机中. ...
最新文章
- python做电脑软件-PC端数据下载软件开发(Python)
- 实战SSM_O2O商铺_32【商品】商品编辑之Dao层的实现
- DL之NN:利用(本地数据集50000张数据集)调用自定义神经网络network.py实现手写数字图片识别94%准确率
- 数据库中删除语句Drop、Delete、Truncate的相同点和不同点的比较(举例说明)
- Linux复习资料——MySQL-client-5.6.50-1.el7.x86_64与MySQL-server-5.6.50-1.el7.x86_64包安装MySQL全过程
- Android--pendingIntent Intent
- python 建筑计算_制图小技巧:巧用Python和ELK瞬间完成总图建筑名称标注
- pure tornado -- table
- Mybatis批量insert报错的解决办法【the right syntax to use near '' at line...】
- CVPR2020 论文分类及全部下载!
- 如何把滑动条变好看一点
- 下载腾讯视频(mp4 格式)
- 综述:三维点云深度学习技术
- 鸿蒙策略炒股软件安全么,鸿蒙即将全量开源 引爆国产软件板块!
- 基于tidbV6.0探索tiflash在多标签组合场景下的使用
- EI目录下载地址及保护密码
- 单元测试|unittest生成测试报告
- 认知世界(2)--心理暗示
- 回头再说 008 瞬
- linux如何安装vi命令,Ubuntu 16.04 下 Vim安装及配置