View coreos-pythoninstall.sh
This file contains 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 | |
VERSIONS=${VERSIONS:-"2.7.8.10"} | |
# make directory | |
mkdir -p /opt/bin | |
cd /opt/bin | |
wget http://downloads.activestate.com/ActivePython/releases/${VERSIONS}/ActivePython-${VERSIONS}-linux-x86_64.tar.gz | |
tar -xzvf ActivePython-${VERSIONS}-linux-x86_64.tar.gz |
View keepalived.conf
This file contains 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
virtual_server_group DOCKER_HTTP { | |
172.19.10.63 80 | |
172.19.10.111 80 | |
} | |
virtual_server group DOCKER_HTTP { | |
delay_loop 3 | |
lvs_sched wrr | |
lvs_method NAT →Masp |
View vrrp.conf
This file contains 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
vrrp_sync_group VG { | |
group { | |
VI | |
VE | |
} | |
notify_master /etc/keepalived/vrrp_master.sh | |
notify_backup /etc/keepalived/vrrp_backup.sh | |
notify_fault /etc/keepalived/vrrp_backup.sh | |
notify /etc/keepalived/vrrp_state.sh |
View kvm-cent7.txt
This file contains 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
### 1. make Disk Imange | |
qemu-img create -f qcow2 /var/lib/libvirt/images/cent7.qcow2 20G | |
### 2. install and boot guest server | |
virt-install \ | |
--connect qemu:///system \ | |
--name cent7 \ | |
--vcpus=2 \ | |
--ram=2048 \ | |
--hvm \ |
View kvm-cent7.cfg
This file contains 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
#version=RHEL7 | |
# System authorization information | |
auth --enableshadow --passalgo=sha512 | |
# Use network installation | |
url --url="http://xxx.xxx.xxx.xxx/os/7/os/x86_64/" | |
# Run the Setup Agent on first boot | |
firstboot --enable | |
ignoredisk --only-use=vda | |
# Keyboard layouts |
View scp-file.sh
This file contains 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 | |
SERVERDIR=/home/adachin/work/server/http-conf | |
REPODIR=/home/adachin/work/server/httpd-conf | |
HTTPDIR=/etc/httpd/conf/local | |
#各サーバに飛ばす | |
for x in `seq 1 20`; do | |
echo "server$x" | |
scp $REPODIR/httpd.conf adachin@server$x:$SERVERDIR |
View db_csv_replication.sh
This file contains 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 | |
#あってもなくても | |
#LOG=*-`date +\%Y-\%m-\%d --date "-1 days"`.log | |
#for文ですべてのテーブルを回す | |
for x in adachin01 adachin02 adachin03 adachin04; do | |
CSV=/db/$x-`date +\%Y-\%m-\%d`.csv | |
OLD_CSV=/db/$x-`date +\%Y-\%m-\%d --date "-1 days"`.csv |
View bbs.php
This file contains 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
<html> | |
<head> | |
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css"> | |
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css"> | |
<style> | |
/*body{margin:20px;}*/ | |
body { | |
padding-top: 50px; | |
} | |
.starter-template { |
View check-file.sh
This file contains 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 | |
#変数(testファイル/一時間前のtestファイル) | |
TEST=/hoge/test.txt.`date "+%Y%m%d-%H%M"` | |
TESTRM=/hoge | |
#一日前のtestファイルを削除 | |
ssh -q adachin@lsyncd sudo -u adachin find $TESTRM -mtime +0 -exec rm -f {} \; | |
echo `date "+%Y-%m-%d %T"` |
View slack_scripts.sh
This file contains 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 | |
#Incoming WebHooksのURL | |
WEBHOOKURL="https://hooks.slack.com/hogeee" | |
#メッセージを保存する一時ファイル | |
MESSAGEFILE=$(mktemp -t webhooks) | |
#slack 送信チャンネル | |
CHANNEL="#hogeee" | |
#slack 送信名 | |
BOTNAME="hogeee" |