<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title><![CDATA[西门博主]]></title> 
<description><![CDATA[记录学习的一点一滴]]></description>
<link>https://blog.shzhaoqi.com/</link>
<language>zh-cn</language>
<generator>www.emlog.net</generator>
<item>
    <title>一台服务器 多个 Laravel 站点 队列常驻方案</title>
    <link>https://blog.shzhaoqi.com/other/98.html</link>
    <description><![CDATA[每个站点必须：
自己独立的 supervisor 配置文件
自己独立的进程名称（不能重名）
自己独立的日志文件
自己独立的队列命令

举例：你现在有 3 个站点
api.thingsminder.com（已配置）
site2.com
site3.com

###1、创建新配置文件
```
vi /etc/supervisord.d/site2-worker.conf
```
###2、写入内容（只改 项目路径 + 进程名）
```
[program:site2-worker]   # 这里改个名字，不能重复
process_name=%(program_name)s_%(process_num)02d
command=php /www/wwwroot/site2.com/artisan queue:work --sleep=3 --tries=3
autostart=true
autorestart=true
user=www
numprocs=2
redirect_stderr=true
stdout_logfile=/www/wwwroot/site2.com/storage/logs/worker.log
```
###3、保存并加载
```
supervisorctl reread
supervisorctl update
supervisorctl start site2-worker:*
```
###更多站点同理
```
vi /etc/supervisord.d/site3-worker.conf
```
```
[program:site3-worker]
command=php /www/wwwroot/site3.com/artisan queue:work --sleep=3 --tries=3
stdout_logfile=/www/wwwroot/site3.com/storage/logs/worker.log
```
###最终效果
所有站点 互不干扰：
laravel-worker:* → 你的主站
site2-worker:* → 第二个网站
site3-worker:* → 第三个网站

查看所有状态：
```
supervisorctl status
```

###最重要：每个站点必须给权限
每个新项目都必须执行一次：
```
chown -R www:www /www/wwwroot/xxx.com/storage
chmod -R 775 /www/wwwroot/xxx.com/storage
```]]></description>
    <pubDate>Fri, 03 Apr 2026 03:09:48 +0000</pubDate>
    <author>网络剑客</author>
    <guid>https://blog.shzhaoqi.com/other/98.html</guid>

</item>
<item>
    <title>git pull 时，每次都会弹出这个合并提交信息的编辑界面，而不是自动完成拉取操作</title>
    <link>https://blog.shzhaoqi.com/other/96.html</link>
    <description><![CDATA[直接拉取并使用默认合并信息
如果你不需要自定义合并提交信息，可以让 Git 自动使用默认信息完成合并：
```
# 单次拉取时使用默认提交信息
git pull --no-edit

# 或者配置 Git 全局默认使用 no-edit，以后所有 pull 都自动完成
git config --global pull.rebase false  # 确保使用 merge 模式（默认）
git config --global core.editor true   # 编辑器直接返回成功，使用默认信息
```]]></description>
    <pubDate>Sat, 28 Feb 2026 08:49:49 +0000</pubDate>
    <author>网络剑客</author>
    <guid>https://blog.shzhaoqi.com/other/96.html</guid>

