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
# nginx -V 2>&1 |grep --color '\-\-pid-path.*.pid' | |
(snip) | |
--pid-path=/var/run/nginx/nginx.pid | |
(snip) | |
# ls /var/run/nginx/nginx.pid | |
ls: cannot access /var/run/nginx/nginx.pid: そのようなファイルやディレクトリはありません | |
# nginx -t | |
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok |
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
# sl は $releasever をベタ書き | |
cat > /etc/yum.repos.d/nginx.repo <<'nginxREPO' | |
[nginx] | |
name=nginx repo | |
baseurl=http://nginx.org/packages/rhel/6/$basearch/ | |
gpgcheck=0 | |
enabled=1 | |
nginxREPO | |
# ばっといれとく curl-devel は passenger あたりで言われる |
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/env ruby | |
#-*- coding: utf-8 -*- | |
def fizzbuzz(n) | |
[*1..n].each{| i | | |
num = i.to_i | |
puts num % 15 == 0 ? "FizzBuzz" : | |
num % 5 == 0 ? "Buzz" : | |
num % 3 == 0 ? "Fizz" : | |
num | |
} |
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
--- bookmark_button.js 2012-03-08 15:57:54.000000000 +0900 | |
+++ bookmark_button_wo_al.js 2012-03-08 15:57:54.000000000 +0900 | |
@@ -742,17 +742,6 @@ | |
} | |
}); | |
- | |
-(function () { | |
- var domains = 'www.toyokeizai.net member.toyokeizai.net excite.co.jp exblog.jp mainichi.jp jp.msn.com *.jp.msn.com itmedia.co.jp bizmakoto.jp atmarkit.co.jp eetimes.jp ednjapan.cancom-j.com ednjapan.com barks.jp www.asahi.com *.asahi.com jp.techcrunch.com japanese.engadget.com jp.autoblog.com celebrity.aol.jp www.nikkei.com *.nikkeibp.co.jp japan.cnet.com japan.zdnet.com builder.japan.zdnet.com japan.gamespot.com www.re-source.jp www.yomiuri.co.jp groupon.jp'; | |
- var pattern = '^(?:' + domains.replace(/\./g, '\\.').replace(/\*\\\./g, '(?:[^.]+\\.)+').replace(/\s+/g, '|') + ')$'; |
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 | |
#参考URL | |
#Scientific Linux 6 - KVM - インストール : Server World http://www.server-world.info/query?os=Scientific_Linux_6&p=kvm&f=1 | |
yum install qemu-kvm libvirt python-virtinst bridge-utils | |
modprobe kvm | |
# grep 'Intel' /proc/cpuinfo && modprobe kvm_intel || modprobe kvm_amd # OK? :( | |
modprobe kvm_amd | |
#modprobe kvm_intel |
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 | |
# :Scientific Linux 6 - KVM - インストール : Server World http://www.server-world.info/query?os=Scientific_Linux_6&p=kvm&f=1 | |
cp -a /etc/sysconfig/network-scripts/ifcfg-{eth0,br0} | |
echo 'DEVICE=eth0' > /etc/sysconfig/network-scripts/ifcfg-eth0 | |
grep HWADDR /etc/sysconfig/network-scripts/ifcfg-br0 >> /etc/sysconfig/network-scripts/ifcfg-eth0 | |
cat >> /etc/sysconfig/network-scripts/ifcfg-eth0 <<'KVMeth0' | |
ONBOOT=yes | |
TYPE=Ethernet | |
BRIDGE=br0 |
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
###参考URL :bonnie++ で I/O 性能を測定 (Linux/Unix での IO ベンチマークソフト) :: drk7jp http://www.drk7.jp/MT/archives/001448.html | |
###Scientific Linux release 6.2 (Carbon) | |
###Linux `hostname` 2.6.32-220.el6.x86_64 #1 SMP Sat Dec 10 17:04:11 CST 2011 x86_64 x86_64 x86_64 GNU/Linux | |
yum install wget gcc-c++ make | |
cd /usr/local/src | |
_TARGET_FILE='bonnie++-1.03e' | |
wget http://www.coker.com.au/bonnie++/${_TARGET_FILE}.tgz | |
tar zxvf ${_TARGET_FILE}.tgz |
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
yum -y install wget zlib gcc make perl | |
cd /usr/local/src/ | |
wget http://archive.apache.org/dist/httpd/httpd-2.2.4.tar.gz | |
wget http://ftp.openssl.org/source/openssl-1.0.0j.tar.gz | |
tar zxvf httpd-2.2.4.tar.gz ; tar zxvf openssl-1.0.0j.tar.gz |
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
cd /usr/local/src | |
wget http://archive.apache.org/dist/httpd/httpd-2.2.10.tar.gz | |
tar zxvf httpd-2.2.10.tar.gz | |
cd httpd-2.2.10 | |
./configure --prefix=/usr/local/apache-2.2.10 \ | |
--enable-module=so \ | |
--enable-so \ | |
--enable-ssl=static \ | |
--with-ssl=/usr/local/openssl-1.0.0c/ssl | |
make > /dev/null #エラーメッセージだけを出力確認したいので便宜上 "> /dev/null" を付与した |