首页
Search
1
远程更新git项目代码
12 阅读
2
php 高并发总结
10 阅读
3
Sql的执行顺序
10 阅读
4
进程和线程,并发和并行
9 阅读
5
mysql 优化杂谈
8 阅读
lnmp
js
react
git
redis
mysql
php
laravel
闲谈
linux
python
c
51
go
Search
标签搜索
git
laravel
composer
php
Typecho
累计撰写
92
篇文章
累计收到
0
条评论
首页
栏目
lnmp
js
react
git
redis
mysql
php
laravel
闲谈
linux
python
c
51
go
页面
搜索到
3
篇与
馒头日志,馒头的日志,php,laravel,git,nginx,linux,centos
的结果
2021-06-25
php输出js文件
header('content-type:application/octet-stream'); header('content-disposition:attachment; filename='.time().'.js'); echo $jsdata;
2021年06月25日
1 阅读
0 评论
0 点赞
2021-06-21
远程更新git项目代码
1.添加 hook.php 脚本,记得 检查PHP的exec函数 是否被禁用$web_root='/www/wwwroot/xxx.com'; //服务器 项目根目录地址 $shell = "cd {$web_root}/ && pwd && git pull 2>&1"; exec($shell,$out); print_r($out); 2.在代码管理库(gitea ,github)添加钩子,指向上面的php地址 http://xxx.com/hook.php3.在服务添加 www 权限cd ~ vi .git-credentials https://用户名:密码@gitee.com git config --global credential.helper store #执行成功后出现~/.gitconfig文件 cp ~/.gitconfig /home/www/ cp ~/.git-credentials /home/www/ cd /home/www chown www.www .gitconfig chown www.www .git-credentials 4.到你的项目下执行chmod -R 777 .git 6.检查项目权限,如果不对chown -R www.www 项目地址 5.用浏览器访问 http://xxx.com/hook.php 成功结果返回 Array ( [0] => /www/wwwroot/dcc.com [1] => Already up-to-date. )
2021年06月21日
12 阅读
0 评论
0 点赞
2021-06-18
mysql主从同步
主库ip 172.22.230.212从库ip 172.22.230.213数据库备份mysqldump -uroot -p --databases xhjgame>xhjgame.sql 主库>CREATE USER 'slave'@'172.22.230.213' IDENTIFIED BY '密码'; >GRANT REPLICATION SLAVE ON *.* TO 'slave'@'172.22.230.213'; >flush privileges; > show master status 从库 注意两个值 mysql-bin.00058 和MASTER_LOG_POS>CHANGE MASTER TO MASTER_HOST='172.22.230.212', MASTER_USER='slave', MASTER_PASSWORD='密码', MASTER_LOG_FILE='mysql-bin.000587', MASTER_LOG_POS=0; >start slave >show slave status
2021年06月18日
6 阅读
0 评论
0 点赞