</item>
<item>
    <title>Git 合并时出现 Please enter a commit message to explain why this merge is necessary 问题解决</title>
    <link>https://blog.shzhaoqi.com/other/95.html</link>
    <description><![CDATA[在服务器项目目录执行以下命令：
```
git pull --no-edit
````]]></description>
    <pubDate>Thu, 26 Feb 2026 02:32:29 +0000</pubDate>
    <author>网络剑客</author>
    <guid>https://blog.shzhaoqi.com/other/95.html</guid>

</item>
<item>
    <title>禁止 Git 追踪文件权限变更（避免后续再触发冲突）</title>
    <link>https://blog.shzhaoqi.com/other/94.html</link>
    <description><![CDATA[修改 Git 配置，让 Git 忽略文件权限的变更，只追踪文件内容，从根源解决问题：

```
# 进入服务器站点Git目录
cd /www/wwwroot/your-site

# 全局配置（对服务器所有Git仓库生效）
git config --global core.fileMode false

# 或仅对当前站点仓库生效（推荐）
git config core.fileMode false
```
验证配置是否生效：
```
git config core.fileMode  # 输出false则配置成功
```
这样后续在宝塔修改文件权限时，Git 不会再把权限变更识别为 “本地修改”，git pull/git push就不会触发冲突了。]]></description>
    <pubDate>Sat, 21 Feb 2026 04:47:34 +0000</pubDate>
    <author>网络剑客</author>
    <guid>https://blog.shzhaoqi.com/other/94.html</guid>

</item>
<item>
    <title>服务器端全局搜索及替换字符串</title>
    <link>https://blog.shzhaoqi.com/other/93.html</link>
    <description><![CDATA[####服务器端全局搜索
```
# 进入前端代码根目录
cd /path/to/frontend

# 全局搜索所有包含旧域名的文件（区分大小写，递归查找）
grep -r "www.qq.cn" ./ --include=*.{html,js,css,json,php,htm}

# 如果想忽略大小写，加 -i 参数
grep -ri "www.qq.cn" ./ --include=*.{html,js,css,json,php,htm}
```
####批量替换旧域名
服务器端批量替换（确认搜索结果无误后执行）
```
# 进入前端代码根目录
cd /path/to/frontend

# 批量替换（将旧域名替换为新域名，递归处理）
sed -i 's/www.qq.cn/www.qq.com/g' $(grep -rl "www.qq.com" ./ --include=*.{html,js,css,json,php,htm})

# 验证替换结果（再次搜索，应无匹配结果）
grep -r "www.qq.cn" ./ --include=*.{html,js,css,json,php,htm}
```]]></description>
    <pubDate>Sat, 31 Jan 2026 02:29:59 +0000</pubDate>
    <author>网络剑客</author>
    <guid>https://blog.shzhaoqi.com/other/93.html</guid>

</item>
<item>
    <title>如何批量删除centos指定目录下的所有.DS_Store文件</title>
    <link>https://blog.shzhaoqi.com/other/92.html</link>
    <description><![CDATA[```
find /www/wwwroot/www.sisd-sh.com -name ".DS_Store" -type f -delete
```]]></description>
    <pubDate>Sat, 30 Aug 2025 01:48:21 +0000</pubDate>
    <author>网络剑客</author>
    <guid>https://blog.shzhaoqi.com/other/92.html</guid>

</item>
<item>
    <title>PostgresSql中的联表更新（根据一张表的字段更新另一张表）</title>
    <link>https://blog.shzhaoqi.com/other/91.html</link>
    <description><![CDATA[```
update 新表名 set class_name = 旧表表.name from 旧表名 where 新表名.class_id = 旧表表.id;

```]]></description>
    <pubDate>Fri, 11 Jul 2025 15:46:33 +0000</pubDate>
    <author>网络剑客</author>
    <guid>https://blog.shzhaoqi.com/other/91.html</guid>

</item>
<item>
    <title>pgsql表中查询重复数据</title>
    <link>https://blog.shzhaoqi.com/mysql/90.html</link>
    <description><![CDATA[```
SELECT DISTINCT *
FROM (
    SELECT *, COUNT(*) OVER (PARTITION BY user_name) as cnt
    FROM user_a8
) as subquery
WHERE cnt > 1 ORDER BY user_name;
```]]></description>
    <pubDate>Fri, 11 Jul 2025 14:25:04 +0000</pubDate>
    <author>网络剑客</author>
    <guid>https://blog.shzhaoqi.com/mysql/90.html</guid>

</item>
<item>
    <title>pgsql创建表语句</title>
    <link>https://blog.shzhaoqi.com/other/89.html</link>
    <description><![CDATA[```
CREATE TABLE department (
    id SERIAL PRIMARY KEY,
    department_id varchar(50),
    department_name varchar(100),
    superior varchar(50),
    parent_path varchar(50),
    status INT DEFAULT 1,
    created_at TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP,
    updated_at TIMESTAMP(0) DEFAULT CURRENT_TIMESTAMP
);

-- 添加注释（可选）
COMMENT ON TABLE department IS '部门信息表';
COMMENT ON COLUMN department.id IS '自增主键';
COMMENT ON COLUMN department.department_id IS '部门编号';
COMMENT ON COLUMN department.department_name IS '部门名称';
COMMENT ON COLUMN department.superior IS '上级部门ID';
COMMENT ON COLUMN department.parent_path IS '部门层级路径';
COMMENT ON COLUMN department.status IS '状态(0:禁用,1:启用)';
COMMENT ON COLUMN department.created_at IS '创建时间';
COMMENT ON COLUMN department.updated_at IS '更新时间';
```]]></description>
    <pubDate>Fri, 11 Jul 2025 09:12:05 +0000</pubDate>
    <author>网络剑客</author>
    <guid>https://blog.shzhaoqi.com/other/89.html</guid>

</item>
<item>
    <title>mysql 更新字段内容后面加一个字符</title>
    <link>https://blog.shzhaoqi.com/php/88.html</link>
    <description><![CDATA[```
#创建名为test的表
CREATE TABLE test (
id INT PRIMARY KEY,
username VARCHAR(50)
);

#插入示例数据
INSERT INTO test (id,username) VALUES (1,'test1');
INSERT INTO test (id, username) VALUES (2,'test2');
INSERT INTO test (id, username) VALUES (3,'test3');

#更新字段所有数据加一个字符
UPDATE test SET username = CONCAT(username,'-A') where id = 2;

#查询更新后的数据
SELECT * FROM test where id = 2;
```]]></description>
    <pubDate>Wed, 16 Apr 2025 14:03:55 +0000</pubDate>
    <author>网络剑客</author>
    <guid>https://blog.shzhaoqi.com/php/88.html</guid>

</item></channel>
</rss>