This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rpm -ivh http://ftp.riken.jp/Linux/fedora/epel/6/x86_64/epel-release-6-7.noarch.rpm | |
/usr/bin/yum install -y zabbix20-server-mysql zabbix20-web-mysql mysql-server | |
/sbin/chkconfig zabbix-server on | |
/sbin/chkconfig mysqld on | |
MYSQL_ROOT_PASSWORD='ADMNPASS' | |
MYSQL_ZBBX_PASSWORD='ZBBXPASS' | |
/usr/bin/mysqladmin -u root create zabbix --default-character-set=utf8 | |
echo "GRANT ALL PRIVILEGES ON zabbix.* TO zabbix@localhost IDENTIFIED BY '${MYSQL_ZBBX_PASSWORD}';FLUSH PRIVILEGES;" | mysql -u root |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# functions | |
declare -i OK=0 | |
declare -i FAIL=1 | |
[ -n "$LOG_LEVEL" ] || declare -i LOG_LEVEL=3 | |
[ -n "$DATE_FORMAT" ] || DATE_FORMAT="%x %T" | |
[ -n "$LOG_FILE" ] || LOG_FILE="progress.log" | |
logger_fatal() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
PERL_VERSION="5.14.2" | |
if [[ `whoami` != "root" ]]; then | |
echo "[ERROR] Must be done as root." | |
exit 1 | |
fi | |
echo "[INFO] Change environment variable HOME." `date` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
CMDNAME=`basename $0` | |
while getopts n OPT | |
do | |
case $OPT in | |
"n" ) DRY_RUN="--dry-run" ;; | |
* ) echo "Usage: $CMDNAME [-n]" 1>&2 | |
exit 1 ;; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use IPC::Shareable; | |
use Parallel::ForkManager; | |
my $process_num = 4; | |
my $handle = tie( my %result, 'IPC::Shareable', undef, { destroy => 1 } ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Getopt::Long; | |
use ExtUtils::Installed; | |
use List::Util; | |
my %options = (); | |
GetOptions( |
NewerOlder