原创 Memcached

安裝memcached[root@localhost ~]# yum install -y epel-release ; yum install -y libevent memcached libmemcached啓動程序[root@loc

原创 linux 虛擬機 kvm

檢查硬件是否支持虛擬化[root@localhost ~]# grep --color "vmx|svm" /proc/cpuinfo安裝環境[root@localhost ~]# yum install -y kvm virt-*  li

原创 zabbix 監控

zabbix 服務端[root@localhost ~]# yum install -y epel-release ; yum install -y httpd mysql mysql-libs php php-mysql mysql-se

原创 shell case

認識case結構[root@localhost test]# cat 5.sh#!/bin/bashread -t 5 -p "Please input a number: " nm=$[$n%2]case $m in        1) 

原创 搭建LNMP

安裝mysql[root@localhost ~]# yum install -y wget[root@localhost ~]# cd /usr/local/src/[root@localhost ~]# wget http://mirr

原创 shell date cal

[root@localhost ~]# date  顯示當前日期時間[root@localhost ~]# date -s "2015-12-08 13:26:50"  設置系統日期時間[root@localhost ~]# date +%

原创 nagios 監控

nagios 服務端安裝[root@localhost ~]# yum install -y epel-release ; yum install -y httpd nagios nagios-plugins nagios-plugins-

原创 expect遠程自動登陸

expect遠程自動登陸用法一、遠程自動登陸腳本,服務端需要安裝expect和openssh-clients[root@localhost ~]# cat login.expect#! /usr/bin/expectset host "19

原创 cacti 監控

cacti  監控主機安裝[root@localhost ~]# yum install -y epel-release ; yum install -y httpd php php-mysql mysql mysql-server mys

原创 HA(high available)集羣配置

master配置[root@localhost ~]# yum install -y epel-release[root@localhost ~]# yum install -y heartbeat[root@localhost ~]# y

原创 shell數組

shell數組定義數組[root@localhost test]# a=(1 2 3)輸出整個數組[root@localhost test]# echo ${a[@]}1 2 3輸出指定數組元素[root@localhost test]#