Introduction to Ansible

Posted by 4Aiur on 01/31/2014 in SysAdmin |

Introduction to Ansible Installation I don’t want input password every time when I run ansible, so prepare ssh key authentication agent for auto login. # Generate ssh public private key pair ssh-keygen -t rsa -b 4096 -f ~/.ssh/id_rsa ssh-agent | head -2 > ~/.ssh/.agent.env source ~/.ssh/.agent.env ssh-add ~/.ssh/id_rsa Install Ansible on a isolation environment. mkdir […]

Tags:

Getting Started with Vagrant

Posted by 4Aiur on 01/12/2014 in SysAdmin |

Getting Started with Vagrant Installation Install VirtualBox or VMware first, and download the latest from Vagrant download page. Launch a instance cd ~/.vagrant.d/tmp/ wget http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-x86_64-v20130731.box vagrant box add CentOS-6.4-x86_64 CentOS-6.4-x86_64-v20130731.box mkdir -p ~/.vagrant.d/init/myvm cd ~/.vagrant.d/init/myvm vagrant init CentOS-6.4-x86_64 vagrant up vagrant ssh Provisioning # install rvm \curl -sSL https://get.rvm.io | bash -s stable source “$HOME/.rvm/scripts/rvm […]

Tags: ,

Installing Logster on CentOS

Posted by 4Aiur on 01/10/2012 in SysAdmin |

Installing Logster on CentOS Install EPEL repository sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-6.noarch.rpm yum update # This takes quite a while for a fresh install Setting locale cat >> ~/.bash_profile Install Dependence yum -y install logcheck logcheck dependencies: liblockfile lockfile-progs perl-IPC-Signal perl-Proc-WaitStat perl-mime-construct Install logster git clone git://github.com/etsy/logster.git cd logster make install dry run /usr/sbin/logster –output=stdout SampleLogster […]

Tags:

Installing and Configuring Graphite on CentOS

Posted by 4Aiur on 01/10/2012 in SysAdmin |

Installing and Configuring Graphite on CentOS Install EPEL repository sudo rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm sudo yum -y update # This takes quite a while for a fresh install Alternatively: wget -r -l1 –no-parent -A “epel*.rpm” http://dl.fedoraproject.org/pub/epel/6/x86_64/ sudo yum -y –nogpgcheck localinstall */pub/epel/6/x86_64/epel-*.rpm Install Dependences sudo yum -y install gcc.x86_64 git.x86_64 python-devel pyOpenSSL \ python-memcached bitmap bitmap-fonts […]

Tags:

Zenoss Core setup guide

Posted by 4Aiur on 12/16/2011 in SysAdmin |

Zenoss Core setup guide Zenoss Core is a powerful monitoring system, and it is a OpenSource software. Install Zenoss Core Install ZenPacks Setup snmp and snmpd config Add user command Add a single device Add custom Device Class Custom new class properties Setup Processes Custom Zenoss reports Install Zenoss Core Before you install: 1) Run […]

Tags: , ,

CentOS安装与使用ipmitool

Posted by 4Aiur on 06/10/2011 in SysAdmin |

CentOS安装与使用ipmitool ipmitoool可以方便的查看设备硬件状态,建议设备在安装好系统后安装一下ipmitool 安装方法: 安装程序包 yum -y install OpenIPMI.x86_64 OpenIPMI-tools.x86_64 OpenIPMI-libs.x86_64 ipmitool.x86_64 添加ipmi module modprobe ipmi_si modprobe ipmi_devintf modprobe ipmi_msghandler 查看module是否成功添加 lsmod | grep -i ipmi ipmi_si 77900 0 ipmi_devintf 44688 0 ipmi_msghandler 73176 2 ipmi_si,ipmi_devintf 查看系统事件日志命令 ipmitool -I open sel list 1 | 09/02/2010 | 04:10:26 | OEM #0x02 | 2 | 09/02/2010 | 04:10:29 […]

Tags:

Cacti配置流程

Posted by 4Aiur on 03/16/2011 in SysAdmin |

