[心缘地方]同学录
首页 | 功能说明 | 站长通知 | 最近更新 | 编码查看转换 | 代码下载 | 常见问题及讨论 | 《深入解析ASP核心技术》 | 王小鸭自动发工资条VBA版
登录系统:用户名: 密码: 如果要讨论问题,请先注册。

[备忘]安装redis-stat步骤

上一篇:[备忘]Ruby gem install Error(mkmf.rb can't find header files for ruby at...)
下一篇:[备忘]redis的keys模糊查询,引起的cpu占用高的问题

添加日期:2017/10/12 13:09:44 快速返回   返回列表 阅读1660次
安装ruby:
yum install ruby
yum install ruby-devel
yum -y update gcc
yum -y install gcc+ gcc-c++

gem install redis-stat

echo "redis-stat --verbose --daemon --auth=你的密码 --server=8888 5" >>redisMonitor.sh

然后浏览器打开
http://xx.xx.xx.xx:8888即可看到统计信息
-------------------------------------------
gem install没反应的话,看这
https://gems.ruby-china.org/

我把这个首页内容粘贴过来,方便看:
-----------------------------------------------------------------
如何使用?
请尽可能用比较新的 RubyGems 版本,建议 2.6.x 以上。

$ gem update --system # 这里请翻墙一下
$ gem -v
2.6.3
$ gem sources --add https://gems.ruby-china.org/ --remove https://rubygems.org/
$ gem sources -l
https://gems.ruby-china.org
# 确保只有 gems.ruby-china.org
----------------------
如果你使用 Gemfile 和 Bundler (例如:Rails 项目)
你可以用 Bundler 的 Gem 源代码镜像命令。

$ bundle config mirror.https://rubygems.org https://gems.ruby-china.org
这样你不用改你的 Gemfile 的 source。

source 'https://rubygems.org/'
gem 'rails', '4.2.5'
...
----------------------
SSL 证书错误
正常情况下,你是不会遇到 SSL 证书错误的,除非你的 Ruby 安装方式不正确。

如果遇到 SSL 证书问题,你又无法解决,请修改 ~/.gemrc 文件,增加 ssl_verify_mode: 0 配置,以便于 RubyGems 可以忽略 SSL 证书错误。

---
:sources:
- https://gems.ruby-china.org
:ssl_verify_mode: 0
如果你在意 Gem 下载的安全问题,请正确安装 Ruby、OpenSSL,建议部署 Linux 服务器的时候采用 这个 RVM 安装脚本 的方式安装 Ruby。
----------------------
其他说明
Bundler::GemspecError: Could not read gem at /home/xxx/.rvm/gems/ruby-2.1.8/cache/rugged-0.23.3.gem. It may be corrupted.,这类错误是网络原因下载到了坏掉的文件到本地,请直接删除那个文件。
请珍惜社区资源,勿基于本镜像做二次镜像网站,我们会定期检查 CDN 请求量统计,单日请求量过大(流量超过 20G) 的 IP 将会被永久屏蔽。
 

评论 COMMENTS
没有评论 No Comments.

添加评论 Add new comment.
昵称 Name:
评论内容 Comment:
验证码(不区分大小写)
Validation Code:
(not case sensitive)
看不清?点这里换一张!(Change it here!)
 
评论由管理员查看后才能显示。the comment will be showed after it is checked by admin.
CopyRight © 心缘地方 2005-2999. All Rights Reserved