php版本更,修复两处9.2分漏洞

php 安全漏洞CVE-2026-109618、CVE-2026-109619 修复。

php版本更新

漏洞情况
漏洞描述两个漏洞均与 PHP 请求生命周期边界上的状态管理缺陷有关:
CVE-2026-109618 利用内存耗尽(OOM)时的 longjmp() 提前退出,使尚未完成初始化的请求内存在 request shutdown 阶段被错误消费;
CVE-2026-109619 利用 worker 全局状态在请求结束后未正确重置,使后续请求在正常初始化之前访问已释放的请求内存。攻击者无需认证,通过构造恶意 HTTP 请求即可触发释放后重用(UAF),进而实现内存泄露和远程代码执行。
影响版本PHP < 8.2.35
PHP < 8.3.36
PHP < 8.4.27
PHP < 8.5.12
仍在维护的分支:
PHP 8.5、8.4、8.3 仍处于现行维护期,应优先升级到对应修复版本或更高版本。8.2.35 是当前可用的修复版本,也是 8.2 分支最后的升级时间窗口之一;建议尽快规划升级到 8.3 或更高版本。
已停止维护的分支:
PHP 8.1、8.0、7.4 及更早版本已停止官方支持,PHP 官方不再发布修复版本。
PHP ≤ 7.3 / 5.x 同样已停止维护,官方不提供修复版本,应优先升级。

PHP 兼容性与 WordPress 版本——打造 WordPress 核心

add atp sources

如何在Ubuntu 26.04、24.04和22.04上安装PHP 8.5 – LinuxCapable

(
    set -e
    . /etc/os-release
    arch="$(dpkg --print-architecture)"
    case "$ID:$VERSION_CODENAME:$arch" in
        ubuntu:resolute:amd64|ubuntu:resolute:arm64|ubuntu:noble:amd64|ubuntu:noble:arm64|ubuntu:noble:armhf|ubuntu:jammy:amd64|ubuntu:jammy:arm64|ubuntu:jammy:armhf)
            key_file="$(mktemp)"
            trap 'rm -f -- "$key_file"' EXIT
            curl -fsSLo "$key_file" https://packages.sury.org/php/apt.gpg
            sudo install -m 0755 -d /etc/apt/keyrings
            sudo install -m 0644 "$key_file" /etc/apt/keyrings/deb.sury.org-php.gpg
            printf '%s\n' \
                'Types: deb' \
                'URIs: https://packages.sury.org/php/' \
                "Suites: $VERSION_CODENAME" \
                'Components: main' \
                "Architectures: $arch" \
                'Signed-By: /etc/apt/keyrings/deb.sury.org-php.gpg' | sudo tee /etc/apt/sources.list.d/php.sources > /dev/null
            ;;
        *)
            printf 'No source written: supported hosts are Ubuntu 26.04 amd64/arm64 and Ubuntu 24.04/22.04 amd64/arm64/armhf; this host reports %s/%s/%s.\n' "$ID" "$VERSION_CODENAME" "$arch" >&2
            exit 1
            ;;
    esac
)
sudo apt update

# apt install php8.5-fpm
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  php-common php8.5-cli php8.5-common php8.5-readline
The following NEW packages will be installed:
  php8.5-cli php8.5-common php8.5-fpm php8.5-readline
The following packages will be upgraded:
  php-common
1 upgraded, 4 newly installed, 0 to remove and 104 not upgraded.
Need to get 7273 kB of archives.
After this operation, 35.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

#
apt install php8.5-mysql php8.5-zip php8.5-gd  php8.5-mbstring php8.5-curl php8.5-xml  php8.5-bcmath
# php8.5 --version
PHP 8.5.12 (cli) (built: Oct 21 2026 08:08:15) (NTS)
Copyright (c) The PHP Group
Built by Ubuntu
Zend Engine v4.5.12, Copyright (c) Zend Technologies
    with Zend OPcache v8.5.12, Copyright (c), by Zend Technologies
    
    
# php-fpm8.5 --version
PHP 8.5.12 (fpm-fcgi) (built: Oct 21 2026 08:08:15) (NTS)
Copyright (c) The PHP Group
Built by Ubuntu
Zend Engine v4.5.12, Copyright (c) Zend Technologies
    with Zend OPcache v8.5.12, Copyright (c), by Zend Technologies
# phpinfo 验证
# cat info.php
<?php
 phpinfo();
?>

