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 | |
# | |
# redis init file for starting up the redis daemon | |
# | |
# chkconfig: - 20 80 | |
# description: Starts and stops the redis daemon. | |
# Source function library. | |
. /etc/rc.d/init.d/functions |
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
VERSION=2.0.2 | |
MAJOR_VERSION=`echo $VERSION | cut -d . -f 1` | |
MINOR_VERSION=`echo $VERSION | cut -d . -f 2` | |
LIBVERSION=5.1 | |
LUAJIT_DIR=LuaJIT-$VERSION | |
LUAJIT_SRC=$LUAJIT_DIR.tar.gz | |
RPM_BUILD_DIR=$HOME/rpmbuild | |
LUAJIT_SOURCES=$RPM_BUILD_DIR/SOURCES | |
LUAJIT_SPEC=$RPM_BUILD_DIR/SPECS/luajit.spec |
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
# install yumdownloader | |
yum install -y yum-utils | |
# download rpm | |
yumdownload PACKAGE | |
# download src rpm | |
yumdownload --source PACKAGE |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Error</title> | |
<style> | |
body { | |
width: 35em; | |
margin: 0 auto; | |
font-family: Tahoma, Verdana, Arial, sans-serif; | |
} |
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
VERSION=0.22 | |
TEST_NGX_DIR="Test-Nginx-${VERSION}" | |
TEST_NGX_SRC="${TEST_NGX_DIR}.tar.gz" | |
RPM_BUILD_DIR=$HOME/rpmbuild | |
RPM_BUILD_SOURCES=$RPM_BUILD_DIR/SOURCES | |
RPM_BUILD_SPECS=$RPM_BUILD_DIR/SPECS | |
SPEC=perl-Test-Nginx.spec | |
TEST_NGX_SPEC=$RPM_BUILD_SPECS/$SPEC | |
yum install -y cpan cpanspec perl-libwww-perl perl-URI perl-List-MoreUtils perl-Text-Diff perl-Test-LongString perl-Test-Base perl-Time-HiRes |
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
sleep を挟みながら、1G くらいずつ足していく | |
# よくない方法 | |
# 10G 追加 | |
dd if=/dev/zero of=./add_disk.img bs=1G count=10 | |
cat add_disk.img >> disk.img | |
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://repo.mysql.com/mysql-community-release-el6-5.noarch.rpm | |
yum install -y mysql-community-server | |
service mysqld start | |
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
mysql> CREATE DATABASE test_db DEFAULT CHARACTER SET utf8; | |
mysql> CREATE TABLE test_db.users (id int(11) unsigned AUTO_INCREMENT, username varchar(512), password varchar(512), PRIMARY KEY (id)); | |
mysql> INSERT INTO test_db.users (username, password) VALUES ('foo', '0beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a33'), ('bar', '62cdb7020ff920e5aa642c3d4066950dd1f01f4d'); | |
# mysql> GRANT ALL PRIVILEGES ON *.* TO [email protected] IDENTIFIED BY 'test' WITH GRANT OPTION; | |
# mysql> GRANT ALL PRIVILEGES ON *.* TO test_user@localhost IDENTIFIED BY 'test' WITH GRANT OPTION; | |
# mysql> FLUSH PRIVILEGES; |
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
# add epel repo | |
yum install -y libdrizzle libdrizzle-devel pcre pcre-devel openssl openssl-devel zlib zlib-devel readline readline-devel libxml2 libxml2-devel libxslt-devel perl perl-devel perl-ExtUtils-Embed perl-ExtUtils-ParseXS GeoIP-devel gd-devel | |
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
local resty_sha1 = require "resty.sha1" | |
local upload = require "resty.upload" | |
local chunk_size = 4096 | |
local form = upload:new(chunk_size) | |
while true do | |
local typ, res, err = form:read() | |
ngx.say("### header 1") |