摘要:
https://www.percona.com/doc/percona-toolkit/2.1/pt-online-schema-change.html 不锁表更改数据库表结构 pt-online-schema-change --user=root --host=127.0.0.1 --ask-pa 阅读全文
随笔分类 - 系统工具
redsocks 配合iptables设置全局sockts5代理
2015-03-24 18:23 by cmsd, 7741 阅读, 收藏, 编辑
摘要:
第一步,安装redsocks
1. 安装依赖
yum install libevent-devel
2. 下载编译 阅读全文
bash变量操作
2014-12-24 14:24 by cmsd, 375 阅读, 收藏, 编辑
摘要:
(1) ${value:-word}
当变量未定义或者值为空时,返回值为word的内容,否则返回变量的值.
(2) ${value:=word}
与前者类似,只是若变量未定义或者值为空时,在返回word的值的同时将
word赋值给value
(3) ${value:?message}
若变量以赋值的话,正常替换.否则将消息message送到标准错误输出(若
此替换出现在Shell程序中,那么该程序将终止运行) 阅读全文
修改最大打开文件数和最大proc数量
2014-04-15 15:17 by cmsd, 294 阅读, 收藏, 编辑
摘要:
1、vim /etc/profile 增加 ulimit -n 10240ulimit -u 102402、修改/etc/security/limits.conf* soft nofile 10240* hard nofile 10240* soft noproc 10240* hard... 阅读全文
curl获得http响应码 302 和绑定host
2014-03-28 09:52 by cmsd, 2099 阅读, 收藏, 编辑
摘要:
shell curl 取得HTTP返回的状态码
curl -I -m 10 -o /dev/null -s -w %{http_code} www.baidu.com 阅读全文
linux gitlab nginx 安装 配置
2014-03-11 13:52 by cmsd, 5481 阅读, 收藏, 编辑
摘要:
更新: 用官方rpm包装很方便
rpm下载地址: https://www.gitlab.com/downloads/
教程地址:https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.md
安装:
sudo yum install openssh-server
sudo yum install postfix # sendmail or exim is also OK
sudo rpm -i gitlab-x.y.z.rpm
sudo gitlab-ctl reconfigure 阅读全文
磁盘io负载查看
2014-03-10 10:33 by cmsd, 986 阅读, 收藏, 编辑
摘要:
转自:http://blog.csdn.net/i_am_jojo/article/details/7698458 为了方便各位和自己今后遇到此类问题能尽快解决,我这里将查看linux服务器硬盘IO访问负荷的方法同大家一起分享:首先 、用top命令查看top - 16:15:05 up 6 days, 6:25, 2 users, load average: 1.45, 1.77, 2.14Tasks: 147 total, 1 running, 146 sleeping, 0 stopped, 0 zombieCpu(s): 0.2% us, 0.2% sy, 0.0% ni, 86.... 阅读全文
fpm来制作rpm包
2014-02-26 16:34 by cmsd, 551 阅读, 收藏, 编辑
摘要:
转自 http://blog.halfss.com/blog/2013/02/26/fpmbao-guan-li/
另查看 http://my.oschina.net/lxcong/blog/143855
fpm包管理
1简介
fpm:对包的类型进行转换,从一种类型转换到另一种类型
#包作者整理了PPT:
https://docs.google.com/presentation/d/11TOsLeg58w7GCt6i7y1VIQWnUYotsx0MzGMJ_dWUJNo/present#slide=id.i0
目前源类型支持:
dir:二进制包
rpm:redhat系列的包
gem:ruby的包 #fpm就是用ruby写的,也是gem中的一个包
python:python的模块 阅读全文