CentOS7安装php类型CMS(Mariadb10.5)

CentOS7安装php类型CMS(Mariadb10.5)

测试环境

# uname -a
Linux localhost.localdomain 3.10.0-1160.15.2.el7.x86_64 #1 SMP Wed Feb 3 15:06:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

# cat /etc/redhat-release 

CentOS Linux release 7.9.2009 (Core)

# php -v 
php-fpm -vPHP 7.2.34 (cli) (built: Oct  1 2020 13:37:37) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.34, Copyright (c) 1999-2018, by Zend Technologies

# php-fpm -v
PHP 7.2.34 (fpm-fcgi) (built: Oct  1 2020 13:40:44)
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.34, Copyright (c) 1999-2018, by Zend Technologies

# mariadb --version
mariadb  Ver 15.1 Distrib 10.5.8-MariaDB, for Linux (x86_64) using readline 5.1

继续阅读 →

CentOS7 Lsyncd 文件实时同步(替代Rsync和Inotify)

Lsyncd结合了inotify + rsync,Lsyncd监视本地目录树事件监视器接口(inotify或fsevents)。它聚合和组合事件几秒钟,然后生成一个(或多个)进程(es)来同步更改。

部署环境

# cat /etc/redhat-release 
CentOS Linux release 7.4.1708 (Core) 

# uname -a                
Linux filesync-20.203.localdomain 3.10.0-693.11.1.el7.x86_64 #1 SMP Mon Dec 4 23:52:40 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
    
# rsync --version   
rsync  version 3.0.9  protocol version 30
Copyright (C) 1996-2011 by Andrew Tridgell, Wayne Davison, and others.
Web site: http://rsync.samba.org/
Capabilities:
    64-bit files, 64-bit inums, 64-bit timestamps, 64-bit long ints,
    socketpairs, hardlinks, symlinks, IPv6, batchfiles, inplace,
    append, ACLs, xattrs, iconv, symtimes

rsync comes with ABSOLUTELY NO WARRANTY.  This is free software, and you
are welcome to redistribute it under certain conditions.  See the GNU
General Public Licence for details.
    
# lsyncd --version         
Version: 2.2.2

  安装部署 lsyncd

部署机器

Server-A  192.168.20.203   [主文件服务器,  读写]
Server-B  192.168.20.204   [备份文件服务器,只读]

密钥登录

Server-A服务器上操作

#生成密钥文件
ssh-keygen -t rsa
#将公钥拷贝到B
ssh-copy-id username@192.168.20.204
#测试
ssh username@192.168.20.204

安装 lsyncd

yum -y install lsyncd

配置文件

settings {
    logfile    = "/tmp/lsyncd.log",
    statusFile = "/tmp/lsyncd.status",
    insist = true,
    statusInterval = 10
}
sync {
    default.rsyncssh,
    source="/data",
    host="username@192.168.20.204",
    targetdir="/data",
    rsync = {
        archive = true,
        compress = false,
        whole_file = false,
        _extra = {"--bwlimit=40960"}
    },
    ssh = {
        port = 22
    }
}

测试

lsyncd -nodaemon /etc/lsyncd.conf

后台启动 lsyncd

systemctl start lsyncd
systemctl enable lsyncd

系统优化

echo -e "\nfs.inotify.max_user_watches = 8192000" >> /etc/sysctl.conf 
sysctl -p

参考文档

CentOS6 LVM 管理

CentOS6 LVM 管理

添加磁盘到LVM

fdisk /dev/vdb
n

t # 磁盘id设置为 8e ,Linux LVM


 umount /data
 fdisk /dev/vdb
 vgdisplay 
 d
 vgextend VolGroup /dev/vdb1 
 vgdisplay 
 lvextend -L +490G /dev/VolGroup/lv_root 
 lvdisplay 
 resize2fs /dev/VolGroup/lv_root 
 df 
 df -h
 vi /etc/fstab 

参考文档

使用sed删除匹配行及上下几行

删除包含DATA Partition的行,同时删除这行的后面2行和上面3行
sed -i ‘/DATA Partition/,+2d;:go;1,3!{P;N;D};N;bgo’ report.cfg

