mount nfs目录挂载导致目标服务器宕机 宕机背景 由于业务规模一般,现业务由两台互相备大容量存储服务器BIG42、BIG43 向 8台WEB服务器提供文件存储服务。 BIG42、BIG43部署情况 BIG42、BIG43采用sersync实现互备(基于rsync互相同步数据,BIG42新增数据会向BIG43同步,BIG43新增数据会向BIG42同步) WEB服务器部署情况 WEB服务器通过mount -t nfs方式向BIG42、BIG43挂载远程目录使用 mount -t nfs xx.xxx.xxx.42:/data/uploads/www...
创建用户
创建一个git用户,用来运行git服务
adduser git
不允许git用户登录shell
vim /etc/passwd
---------------
git502:503::/home/git:/bin/bash
改为:
git
502:503::/home/git:/usr/bin/git-shell
创建裸库
使用–bare创建一个git裸库
cd /home/git/
mkdir store
cd store
git init --bare sample.git
chown -R git:git /home/g...
创建用户 创建一个git用户,用来运行gitolite服务。如果你之前是用git账号来做权限控制的话,记得把/etc/passwd里git用户的shell换回/bin/bash。 # git server adduser git 工作机生成一个rsa密匙,并将公匙拷贝至git服务器下 # 工作机 ssh-keygen scp /root/.ssh/id_rsa.pub root@cp01-matrix-sandbox-03.epc.baidu.com:/home/git/admin.pub 安装gitolite 切换到git用户安装gitolite,...
在做服务器部署或维护时需要将自己写的python脚本拷贝到目标服务器中执行,但生产环境服务器上python版本、依赖等都不一致。使用pyinstaller能够将python脚本打包成一个可执行文件在没有python环境的机器上运行(还能生成windows环境.exe可执行文件)。 安装 通过pip安装即可,也可以下载源码然后直接执行pyinstaller.py pip install pyinstaller 使用 先创建一个测试文件 test.py #!/user/bin/env python # -*-coding:utf-8-*- from sele...
php的版本要大于 5.3 修改php.ini 在php.ini中phar.readonly默认是开启的,将它设为 Off。(若没有则新增) phar.readonly = Off 创建phar包 先创建以下文件 #source/mail.class.php class Mail{ public function send($user_address){ echo "send {$user_address}\n"; } } #source/user.class.php class User{ public function getAddress(...
使用pip安装selenium 使用pip安装 pip install selenium chrome驱动安装 下载chrome驱动(需要翻墙),记得选择对应的操作系统下载浏览器驱动(uname -a查看系统) http://docs.seleniumhq.org/download/ 或者 https://sites.google.com/a/chromium.org/chromedriver/ 这里选择chromedriver_mac64.zip chromedriver_linux32.zip chromedriver_linux6...
如何检测站点访问网络情况 ** curl -w ** 新建一个 curl-format.txt 文件,内容如下: \n time_namelookup: %{time_namelookup}\n time_connect: %{time_connect}\n time_appconnect: %{time_appconnect}\n time_pretransfer: %{time_pretransfer}\n time_redirect: %{time_redirect}\n time_starttransfer...
nginx代理出现cannot have URI 错误提示 “proxy_pass” cannot have URI part in location given by regular expression, or inside named location, or inside “if” statement, or inside “limit_except” block … 错误原因 location / { root /data/wwwroot/test_images; if ( !-e $request_filename) { ...
Hi Timed的目标是为自身没有基础建设支撑的团队提供一套便于二次开发的低成本的定时任务调度与管理系统。系统本身是基于swoole实现,并且自身不处理业务逻辑只负责任务的调度和管理,每个任务可设置多样化的周期执行时间和调度方式异步运行。
wiki.php运行在php平台,是基于Markdown的wiki程序。
docker服务,构建centos基础镜像和开发环境镜像Dockerfile脚本
yaf是高度灵活可扩展的框架,自身不会提供业务功能。往往在业务开发中需要根据情况对yaf进行一定的补充扩展以满足业务实现。以下是在业务使用中总结出的扩展方式可供yaf使用者学习参考。
XiaoCai Blog