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 | |
# | |
# # sample usage | |
# curl -o /tmp/init_ec2.sh https://gist.github.com/pacojp/5703761/raw | |
# nohup /bin/bash /tmp/init_ec2.sh > /tmp/init_ec2.sh.log && rm -f /tmp/init_ec2.sh & | |
# | |
# Make sure only root can run our script | |
if [ "$(id -u)" != "0" ]; then |
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 | |
# | |
# # sample usage | |
# curl -o /tmp/install_nginx.sh https://gist.github.com/pacojp/5704628/raw | |
# nohup /bin/bash /tmp/install_nginx.sh > /tmp/install_nginx.sh.log && rm -f /tmp/install_nginx.sh & | |
# | |
# Make sure only root can run our script | |
if [ "$(id -u)" != "0" ]; then |
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 | |
# | |
# # sample usage | |
# curl -o /tmp/install_mysql_server.sh https://gist.github.com/pacojp/5707825/raw | |
# nohup /bin/bash /tmp/install_mysql_server.sh > /tmp/install_mysql_server.sh.log && rm -f /tmp/install_mysql_server.sh & | |
# | |
# Make sure only root can run our script | |
if [ "$(id -u)" != "0" ]; then | |
echo "This script must be run as root" 1>&2 |
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
# | |
# for small cache based wordpress service (ex. aws ec2.micro instance) | |
# | |
# this is beta version | |
# | |
# | |
# estimated physical memory size for this mysql server | |
# 200M | |
# |
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 | |
# | |
# this script expects user data field set like below. | |
# | |
#========================== | |
#hostname hogehostname | |
#somekey fugafuga | |
#========================== | |
# |
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 | |
# | |
# nginx - this script starts and stops the nginx daemon | |
# | |
# chkconfig: - 85 15 | |
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \ | |
# proxy and IMAP/POP3 proxy server | |
# processname: nginx | |
# config: /etc/nginx/nginx.conf | |
# config: /etc/sysconfig/nginx |
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 | |
# | |
# # sample usage | |
# curl -o /tmp/install_wordpress.sh https://gist.github.com/pacojp/5721025/raw | |
# /bin/bash /tmp/install_wordpress.sh ${HOSTNAME} | |
# | |
WORDPRESS_VERSION=3.5.1 |
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
# init_ec2.sh | |
curl -o /tmp/init_ec2.sh https://gist.github.com/pacojp/5703761/raw | |
nohup /bin/bash /tmp/init_ec2.sh > /tmp/init_ec2.sh.log && rm -f /tmp/init_ec2.sh & | |
# install_nginx.sh | |
curl -o /tmp/install_nginx.sh https://gist.github.com/pacojp/5704628/raw | |
nohup /bin/bash /tmp/install_nginx.sh > /tmp/install_nginx.sh.log && rm -f /tmp/install_nginx.sh & | |
# install_mysql_server.sh | |
curl -o /tmp/install_mysql_server.sh https://gist.github.com/pacojp/5707825/raw |
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
user nginx; | |
worker_processes 3; | |
error_log /var/log/nginx/error.log; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
multi_accept on; | |
use epoll; | |
} |
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
upstream backend { | |
server unix:/var/run/nginx-backend.sock; | |
} | |
# inner reverse proxy(for cache) | |
server { | |
listen 3000; | |
#server_name www.example.com; | |
server_name _; | |
root /var/www/example.com/public_html; |