参考文档:
sed ‘/5/,+3d;:go;1,2!{P;N;D};N;bgo’ file
/5/,+3d 对匹配到5的那一行以及该行的后三行都执行d操作(d 清空模式空间)
:go 设一个标签go
1,2!{P;N;D} 除了第一行和第二行,其他行都执行P;N;D操作(P 打印当前模式空间的第一行;N 将下一行添加到当前模式空间中;D 删除模式空间的第一行并开始一个新的循环)
N 这个命令只对第一行和第二行有效了,因为其他行在上一个命令中都执行了D,直接开始新的循环了,所以这个命令不会被执行。
bgo 返回go标签

http://bbs.chinaunix.net/thread-3775201-1-1.html

 

CentOS6 安装Webmin

官网:http://www.webmin.cn/download.html
参考:http://spikedighole.blog.163.com/blog/static/176998045201562805435418/

# uname -a                
Linux localhost.localdomain 2.6.32-573.18.1.el6.x86_64 #1 SMP Tue Feb 9 22:46:17 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
# cat /etc/redhat-release 
CentOS release 6.7 (Final)
# rpm -qa|grep webmin
webmin-1.780-1.noarch


# webadmin安装升级会用到perl-Net-SSLeay
yum -y install perl-Net-SSLeay
# wget http://prdownloads.sourceforge.net/webadmin/webmin-1.740-1.noarch.rpm
wget http://jaist.dl.sourceforge.net/project/webadmin/webmin/1.780/webmin-1.780-1.noarch.rpm
rpm -ivh webmin-1.780-1.noarch.rpm 
netstat -ntlp|grep 10000

 

转:使用 /sys 文件系统访问 Linux 内核

sysfs 虚拟文件系统提供了一种比 proc 更为理想的访问内核数据的途径

sysfs 是 Linux 内核中设计较新的一种虚拟的基于内存的文件系统,它的作用与 proc 有些类似,但除了与 proc 相同的具有查看和设定内核参数功能之外,还有为 Linux 统一设备模型作为管理之用。相比于 proc 文件系统,使用 sysfs 导出内核数据的方式更为统一,并且组织的方式更好,它的设计从 proc 中吸取了很多教训。本文就 sysfs 的挂载点 /sys 目录结构、其与 Linux 统一设备模型的关系、常见属性文件的用法等方面对 sysfs 作入门介绍,并且就内核编程方面,以具体的例子来展示如何添加 sysfs 支持。

详见  https://www.ibm.com/developerworks/cn/linux/l-cn-sysfs/

centos 6 如何动态识别新插入物理磁盘(一) http://afatech.iteye.com/blog/2278379

CentOS 使用lynx更新3322.org DDNS

参考文档:
http://www.pubyun.com/products/dyndns/download/

# 安装lynx
# yum install lynx

# lynx -mime_header -auth=hahaha:2016! "http://members.3322.net/dyndns/update?system=dyndns&hostname=hahaha.f3322.net"
HTTP/1.1 200 OK
Server: nginx
Date: Tue, 23 Feb 2016 09:12:23 GMT
Content-Type: text/plain; charset=utf-8
Connection: close
Vary: Cookie

good 16.26.19.26
#
# 
# lynx -mime_header -auth=hahaha:2016! "http://members.3322.net/dyndns/update?system=dyndns&hostname=hahaha.f3322.net"
HTTP/1.1 200 OK
Server: nginx
Date: Tue, 23 Feb 2016 09:14:00 GMT
Content-Type: text/plain; charset=utf-8
Connection: close
Vary: Cookie

nochg 16.26.19.26

 

CentOS6 安装phpMyAdmin

# cat /etc/redhat-release 
CentOS release 6.7 (Final)
# rpm -qa|grep phpMyAdmin
phpMyAdmin-4.0.10.14-1.el6.noarch
# rpm -qa|grep mysql-server
mysql-server-5.1.73-5.el6_6.x86_64

# 添加epel源
# rpm -ivh http://mirrors.aliyun.com/epel/epel-release-latest-6.noarch.rpm

# 安装相关软件包
# yum -y install httpd mysql php php-mysql phpmyadmin

# 修改index文件
# vi /etc/httpd/conf/httpd.conf 
DirectoryIndex index.php index.html index.html.var

# 允许远程登录phpMyAdmin
# vi /etc/httpd/conf.d/phpMyAdmin.conf 
   <IfModule !mod_authz_core.c>
     # Apache 2.2
     Order Deny,Allow
     Deny from All
     Allow from 1.1.1.2
     Allow from 127.0.0.1
     Allow from ::1
   </IfModule>
   
# 重启httpd
service httpd restart

# 登录
http://server_ip/phpmyadmin/