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 | |
# pwd => / | |
# whoami => root | |
cd /root | |
echo "START!!!!" | |
date | |
apt-get install -y build-essential libssl-dev openssl libreadline6 libreadline6-dev git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion git-core | |
echo "apt-get finished." | |
date |
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 | |
# CakePHP2.0 setup script | |
# Only for CentOS 5.6 64bit Plain | |
/bin/cat <<EOF >> /etc/rc.d/rc.local | |
curl https://raw.github.com/gist/1284739/2fbed6559815413523cda708d99eb18f9926428a/cakephp2_on_nifyucloud_centos5_6.sh | sh | tee /root/_setup.log | |
/bin/sed -i.orig -e "s/curl/#curl/g" /etc/rc.d/rc.local | |
/bin/sed -i.orig -e "s/\/bin\/sed/#\/bin\/sed/g" /etc/rc.d/rc.local | |
EOF |
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
#! /usr/bin/env ruby | |
# NIFTY Cloud API - DescribeInstances | |
# Author:: Kei HAMANAKA <kei.hamanaka (at) gmail.com> | |
# License:: Distributes under the same terms as Ruby | |
require 'uri' | |
require 'time' | |
require 'net/https' | |
require 'cgi' | |
require 'openssl' |
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
wget http://ja.wordpress.org/wordpress-3.2.1-ja.tar.gz | |
tar zxvf wordpress-3.2.1-ja.tar.gz | |
mv wordpress /var/www/html | |
cd /var/www/html/wordpress | |
mv wp-config-sample.php wp-config.php | |
echo "fix wp-config.php" | |
echo "mysql" | |
echo 'create database wordpress;' |
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/bash | |
################## | |
# disable apache # | |
################## | |
service httpd stop | |
chkconfig httpd off | |
service xinetd stop | |
chkconfig xinetd off | |
service saslauthd stop |
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
yum -y install apr apr-util yum-utils | |
mkdir ~/httpd | |
cd ~/httpd | |
yumdownloader httpd | |
rpm2cpio httpd-2.2.3-53.el5.centos.1.x86_64.rpm | cpio -idmv | |
mv usr/bin/ab /usr/bin/ab | |
cd ~ | |
rm -rf ~/httpd | |
ab http://google.ru/ |
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
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'nifty' | |
require 'dozens' | |
require 'net/ssh' | |
NIFTY_ACCESS_KEY = "-----" | |
NIFTY_SECRET_KEY = "-----" | |
DOZENS_API_KEY = "-----" |
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 -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/5/x86_64/epel-release-5-4.noarch.rpm | |
yum install -y yum-utils pcre-devel libxslt-devel GeoIP-devel gd-devel rpm-build | |
yumdownloader --source nginx | |
rpm -ivh nginx-0.8.54-1.el5.src.rpm | |
sed -i 's/--with-file-aio/ /' /usr/src/redhat/SPECS/nginx.spec | |
rpmbuild -ba /usr/src/redhat/SPECS/nginx.spec | |
rpm -ivh /usr/src/redhat/RPMS/x86_64/nginx-0.8.54-1.x86_64.rpm | |
chkconfig nginx on |
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
Deploy | |
------------------------------ | |
server1 | |
app / controller / crosstest_controller.rb | |
app / view / crosstest / index.html.erb | |
app / view / crosstest / test.json.erb | |
server2 | |
app / controller / application_controller.rb | |
app / controller / sample_controller.rb |
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
# -*- encoding: UTF-8 -*- | |
require 'rubygems' | |
require 'sinatra' | |
require 'haml' | |
require 'omniauth' | |
set :haml, {:format => :html5} | |
enable :sessions, :logging | |
use OmniAuth::Builder do |