Skip to content

Instantly share code, notes, and snippets.

@tkuchiki
tkuchiki / Vagrantfile
Last active August 28, 2015 03:42
CentOS6 に zabbix-server を入れる
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "centos6.6"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "2048", "--cpus", "2", "--ioapic", "on"]
end
config.vm.network :forwarded_port, guest: 80, host: 8080
end
@tkuchiki
tkuchiki / gist:8782095
Created February 3, 2014 11:07
AWS Storage Gateway, Gateway Console show help
AVAILABLE COMMANDS
type 'man <command name>' to find out more information about commands
ip Show /manipulate routing, devices, and tunnels
ifconfig View or configure network interfaces
iptables Administration tool for IPv4 packet filtering and NAT
save-iptables Persist IP tables
testconn Test network connectivity
man Display command maunal pages
passwd Update authentication tokens
@tkuchiki
tkuchiki / gist:8816128
Last active August 29, 2015 13:56
install Java
MAJOR_VERSION=7
MINOR_VERSION=51
MAJOR_MINOR_VERSION="${MAJOR_VERSION}u${MINOR_VERSION}"
REVISION=13
COOKIE="gpw_e24=http%3A%2F%2Fwww.oracle.com"
#RPM="jdk-${MAJOR_VERSION}-linux-x64.rpm"
#URI="http://download.oracle.com/otn-pub/java/jdk/${MAJOR_VERSION}/${RPM}"
RPM="jdk-${MAJOR_VERSION}u${MINOR_VERSION}-linux-x64.rpm"
@tkuchiki
tkuchiki / gist:8817469
Created February 5, 2014 04:32
install Elasticsearch & Kibana
# install Java
https://gist.github.com/tkuchiki/8816128
# Elasticsearch
rpm -ivh https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-0.90.11.noarch.rpm
# Kibana
KIBANA_MAJOR_VERSION=3
KIBANA_MINOR_VERSION=0
@tkuchiki
tkuchiki / gist:8823162
Created February 5, 2014 13:03
github で fork したリポジトリを本家に追従する。
git remote add original git://github.com/:user/:repo.git
git fetch original
git merge --no-ff --no-commit original/master
git commit
@tkuchiki
tkuchiki / gist:9044590
Created February 17, 2014 04:10
install pip
yum install -y python-devel python-setuptools
easy_install pip
@tkuchiki
tkuchiki / _install_phpenv.sh
Last active August 29, 2015 13:56
install phpenv
# export PHPENV_ROOT=/path/to/.phpenv
export PHPENV_ROOT=$HOME
echo "export PHPENV_ROOT=${PHPENV_ROOT}" >> $HOME/.bashrc
curl -L https://raw2.github.com/CHH/phpenv/master/bin/phpenv-install.sh | bash | grep -E "^(export|eval)" >> $HOME/.bashrc
# update phpenv
#curl -L https://raw2.github.com/CHH/phpenv/master/bin/phpenv-install.sh | UPDATE=yes bash | grep -E "^(export|eval)" >> $HOME/.bashrc
sed -i -e "s|PATH=\"$PHPENV_ROOT|PATH=\"\$PHPENV_ROOT|g" $HOME/.bashrc
@tkuchiki
tkuchiki / gist:9111470
Last active August 29, 2015 13:56
install phpbrew
# install epel repo
# https://gist.github.com/tkuchiki/7368183
yum install -y gcc gcc-c++ make libxml2-devel libcurl-devel libjpeg-devel libpng-devel libmcrypt-devel libtidy-devel libxslt-devel php-xml postgresql-devel readline-devel
@tkuchiki
tkuchiki / dist.sh
Last active August 29, 2015 13:56
Distribution 判定
#!/bin/sh
function check_dist() {
if grep -qs -E '(CentOS|Fedora|Oracle|Scientific|Amazon)' /etc/issue; then
echo "rhel"
return
elif grep -qs -E '(Debian|Ubuntu)' /etc/issue; then
echo "debian"
return
else
@tkuchiki
tkuchiki / gist:9345326
Created March 4, 2014 12:06
install boot2docker & docker for mac
# http://docs.docker.io/en/latest/installation/mac/
## install boot2docker
#mkdir -p ~/bin
#curl https://raw.github.com/boot2docker/boot2docker/master/boot2docker > ~/bin/boot2docker
brew install boot2docker
## install docker