代码改变世界

rsync+sersync实时同步

2014-04-06 15:58 by cmsd, 437 阅读, 0 推荐, 收藏, 编辑
摘要:sersync安装配置 1.建立目录 mkdir -p /opt/sersync/{bin,conf,log} 2. 下载解压sersync wget http://sersync.googlecode.com/files/sersync2.5_64bit_binary_stable_final.tar.gz tar xvf sersync2.5_64bit_binary_stable_final.tar.gz 阅读全文

curl获得http响应码 302 和绑定host

2014-03-28 09:52 by cmsd, 2067 阅读, 0 推荐, 收藏, 编辑
摘要:shell curl 取得HTTP返回的状态码 curl -I -m 10 -o /dev/null -s -w %{http_code} www.baidu.com 阅读全文

mysql-proxy之奇虎360 Atlas 安装实现mysql读写分离

2014-03-22 18:27 by cmsd, 2683 阅读, 0 推荐, 收藏, 编辑
摘要:官方git https://github.com/Qihoo360/Atlas 参照:http://blog.qixingzhong.com/2013/09/centos-install-atlas.html 1. 安装必要的依赖包 yum install pkg-config libevent* glib lua 2. 升级安装autoconf,编译安装automake需要 阅读全文

startssl 申请证书,并在Nginx, apache, Tomcat上使用

2014-03-21 13:19 by cmsd, 709 阅读, 0 推荐, 收藏, 编辑
摘要:tomcat: http://blog.csdn.net/buyaore_wo/article/details/5771470 apache: http://blog.mowd.tw/index.php?pl=950 Nginx: http://blog.nicky1605.com/the-free-ssl-configuration-startssl-on-nginx.html 简要: apache: SSLCertificateFile /etc/pki/tls/certs/ssl.crt SSLCertificateKeyFile /etc/pki/tls/private/ssl.key SSLCertificateChainFile /etc/pki/tls/sub.class1.server.ca.pem SSLCACertificateFile /etc/pki/tls /ca.pem tomcat: 选Create PFX file。。。。。。。。。 输入之前保存的两个密文信息及密码 阅读全文

linux查看公网地址

2014-03-20 10:33 by cmsd, 299 阅读, 0 推荐, 收藏, 编辑
摘要:curl http://members.3322.org/dyndns/getip 阅读全文

Apache, Nginx获得nginx代理后的真实用户Ip

2014-03-11 18:11 by cmsd, 449 阅读, 0 推荐, 收藏, 编辑
摘要:Nginx 的反向代理设置proxy_set_header X-Real-IP $remote_addr;apache可以设置日志格式将 %h替换为%{X-Real-Ip}i 如:LogFormat "%{X-Real-Ip}i %l %u %t \"%mhttp://%v%U%q\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" - %h" combinednginx可以设置$http_x_real_ip变量。 如log_format main '$http_x 阅读全文

linux gitlab nginx 安装 配置

2014-03-11 13:52 by cmsd, 5457 阅读, 0 推荐, 收藏, 编辑
摘要:更新: 用官方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 阅读全文

cacti批量添加主机脚本

2014-03-11 11:22 by cmsd, 1056 阅读, 0 推荐, 收藏, 编辑
摘要:#!/bin/bash ##cacti批量脚本位置 device=/var/www/html/cacti/cli/add_device.php graphs=/var/www/html/cacti/cli/add_graphs.php tree=/var/www/html/cacti/cli/add_tree.php ##需要添加的host ip在ip.txt中 host_ips=`cat ip.txt` ##开始循环遍历 for host_ip in $host_ips; do 阅读全文

磁盘io负载查看

2014-03-10 10:33 by cmsd, 981 阅读, 0 推荐, 收藏, 编辑
摘要:转自: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.... 阅读全文

建立自己的Yum源

2014-03-07 14:41 by cmsd, 1060 阅读, 0 推荐, 收藏, 编辑
摘要:转自http://kicklinux.com/setup-yum-repos-server/ 命令 reposync 可以直接同步yum源 如/etc/yum.repos.d/cloudera-cdh4.repo 合适的目录下 reposync cloudera-cdh4 就ok了 阅读全文
上一页 1 ··· 6 7 8 9 10 11 12 13 下一页