Skip to content

Instantly share code, notes, and snippets.

@tkuchiki
tkuchiki / Vagrantfile
Last active Aug 28, 2015
CentOS6 に zabbix-server を入れる
View Vagrantfile
# -*- 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 Feb 3, 2014
AWS Storage Gateway, Gateway Console show help
View gist:8782095
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 Aug 29, 2015
install Java
View gist:8816128
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 Feb 5, 2014
install Elasticsearch & Kibana
View gist:8817469
# 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 Feb 5, 2014
github で fork したリポジトリを本家に追従する。
View gist:8823162
git remote add original git://github.com/:user/:repo.git
git fetch original
git merge --no-ff --no-commit original/master
git commit
View gist:9044590
yum install -y python-devel python-setuptools
easy_install pip
View _install_phpenv.sh
# 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 Aug 29, 2015
install phpbrew
View gist:9111470
# 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 Aug 29, 2015
Distribution 判定
View dist.sh
#!/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 Mar 4, 2014
install boot2docker & docker for mac
View gist:9345326
# 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