Cacti配置流程 Cacti是一个简单直观的监控工具,后台使用rrdtool记录监控数据,虽然功能较少,但是图形显示效果比较好看、直观、配置也比较方便,当需要有复杂的监控需求时,可以使用zabbix或者nagios来做。 这里主要讲的是Cacti两方面的配置,一个是添加设备,另外一个是配置权限 添加监控设备 首先需要在被监控的设备上安装与配置snmp agent,Linux平台请参考Linux安装与配置Snmpd,OpenSolaris参考OpenSolaris net-snmp install script,windows安装配置snmp agent方法 检查是否存在SNMP Service,需要将此服务启动。我的电脑-管理-服务-SNMP Ssrvice. 单击属性-安全,添加发送身份验证陷阱。添加在cacti中的SNMP Community,在下面添加监控端的IP地址 如果没有此服务,通过控制面板-添加组件-管理和监视工具-简单网络管理协议。 添加设备 登陆Cacti后点击面板左侧的devices后点击右侧面板的Add,之后填写Description, Hostname, Host Template(Linux与Solaris使用ucd/net SNMP Host,Windows使用windows2000/xp Host), 其他部分可以使用自己的值来填写"SNMP Community"或者保持不变。配置完成后点击Create增加此设备。 在创建完毕后出现的页面中点下Query Verbose 来测试下snmp数据抓取是否正常。 添加图像 点击页面中的"Create Graphs for this Host" 选中所有复选框后点击"Create",完成生成图像的设置 设置图像数 点击面板左侧的"Graph Trees" –> "Add",输入name后"Create" –> "Save" 把设备添加到心的图像树中 在"Devices"中选中刚加入的设备选择 "Place on a Tree" –> "Go" –> "Continue",到这里设备的配置已经完成,可以点击导航栏的graphs查看新增加设备的各种监控图像,下面是我Cacti监控数据的两个截图 权限配置 增加新用户 […]

Tags: ,

zabbix简易安装手册

Posted by 4Aiur on 10/15/2010 in SysAdmin |

zabbix简易安装手册 1) 安装zabbix依赖包 # yum install gcc MySQL-python mysql mysql-server mysql-devel mysql-bench php php-mysql php-bcmath php-mbstring freetype php-gd php-xml curl-devel libpurple yum install net-snmp net-snmp-devel # mkdir package # cd package/ # wget http://packages.sw.be/iksemel/iksemel-devel-1.4-1.el5.rf.x86_64.rpm # wget http://packages.sw.be/iksemel/iksemel-1.4-1.el5.rf.x86_64.rpm # rpm -ivh iksemel-1.4-1.el5.rf.x86_64.rpm iksemel-devel-1.4-1.el5.rf.x86_64.rpm # wget http://fping.sourceforge.net/download/fping.tar.gz # tar zxf fping.tar.gz # cd fping-2.4b2_to/ # ./configure && […]

Tags:

在不浪费磁盘空间的情况下测试网络

Posted by 4Aiur on 06/09/2010 in SysAdmin |

在不浪费磁盘空间的情况下测试网络 time dd if=/dev/zero bs=1024 count=1048576 | ssh user@remotehost ‘cat > /dev/null’ 在数据传输过程中可以使用iptraf进行观察

unix时间戳转换

Posted by 4Aiur on 05/14/2010 in SysAdmin |

unix时间戳转换, Convert unix timestamp utime(){ date -d @$1; } utime(){ date -d “1970-01-01 GMT $1 seconds”; } utime(){ awk -v d=$1 ‘BEGIN{print strftime(“%a %b %d %H:%M:%S %Y”, d)}’; } utime(){ perl -e “print localtime($1).\”\n\””; } utime(){ python -c “import time; print(time.strftime(‘%a %b %d %H:%M:%S %Y’, time.localtime($1)))”; } [root@test test]# utime(){ date -d @$1; } [root@test test]# […]

Tags:

Copyright © 2010-2024 4Aiur All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.5, from BuyNowShop.com.