惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Threat Research - Cisco Blogs
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
V
Vulnerabilities – Threatpost
GbyAI
GbyAI
P
Proofpoint News Feed
L
LINUX DO - 热门话题
P
Palo Alto Networks Blog
A
About on SuperTechFans
T
Tenable Blog
M
MIT News - Artificial intelligence
IT之家
IT之家
I
Intezer
D
DataBreaches.Net
爱范儿
爱范儿
T
Threatpost
C
CERT Recently Published Vulnerability Notes
云风的 BLOG
云风的 BLOG
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
K
Kaspersky official blog
大猫的无限游戏
大猫的无限游戏
A
Arctic Wolf
Y
Y Combinator Blog
Cyberwarzone
Cyberwarzone
酷 壳 – CoolShell
酷 壳 – CoolShell
D
Darknet – Hacking Tools, Hacker News & Cyber Security
H
Help Net Security
Microsoft Security Blog
Microsoft Security Blog
Spread Privacy
Spread Privacy
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
AWS News Blog
AWS News Blog
博客园 - 聂微东
C
Check Point Blog
S
Securelist
有赞技术团队
有赞技术团队
雷峰网
雷峰网
aimingoo的专栏
aimingoo的专栏
Last Week in AI
Last Week in AI
Stack Overflow Blog
Stack Overflow Blog
MongoDB | Blog
MongoDB | Blog
D
Docker
G
GRAHAM CLULEY
T
The Exploit Database - CXSecurity.com
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tailwind CSS Blog
L
Lohrmann on Cybersecurity
G
Google Developers Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
L
LangChain Blog

博客园 - 漫漫人生路总会错几步

一种非常巧妙的设计模式 【流量密码】LVS与nginx对比 【架构升华】:数据库是性能的物理终点 【轻量化交付宣言】:DevOps 的本质是工程化,而非工具化 【微服务】是【必须品】吗? 【JWT】真的好吗? PGSQL 1主2从数据库架构与单节点分3库在三块磁盘理论上限畅想(未测试) 相同的硬件,各个数据库专家比赛畅想 maven 原型项目 mysql9.5安装文档 微信图片批量保存的办法 利用WinSW将Nginx 作为可正常启动/停止的windows服务 JPA使用pg数据库时,bool字段不能跨库迁移的解决方案 【ubuntu】程序运行时的任务栏图标 跨网段通信实战(支持静态路由表的家用路由) Linux系统Mariadb初始化相关(ubuntu) springboot 整合webservice 相关说明 tomcat 服务版本内存设置 navicat连接mysql8报错
win平台利用winsw将php-cgi作为系统服务,支持服务的正常启动/停止/重启
漫漫人生路总会错几步 · 2024-07-28 · via 博客园 - 漫漫人生路总会错几步

首先,需要有winsw, 在GitHub 搜索winsw,点击release 跳转到下载页面选择版本进行下载或点击此链接 Releases · winsw/winsw (github.com)

其次,将winsw 复制到php目录,重命名为 phpcgi-service.exe 并增加配置文件phpcgi-service.xmlstop-cgi.bat ,其中 phpcgi-service.xml 的内容为

<service>
    <id>phpcgi8.3.9</id>
    <name>phpcgi8.3.9</name>
    <description>phpcgi 服务</description>
    <logpath>%BASE%\logs</logpath>
    <logmode>roll</logmode>
    <executable>php-cgi.exe</executable>
    <arguments> -b 127.0.0.1:9000 %BASE%\php.ini</arguments>
    <stopexecutable>stop-cgi.bat</stopexecutable>
</service>

其中,stop-cgi.bat 的代码为:

taskkill /f /im php-cgi.exe

然后,安装服务,使用管理员身份运行cmd,切换到当前目录,运行如下命令即可完成服务的安装,然后就能到系统服务里进行 启动/停止/重启服务 操作了,注意,修改winsw的xml是立即生效的,不需要重新卸载服务在安装

phpcgi-service.exe install

ps: phpcgi-service.xml 中的 %BASE% 为 winsw 可以识别的内置变量,代表winsw.exe 所在的目录,github上的帮助文档不是太全,特此说明